Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityCommunity Membe...Community Membe...How to Script, Copy or Export Stored Procedures in SQL Server Management StudioHow to Script, Copy or Export Stored Procedures in SQL Server Management Studio
Previous
 
Next
New Post
10/6/2006 3:36 PM
 
It took me a while to figure this out and couldn't find much help Books Online or on the Internet, so maybe this will help someone else.

1. Open SQL Server Management Studio
2. Connect to the external database: Object Explorer > Connect > Database Engine (enter credentials and connect)
3. Expand databases
4. Right-click desired database > Tasks > Generate Scripts
5. Select Database; do NOT check "Script all objects..." > Next
6. Accept defaults > Next
7. Check "Stored procedures" > Next
8. Check the stored procedures you want to script > Next > Next (for new query window)
9. Review selections and > Finish

The scripts will appear in a new window. You can:
1. save them to a new sql file to run on your "copy to" database.
2. copy and paste them into DNN > Host > SQL window to "Run as Script"

To run the script on another database:
(There is probably a better way to do this and if so, please chime in)
1. Right-click the desired database > New Query
2. Paste the script into the query window
3. I removed all instances of the database name in brackets or in front of dots
4. Execute the query: !Execute in the tool bar
All the stored procedures magically appear in the database

Gary
 
New Post
10/10/2006 12:28 PM
 
Thanks! I was looking for that information too.
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityCommunity Membe...Community Membe...How to Script, Copy or Export Stored Procedures in SQL Server Management StudioHow to Script, Copy or Export Stored Procedures in SQL Server Management Studio


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out