Unix Technical Forum

to read backup file

This is a discussion on to read backup file within the SQL Server forums, part of the Microsoft SQL Server category; --> Hello, I have: - server MS SQL MSDE (2000) - database 'COLLBASE' - table 'MAIN' - row: column 'NAME' ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 08:27 PM
Zenek
 
Posts: n/a
Default to read backup file

Hello,


I have:
- server MS SQL MSDE (2000)
- database 'COLLBASE'
- table 'MAIN'
- row: column 'NAME' value 'version' and column 'VALUE' value '003'

I make backup files by SQL query.
I have more backups for different versions of this database (different
value in field 'VALUE' in table 'MAIN').

I would like to read this value from backup file without server assist,
to get backup as ordinary file.
How to do it?
How to move in this file?
What is physical structure of backup file?

I can't to read this file from begin by compare strings, because these
files are very large, few 100MB.

regards
Zenek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 08:27 PM
Erland Sommarskog
 
Posts: n/a
Default Re: to read backup file

Zenek (zingiel@op.pl) writes:
> I have:
> - server MS SQL MSDE (2000)
> - database 'COLLBASE'
> - table 'MAIN'
> - row: column 'NAME' value 'version' and column 'VALUE' value '003'
>
> I make backup files by SQL query.
> I have more backups for different versions of this database (different
> value in field 'VALUE' in table 'MAIN').
>
> I would like to read this value from backup file without server assist,
> to get backup as ordinary file.
> How to do it?
> How to move in this file?
> What is physical structure of backup file?
>
> I can't to read this file from begin by compare strings, because these
> files are very large, few 100MB.


What are you really trying to achieve? The normal way to read data from
a backup is to restore it into a database. And if the database is just a
mere couple of 100 MB, that's a fairly snap operation.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 08:27 PM
Zenek
 
Posts: n/a
Default Re: to read backup file

Erland Sommarskog napisa?(a):
> Zenek (zingiel@op.pl) writes:
>> I have:
>> - server MS SQL MSDE (2000)
>> - database 'COLLBASE'
>> - table 'MAIN'
>> - row: column 'NAME' value 'version' and column 'VALUE' value '003'
>>
>> I make backup files by SQL query.
>> I have more backups for different versions of this database (different
>> value in field 'VALUE' in table 'MAIN').
>>
>> I would like to read this value from backup file without server assist,
>> to get backup as ordinary file.
>> How to do it?
>> How to move in this file?
>> What is physical structure of backup file?
>>
>> I can't to read this file from begin by compare strings, because these
>> files are very large, few 100MB.

>
> What are you really trying to achieve? The normal way to read data from
> a backup is to restore it into a database. And if the database is just a
> mere couple of 100 MB, that's a fairly snap operation.
>
>

of course, but I need to know this value before restore, without server
assist.

Regards,
Zenek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 08:27 PM
Erland Sommarskog
 
Posts: n/a
Default Re: to read backup file

Zenek (zingiel@op.pl) writes:
> of course, but I need to know this value before restore, without server
> assist.


Please give a more detailed account of your actual problem. Particularly,
why is it not feasible to restore the backup and read the data?


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-29-2008, 08:27 PM
Zenek
 
Posts: n/a
Default Re: to read backup file

Erland Sommarskog napisaƂ(a):
> Zenek (zingiel@op.pl) writes:
>> of course, but I need to know this value before restore, without server
>> assist.

>
> Please give a more detailed account of your actual problem. Particularly,
> why is it not feasible to restore the backup and read the data?
>
>

because I have my small program for several database's operations and I
want fast to view, fast to know versions of backups (to read value of
one field), I want not to use server or some libraries, I want to use
f.e. in C fopen function and by fseek to get to needed information.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-29-2008, 08:27 PM
Erland Sommarskog
 
Posts: n/a
Default Re: to read backup file

Zenek (zingiel@op.pl) writes:
> because I have my small program for several database's operations and I
> want fast to view, fast to know versions of backups (to read value of
> one field), I want not to use server or some libraries, I want to use
> f.e. in C fopen function and by fseek to get to needed information.


No, you don't want to that. The backup format is to my knowledge not
publicly documented.

If the databases are as small as you have indicated, there is little
loss in execution time in actually restoring the databases and reading
the value in the regular way.

And you did not really answer my question. That is, there must be some
real-world problem you are trying to solve. What does this value you want
to read represent?
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:24 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com