|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
to read backup fileI 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 How did you produce the backup files? Using the BACKUP DATABASE command?
-- Show quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "Zenek" <zing***@op.pl> wrote in message news:e4n9l6$min$1@news.onet.pl... > 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 Tibor Karaszi napisa³(a):
> How did you produce the backup files? Using the BACKUP DATABASE command? Regards,> yes Zenek You must restore to another place and then you can search a query.
You can't direct query from backup database. "Zenek"ë‹˜ì´ ìž‘ì„±í•œ ë‚´ìš©: Show quote > 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 > Hi,Zenek
Without RESTORE the database with the different name you will be able to check it out? Show quote "Zenek" <zing***@op.pl> wrote in message news:e4n9l6$min$1@news.onet.pl... > 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 Sorry, shoul be
Without RESTORE the database with the different name you will NOT be able to check it out? Show quote "Uri Dimant" <u***@iscar.co.il> wrote in message news:%23ud08VJfGHA.4776@TK2MSFTNGP05.phx.gbl... > Hi,Zenek > Without RESTORE the database with the different name you will be able to > check it out? > > > "Zenek" <zing***@op.pl> wrote in message news:e4n9l6$min$1@news.onet.pl... >> 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 > > Uri Dimant napisa³(a):
Show quote > Sorry, shoul be I have my small program for several database's operations and I> Without RESTORE the database with the different name you will NOT be able > to > check it out? > > "Uri Dimant" <u***@iscar.co.il> wrote in message > news:%23ud08VJfGHA.4776@TK2MSFTNGP05.phx.gbl... >> Hi,Zenek >> Without RESTORE the database with the different name you will be able to >> check it out? >> >> >> "Zenek" <zing***@op.pl> wrote in message news:e4n9l6$min$1@news.onet.pl... >>> 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 >> > > 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. These backups come from different peoples, has different names and I must (want very much) to know databases versions, without RESTORE, without SERVER! :) On Sun, 21 May 2006 19:09:45 +0200, Zenek wrote:
(snip) >I have my small program for several database's operations and I Hi Zenek,>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. Let me check if I understand you correctly: you want to code your own program that looks in SQL Server database backup file, then reads the first couple of hunderd (or more) bytes to get some information about the database that it's a backup of? To write such a program, you'd have to know how a SQL Server backup file is structured. As far as I know, Microsoft has not disclosed this information. That leaves you with pretty few options. Debugging or otherwise revere engineering the source code is explicitly prohibited in the license. I'm not sure if attempting to analyze the backup file's structure by examining it and/or by trial and error is also included in this provision - you'd have to consult a lawyer to find out. As far as I can tell, this leaves you with only one option - contact Microsoft and ask them under what conditions they'd be willing to share either the backup file format or the source code of the backup or restore routines with you. I'm afraid your odds are pretty slim, but it never hurts to ask... -- Hugo Kornelis, SQL Server MVP Zenek (zing***@op.pl) writes:
> I have my small program for several database's operations and I First of all, this topic is discussed both in this newsgroup and in> 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. > These backups come from different peoples, has different names and I > must (want very much) to know databases versions, without RESTORE, > without SERVER! :) comp.databases.ms-sqlserver. Please do not post the same question to multiple newsgroups indepentently. You have not made a very good job in explaining what you are looking for. First I got the impression was that the data you were looking for was data in aome table in the database. But the above indicates that you want to read metadata about the backup itself. In such cases, there is no need to restore the entire database. Instead you can use RESTORE HEADERONLY to get this information. Yes, I know you've said you want to do this without server or library, but that is such a hopelessly dead end, that you have no choice but to discard it. -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
|||||||||||||||||||||||