December 9, 2008 at 9:43 pm
HI all,
I have a requirement such that to write a storedprocedure which contains some DDL statements .As of now i have created this in my database and execute SP when ever required. but now the requirement is to create 10 Same databases but with different names and i have to execute the same procedure in all the databases but i dont want to create the procedure in all the databases .
My idea to avoid creating same SP is to create a SP in Master database and execute the same in any required Database such that DDL commands in SP should effect in current databse but not in master.
Is there any such way to execute SP available in different Database through current Database.
Thanks
December 9, 2008 at 11:54 pm
Hello,
Have you considered using sp_msforeachdb as an alternative solution?
Regards,
John Marsh
www.sql.lu
SQL Server Luxembourg User Group
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply