Solved

migrate stored procedures

Posted on 2011-03-22
2
259 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
ID: 35196890
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
ID: 35197132
Greate... worked like a trate
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help editing script 3 74
Modifying Powershell and WMI to obtain disk, cpu, mem & IP data ? 5 56
Batch/VBScript : Disable Windows tasks 7 34
Attention Please 10 42
This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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