I have a trigger that I need to run on all application databases that are in the domain.database(Table.Coloum) of a SLSYSTEM Database, Dont want to do it manually
10 views
Skip to first unread message
Sammy Singh
unread,
Apr 16, 2013, 3:43:15 PM4/16/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have a trigger that I need to run on all application databases that are in the domain.database(Table.Coloum) of a SLSYSTEM Database
So if I do a select databasename from domain on the system database I get the 250+ Application database name. So I want to run a Trigger SQL Script on each of the 250+ application databases.
Is there some way I can create a script to do this for all the databases in the domain.databasename of the SLSYSTEM database.
Thanks so much in advance.
Erland Sommarskog
unread,
Apr 16, 2013, 4:52:36 PM4/16/13
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
The easiest would be to write a small C# program that accepts a file
name as inparameter, reads that file into a varibale and then retrieves the
database name from that domain table, and then for every database runs: