?
Solved

restore sql database-generate restore script from files in folder

Posted on 2013-05-17
7
Medium Priority
?
1,380 Views
Last Modified: 2013-05-27
Very often I have a request to restore sql server databases from production to out test environment for a couple of out DB servers.  Every DB servers are having around 10-15 databases on it.
Format of the backups are : DB1_backup_201305151900.bak.
When I have a request  I restore this dbs from tape to one folder on the disk, and after that I have to manually restore them. It's really a hard work and I need to automate this somehow.
If it is possible to generate a restore script from the files in directory?
The problem that need to be solved also is that db file location in production are located in drive D: and E: and on test environment only on disk E:
0
Comment
Question by:dedri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 25

Expert Comment

by:jogos
ID: 39175178
0
 

Author Comment

by:dedri
ID: 39176981
hi, anything that does not involve powershell. My SQL servers are sql server 2005 and windows 2003
0
 
LVL 70

Expert Comment

by:Qlemo
ID: 39182104
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:dedri
ID: 39183720
Hi Qlemo, 10x for your reply.
I've already checked this article. The problem with this script is  that it is only for one database, and I am having 10-15 databases in the folder. Also it does not provide the option to move database( on my production server databases are located on the D:\- data files  and E:\ - log files), and on test servers they are all on one drive D:\
0
 
LVL 70

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 39183917
0
 

Author Closing Comment

by:dedri
ID: 39199383
10x
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

777 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