Let's picture the example scenario...
Manager: "I will need a list of all our albums in our RecordCompany database, for my reports please"
Me: "No problem, let me get that for you now.."
Invalid object name?! This doesn't look right.. We know this table was here when we did the last backup, so somehow it's been dropped and we need to get it, and it's data back asap!
Thankfully Litespeed can save us with its Object Level Recovery (OLR)* feature, where we can just restore the 'Albums' table from the last backup file, and all will be back to normal. (*in v8.5 and earlier, OLR works only with disk backups. When v8.6 is released, OLR will also work with Cloud backups too!)
As we have that recent backup, it should be easy enough to perform a restore of just the Albums table, so let's do the following steps in Litespeed to get the data back.
(It's worth noting, when creating the backup you can choose the option to 'Optimize backup for Object Level Recovery' which will allow the backup to be read more efficiently by Litespeed in the following steps.)
Go to the 'Object Level Recovery' menu, and then start up the Object Level Recovery Wizard:
Upon starting the wizard, Litespeed will need to read in the full backup file, which can take some time, depending on the size of the backup itself.You'll see the following steps:
1. Choose the instance you are recovering to
2. Specify the Backup Source. Here you can select Database to restore from a specific database's backup history, or select Disk to manually select a backup file to restore:
3. As we chose the 'Retrieve from Database' option, we see that Litespeed knows about the last full backup, and has already found the location of the backup file on the server. (By choosing 'Disk' in the previous option, we would manually select the backup file here):
4. And finally, the script to retrieve the backup content:
We're half way there to getting our table and it's data back! Now Litespeed has read from the backup file, we are presented with a screen showing the objects within the backup file that can be recovered. All we are going to do in this example is identify the table we want to restore (in this case the 'Albums' table), and then press the 'Recover Table' button at the top of the screen:
When we choose to recover a table, the Recover Table Wizard will first display a list of tables inside the backup. In this case our database is only small, and it is easy to find the mysteriously missing 'Albums' table:
The next step is important, in that we restore the table to the correct database in the drop-down menu!:
Before Litespeed runs the restore, you can also preview the SQL statement that is to be run:
Then we will run the table restore. When it's complete, if all is well, we will see a message to say the Table was successfully restored.
Now, let's take a quick trip back to SSMS to refresh the database information, and we can be relieved to see that not only is the 'Albums' table back......but also the data inside the table is too, when we re-run the original Select statement:
This is a brief example of how Object Level Recovery works with tables, on a very small scale. The same principal and method applies to any other objects in your full backup that may need to be recovered.
By the way, it is possible to execute a query with a backup directly, without restoring the table. "Script Execution" tab in OLR tool allows executing simple queries to a backup without Sql Server.