Execute a T-Sql statement on all Databases - Sql Server

I had this issue about a week ago, I needed to change my users table on all databases. Because all of my tables are named the same on all db’s (convention) I wanted to avoid the hassle of going through the databases manually with Management studio and just wanted to execute the code on all of the db’s.

This is the script.

I added some comments to better understand it.

Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com