July 28, 2009 at 5:27 am
Hi
I need to create a stored procedure on all database, I know I can use msforeachDB but the procedure is quite long winded and has a number of quotes.
I was wondering if there is another way to do this ?
July 31, 2009 at 4:51 pm
Why don't you make use of dynamic sql and executing the sql statements in each database by using "USE".
MJ
August 1, 2009 at 1:49 am
Good point
Just then when you have loads of commas, the time & efford that it will take to write dynamic SQL, one could actually manually install it on all the databases. Is it possible to use something like Quoted identifier and msforeachDB stored proc ?
Is it good practice to use msforeachDB stored proc ?
August 3, 2009 at 6:03 pm
Why don't you make use of batch files and osql utility.
MJ
August 4, 2009 at 6:46 am
thats a good point actually, i was just wondering whether there is a quicker way to do this programatically.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply