[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

restore sql database-generate restore script from files in folder

Posted on 2013-05-17
7
Medium Priority
?
1,447 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 71

Expert Comment

by:Qlemo
ID: 39182104
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 71

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 39183917
0
 

Author Closing Comment

by:dedri
ID: 39199383
10x
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

649 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