Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

move Stored procedure

Posted on 2009-06-30
4
Medium Priority
?
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 400 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 400 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 800 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 43

Assisted Solution

by:Eugene Z
Eugene Z earned 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

636 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