Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how to deploy stored procedures

Posted on 2011-10-20
3
Medium Priority
?
158 Views
Last Modified: 2012-05-12
Using SQL 2008 I have created four stored procedures and one view.
What is the equivalent of an install or reg-update for SQL?
I just want as simple a way as possible to make a package or something that can be moved and installed on x number of instances of this database.  Something one step above copy and paste would be good.
I have no experience in this field.  Any  suggestions?  Security is not a concern.
thanks
0
Comment
Question by:wilfordrocks
  • 2
3 Comments
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 400 total points
ID: 37003149
what about a batch job using SQLCMD tool to run a -sql file with the CREATE (or ALTER) scripts
http://msdn.microsoft.com/en-us/library/ms162773.aspx
0
 
LVL 70

Accepted Solution

by:
Scott Pletcher earned 1600 total points
ID: 37003262
In SQL 2008 SSMS, you can create a local server group with all the instances you need in it, then when you run the CREATE and other other statements, they all run against all of the instances automatically.
0
 
LVL 70

Expert Comment

by:Scott Pletcher
ID: 37009392
Thanks!

Sorry I didn't flesh that answer out, didn't have time then.

I'm guessing you researched it yourself :-) .

Just to be sure, in SQL 2008 SSMS, you create a Local Server Group(s), with any name(s) you want, under "Registered Servers" tab/task.

Then you right-click on the Group name, and select "New Query".  You code/paste your query in there, and when you run, it will automatically run against all instances in that group.

Pretty sweeeeet!!

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question