Weird question ...

Weird question ...

Post by Randy gas » Sun, 03 Feb 2002 12:23:57



Is there any waty of telling what database is related to
a backup file ... from the backup ??
 
 
 

Weird question ...

Post by lindawi » Sun, 03 Feb 2002 12:45:04


Randy,

Look at RESTORE HEADERONLY and RESTORE FILELISTONLY in Books Online. You
should get the information you need from them.

Linda


Quote:> Is there any waty of telling what database is related to
> a backup file ... from the backup ??


 
 
 

Weird question ...

Post by Randy Gas » Sun, 03 Feb 2002 13:00:41


Linda,  

It's bad ... lol ... real bad.
They gave me a backup for 7.0.  I am trying to restore it
in 2000 ( db created from scripts ).  The backup doesn't
show up as a backup of the db i have created ... There is
no "device" wahoo ... :)

>-----Original Message-----
>Randy,

>Look at RESTORE HEADERONLY and RESTORE FILELISTONLY in
Books Online. You
>should get the information you need from them.

>Linda



>> Is there any waty of telling what database is related
to
>> a backup file ... from the backup ??

>.

 
 
 

Weird question ...

Post by John Peterso » Sun, 03 Feb 2002 13:20:41


Randy,

From Query Analyzer, you might be able to do something like:

restore database <DatabaseNameNew>
   from disk = '<PathRelativeToSQLServer>\<BackupFile>'
   with replace,
        stats,
        move '<DatabaseNameOld>_Data' to '<DatabaseNameNew>_Data.mdf',
        move '<DatabaseNameOld>_Log'  to '<DatabaseNameNew>_Log.ldf'

Sometimes you may need to include explicit path information in the "to"
section of the "move"s.  This also assumes that the new database has been
created.  :-)


> Linda,

> It's bad ... lol ... real bad.
> They gave me a backup for 7.0.  I am trying to restore it
> in 2000 ( db created from scripts ).  The backup doesn't
> show up as a backup of the db i have created ... There is
> no "device" wahoo ... :)

> >-----Original Message-----
> >Randy,

> >Look at RESTORE HEADERONLY and RESTORE FILELISTONLY in
> Books Online. You
> >should get the information you need from them.

> >Linda



> >> Is there any waty of telling what database is related
> to
> >> a backup file ... from the backup ??

> >.

 
 
 

Weird question ...

Post by Mike Joh » Sun, 03 Feb 2002 20:42:34


lookup filelistonly or headeronly  options of restore command and you will
see how to list the contents of a backup file.

Mike John


Quote:> Is there any waty of telling what database is related to
> a backup file ... from the backup ??

 
 
 

Weird question ...

Post by Randy Gas » Sun, 03 Feb 2002 23:58:39


John,

Do you ever get the feeling that people are trying to
tell you something ? hahaha ... thanx all, it worked !

Quote:>-----Original Message-----
>Randy,

>From Query Analyzer, you might be able to do something
like:

>restore database <DatabaseNameNew>
>   from disk = '<PathRelativeToSQLServer>\<BackupFile>'
>   with replace,
>        stats,
>        move '<DatabaseNameOld>_Data'

to '<DatabaseNameNew>_Data.mdf',
Quote:>        move '<DatabaseNameOld>_Log'  

to '<DatabaseNameNew>_Log.ldf'
Quote:

>Sometimes you may need to include explicit path

information in the "to"
>section of the "move"s.  This also assumes that the new
database has been
>created.  :-)



>> Linda,

>> It's bad ... lol ... real bad.
>> They gave me a backup for 7.0.  I am trying to restore
it
>> in 2000 ( db created from scripts ).  The backup
doesn't
>> show up as a backup of the db i have created ... There
is
>> no "device" wahoo ... :)

>> >-----Original Message-----
>> >Randy,

>> >Look at RESTORE HEADERONLY and RESTORE FILELISTONLY in
>> Books Online. You
>> >should get the information you need from them.

>> >Linda



>> >> Is there any waty of telling what database is
related
>> to
>> >> a backup file ... from the backup ??

>> >.

>.