Solved

migrate stored procedures

Posted on 2011-03-22
2
266 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

830 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