move Stored procedure

Posted on 2009-06-30
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?
Question by:jung1975
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
LVL 37

Assisted Solution

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

Accepted Solution

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.

LVL 42

Assisted Solution

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
string fuctions 4 26
sql select record as one long string 21 24
TSQL query to generate xml 4 35
SQL Server Connection String through a VPN 8 29
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

821 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