Solved

Copy Stored Procedures from one database to another

Posted on 2003-12-06
2
881 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

759 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

20 Experts available now in Live!

Get 1:1 Help Now