Solved

how to copy a stored procedure from one instance database to another in SQL 2005

Posted on 2010-09-10
1
623 Views
Last Modified: 2012-06-27
Is there a way to copy a stored procedure from one instance database to another?
0
Comment
Question by:gloyola1
1 Comment
 
LVL 28

Accepted Solution

by:
sammySeltzer earned 500 total points
Comment Utility
Many ways to do this:

1. In SQL Server 2005 Management Studio, click on the Source database table's
Stored Procedures folder.
2. Select the stored procedures to be copied
3. Right click and select Script Stored Procedure as CREATE TO:
4. Now, click on the Destination database table's Stored Procedures folder
5. Press F5

or

you can find a stored procedure named
dbo.sp_generate_script.
Using dbo.sp_generate_script, you can get all stored procedures in a
database.

Here are addional links

http://www.myitforum.com/articles/18/view.asp?id=2945

http://www.eggheadcafe.com/articles/20030609.asp

if you are moving the db instance too, try this

The fastest way would be to detach the database copy the mdf and ldf files
to the laptop and attach them there.

Good luck
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

763 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

13 Experts available now in Live!

Get 1:1 Help Now