new sql rockstar posts

Native Restore From Litespeed Backup

More than once I have had the need to recover the native backup file from within the compressed Litespeed backup file. Fortunately Quest provides an extractor utility in order to help with the process. Otherwise, you would be forced to do a restore followed by a native backup. If your database is of a considerable size then the time needed to accomplish that task could be prohibitive; it will always be simpler to do the extraction as opposed to a restore and a backup.

Extraction is very straightforward. First step is to open a command window and navigate to the directory where the utility is located, this is typically the C:\Program Files\Quest Software\LiteSpeed\SQL Server directory.

Next, issue the following command to extract the native backup files.  Yes, files. In fact you will have one file created for each thread that was used when Litespeed was taking the initial database backup. The command is roughly as follows:

extractor.exe -F [path to backup file taken by litepseed] -E [name of file you want to be created]

So, if you had a backup of AdventureWorks saved to C:\AdWks.bak, and you wanted to extract the native dump from that file and create new files in the same directory, you would run the following command:

extractor.exe -F c:\AdWks.bak -E c:\AdWks_ext.bak

This command results in the creation of multiple files. You can configure a path and filename here if you want to have the files stored somewhere other than the current directory.

OK, so what do you do with these files? Well, you restore them, of course, using either T-SQL or SSMS. One common reason for needing to have a native backup is for those rare times when you need to provide a vendor with a copy and that same vendor does not have a copy of Litespeed. And while the extraction utility makes it easy to provide the necessary files, you have no idea who is on the receiving end of the multiple files. I have lost count of the number of vendors I have sent the extracted files to and received an email back that either says “we don’t know what to do with these files” or “can you send us just one file instead?”

Sure, I can do that as well. Or, I could take a minute to teach you how to do it for yourself. Here goes:

Open up SSMS and all you need to do is point to the files. Just add in each file as shown below, and click OK. Then, select your restore point and click OK again. You should be fine, the database restore should be underway at this point. 

Now, if you prefer T-SQL, the equivalent syntax would be:

RESTORE DATABASE [AdventureWorks]
FROM  DISK = N’C:\AdWks_ext.bak2′,
DISK = N’C:\AdWks_ext.bak1′,
DISK = N’C:\AdWks_ext.bak0′
GO

It’s that simple.

Asides

  • Just when you thought that there was nothing left in the world upon which bacon had not been tried, along comes someone displaying the kind of American ingenuity that has served us well for over 200 years. I give you the Bacon Cupcake: http://bacontoday.com/bacon-cupcakes-part-deux Rumor has it that in the summer the same people offer a ‘bacon [...] Click for more...
  • The first round of the “Name That Caption” contest over at DBASurvivor.com will end next Friday, winner gets a copy of my upcoming book. Head over to http://dbasurvivor.com/?p=29 to learn more. We have had a fair number of entries to date and I already have my top five set aside for people to vote on. But [...] Click for more...
  • I am going to run a “Name That Caption” contest over at DBASurvivor.com, winner gets a copy of my upcoming book. Head over to http://dbasurvivor.com/?p=29 to learn more. The book is on track to be released sometime next month. Between now and the actual release I want to have some fun. Also, I am going to [...] Click for more...
  • Apple is about to launch a new product today and I thought we could have some fun guessing the initial price. Winner gets a copy of my upcoming book, DBA Survivor. The rules are very simple: use the #tabletpriceisrightgame hashtag on Twitter, or leave a comment to this blog post select a specific price. not a range [...] Click for more...
  • OK, updated once again. Discuss amongst yourselves. I have come across roughly 15 new bloggers in the past six weeks. Well, new to me, but most of the names are recognizable. I’ll keep my eye on them and include them when the time is right. Nobody was promoted this time around. As the old saying goes [...] Click for more...

Recent Posts

Book Review: The 21 Irrefutable Laws of Leadership
February 4, 2010
By Thomas LaRock
SQLSaturday #34 Recap
February 1, 2010
By Thomas LaRock
More Bing
January 27, 2010
By Thomas LaRock

Get the Flash Player to see the wordTube Media Player.