Solved

migrate stored procedures

Posted on 2011-03-22
2
240 Views
Last Modified: 2012-05-11
I have 625 stored procedure scripts which I need to migrate to a new testing database.

I have generated the scripts as files....however each script includes the "USE" statement with the name of the production database. For example:

Use [proddb1]

select * from dbo.tb1

I need to either:

Generate these scripts without the USE
Ignore the USE when the scripts are executed so that I can I load them into the new testing database.

Is this possible?
0
Comment
Question by:Mr_Shaw
2 Comments
 
LVL 8

Accepted Solution

by:
jawa29 earned 500 total points
Comment Utility
Hi Mr Shaw

Scripting this would be possible however as the USE [proddb1] is the same in each file why not try Notepad++ http://notepad-plus-plus.org/. This has a search and replace option that will allow you to specify a directory that holds the files.

Jawa29
0
 

Author Closing Comment

by:Mr_Shaw
Comment Utility
Greate... worked like a trate
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Unlike scripting languages such as C# where a semi-colon is used to indicate the end of a command, Microsoft's VBScript language relies on line breaks to determine when a command begins and ends. As you can imagine, this quickly results in messy cod…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 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