|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Saturday, January 19, 2013 8:28 AM
Points: 1,038,
Visits: 255
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, December 10, 2002 12:00 AM
Points: 135,
Visits: 1
|
|
Hi Greg great article, i think it will save a lot of time. I like the concept of first building the sql before executing. I think it would be nice to have the option to only generate scripts for one database (with an optional parameter) or for all databases.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, May 20, 2005 8:46 AM
Points: 90,
Visits: 1
|
|
Great! I like the idea to use current msdb to create restore scripts on the spot. I suggest you include the possibility to handle several backup files for one database restore plus the possibility to MOVE files to another location.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Saturday, January 19, 2013 8:28 AM
Points: 1,038,
Visits: 255
|
|
Hey, I like the suggestions. More heads are better than one.
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.sqlserverexamples.com
Gregory A. Larsen, MVP
Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, February 21, 2013 7:34 PM
Points: 3,
Visits: 173
|
|
Greg, your approach works good in the scenario that you have put dump files in same directory where they were backed up. My suggestion is, if you can detect where they are and how many they are based on actual files, that will be great. For example, I have a DB dump and a bunch of tran log dumps in some where in harddisk. I want to restore those to a database and wish your script to generate a series of "restore" command in order. Would it be something you consider as valid request?
Regards,
Lin
lintai_liu@yahoo.com
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Saturday, January 19, 2013 8:28 AM
Points: 1,038,
Visits: 255
|
|
My approach reads the system tables to determine where the backups are. Now if you move the backup files to another drive then this is not recorded in the system tables, and would make it harder to write a script to find them. I suppose the script could be easily modified if you always have a specific directory in which you moved the backups, and you kept the backup name the same. Is this your case?
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.sqlserverexamples.com
Gregory A. Larsen, MVP
Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Monday, March 11, 2013 11:12 AM
Points: 411,
Visits: 307
|
|
Great article, should be included in any disaster recovery. What do you use to pick up the transaction log files and at what frequency?
Cheers
John Zacharkan
John Zacharkan
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Saturday, January 19, 2013 8:28 AM
Points: 1,038,
Visits: 255
|
|
we use veritas software to copy transaction log, full and diff backups to tape. We do this nightly.
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.sqlserverexamples.com
Gregory A. Larsen, MVP
Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
|
|
|
|