Solved

Copy Stored Procedures from one database to another

Posted on 2003-12-06
2
895 Views
Last Modified: 2008-03-10
I have got to be overlooking something... Surely it can't be that difficult to copy stored procedures and views from one database to another on the same server.  Seems strange that I can right-mouse click and select copy, but when I move down to the other database there isn't any "Paste" option.
I am working on SQL Server 2000. I don't want to move tables, just SP, Views, And Functions.  What is the EASIST way to do this?
0
Comment
Question by:Mach1pro
2 Comments
 
LVL 4

Expert Comment

by:dasari
ID: 9890566
When u right click on it and select copy, it copies the script of the sp to clipboard.......

get all the scripts and paste them into a file, then execute the script in the query analyzer.....

Lemme know how it went buddy!

HTH



0
 
LVL 34

Accepted Solution

by:
arbert earned 250 total points
ID: 9890577
Why right click on each sp one by one?????  Right click on the database and choose generate scripts--you can choose all of your SPs and Views at once.

Another method, use DTS copy database wizard to choose the objects you want....

Brett
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SSIS Conditional Split 7 31
Help with SQL Server Polygon 2 32
How to construct an if else statement from existing code 6 19
T-SQL: New to using transactions 9 23
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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.
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.

776 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