Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Many DB's needing SP's
Message
From
30/09/2011 18:38:15
 
 
To
29/09/2011 21:09:02
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2008
Application:
Desktop
Miscellaneous
Thread ID:
01525195
Message ID:
01525299
Views:
47
>>>Occurs to me you could also put all your sps in a drop and create script, always keep your changes there, then have a script that runs that script against each DB in a list.
>
>What would the script that ran the drop and create script look like, Charles?
>
>I have the same problem, on a smaller scale at several clients, and I have one script that I run from the query window against each DB.
>I make a lot of changes, so if I had to do it with 12 I'd go batty.

Actually when I wrote that I was thinking of something I had done that ran a script against each table in a list derived from the systables. But now that you mention it ...

Stealing an idea from stackoverflow you could use a command line script
sqlcmd -S <ComputerName>\<InstanceName> -i <MyScript.sql> -d <database_name> -T
http://weblogs.sqlteam.com/robv/articles/4099.aspx

or use this free tool ( really glad this question got asked as it lead to finding this <s> )

http://weblogs.sqlteam.com/mladenp/default.aspx
http://www.ssmstoolspack.com/Features?f=6

Which reiterates my great life lesson that most of the really cool stuff I know I learned on my way to looking up something else.


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform