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' ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| |||
| 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. |
| ||||
| 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 |