Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Many DB's needing SP's
Message
De
30/09/2011 18:38:15
 
 
À
29/09/2011 21:09:02
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Desktop
Divers
Thread ID:
01525195
Message ID:
01525299
Vues:
45
>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform