Solved

move Stored procedure

Posted on 2009-06-30
4
201 Views
Last Modified: 2012-08-14
I need to move Stored procedure ( about 80) from databse A to Database B...
i don't want to restore the database, only need to move SPs ..
what is the best way to do this?
0
Comment
Question by:jung1975
4 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 100 total points
ID: 24747789
right click on the sp  from enterprise manager  choose generate script, copy it , run it on the other database
0
 
LVL 37

Assisted Solution

by:momi_sabag
momi_sabag earned 100 total points
ID: 24747822
if its sql server 2005 you can use the managment studio to copy objects between databases
0
 
LVL 17

Accepted Solution

by:
pssandhu earned 200 total points
ID: 24747879
You can run this command to generate the scripts for the stored procedure all at once and copy the results in SSMS query editore window and run all the create procedure scripts at once.

SELECT ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE'
P.
0
 
LVL 42

Assisted Solution

by:EugeneZ
EugeneZ earned 100 total points
ID: 24748057
script them from EM\SSMS -copy - paste them to their new home (sql server DB) and execute
Check errors and fix them if you get any
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now