Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL Server
Hi All,
Is there any way to read/extract data from sql server backup file without restoring it?
 
Thanks.
Posted 15-Feb-10 1:14am
Edited 15-Feb-10 1:15am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You could restore the backup to a different (new) database. I don't think there are other ways to read the file.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

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'.
  Permalink  
v3
Comments
hindeb at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

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
  Permalink  
v2

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

  Print Answers RSS
0 BillWoodruff 309
1 CPallini 300
2 Sergey Alexandrovich Kryukov 290
3 George Jonsson 274
4 Gihan Liyanage 230
0 OriginalGriff 4,895
1 CPallini 4,010
2 Sergey Alexandrovich Kryukov 3,514
3 George Jonsson 2,826
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web01 | 2.8.140905.1 | Last Updated 17 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100