Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-10
1
Medium Priority
?
633 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
[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
1 Comment
 
LVL 29

Accepted Solution

by:
sammySeltzer earned 2000 total points
ID: 33648622
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

Independent Software Vendors: 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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

715 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