Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
Is there any way to read/extract data from sql server backup file without restoring it?

Thanks.
Posted
Updated 22-Jul-20 0:21am
v2

I presume you are talking about SQL Server here. A backup file is a database file used by SQL Server. I think SQL Server is currently only way to read its contents in usable fashion.

I am unclear about your purpose of doing the task. I suspect you have database backup file and want to use the data without installing SQL Server. How about installing Free SQL Server Express Edition? Check out http://www.connectionstrings.com/sql-server-2005[^], it will show you how to connect with a backup file.
 
Share this answer
 
You can do it by using 3rd party tools such as ApexSQL Restore[^] or SQL Virtual Restore[^] You can read and extract data from virtual database made from backup file and work vith virtual database like it is live database.
 
Share this answer
 
You could restore the backup to a different (new) database. I don't think there are other ways to read the file.
 
Share this answer
 
Thank you for your reply.

But our requirement is different we want to do it offline. i.e. in the offline manner we want to get table & columns from snap shot files. So as some other softwares like 'Red Gate' does we want to create snap shot with our application, which later can be read by using our software only.
 
Share this answer
 
If requirement is that only your application should be able to use a database backup:
Why don't you encrypt the database? See http://dotnetslackers.com/articles/sql/IntroductionToSQLServerEncryptionAndSymmetricKeyEncryptionTutorial.aspx[^] for more details. If you are still worried, encrypt the backup file as well. Decrypt when requird, use normal SQL Client to connect, its easy & secure.
 
Share this answer
 
Thank you for your reply.

We come up with some solution for snap shot files,now our requirement is to develop a windows application, by which the user should be able to get the contents of (read table /column names from)the .bak file even though they dont have SQL Server installed on their system.i.e offline manner.

Any idea how it can be done?
Some tools are there in the market like 'Red Gate'.
 
Share this answer
 
v3
Comments
hindeb 13-Dec-12 10:49am    
Some guys are really not understaning the requirement here though helpskker has tried his best to explain it.
The requirement is to read a SQL backup file without restoring it. There are some SQL tool like "SQL Compare" or red gate tool does this.
The requirement is "Is there any way to read the content (line schema information) of a SQL backup file with out restoring it?"

I also have the same requirement as I want to develop a tool like "SQL Compre". If anybody can give any pointer it will be greatly appreciated.
Hi, you can use either Quest's OLR (Object Level Recovery) tool which will allow query of a sql server backup just like it was a live database, without having to restore it, OR you can use Idera's Virtual Database product which uses an attach under the covers to attach the database and redirects SQL Server IOs to the backup in a minifilter driver. You can then quickly do your tsql query to access just the information you want without having to restore the entire database.

I know because I worked on both products at both companies. And I created the Instant Restore product at Idera and that minifilter driver, which goes a step beyond their VDB product and will actually restore the backup in the background after first quickly bringing it on line. A 1TB backup could be brought on line in seconds (provided no tail log). The larger the tail log the longer it would take to "quickly" bring it on line.

You have to pay for all of those products I believe but there may be a trial period.

Russel McDonald
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900