Showing posts with label old. Show all posts
Showing posts with label old. Show all posts

Friday, March 30, 2012

Restore.RelocateFiles

Hi,

I'm trying to restore a *.bak file into a different database.

Old Database SVW_TEST (from where the *.bak file is):

SVW_TEST_DATA - d:\SVW_TEST_DATA.mdf
SVW_TEST_DATA - d:\SVW_TEST_LOG.ldf

New Database SVW (to restore to):

SVW_DATA - d:\SVW_DATA.mdf
SVW_DATA - d:\SVW_LOG.ldf

I used the following code:

Dim pRestore As New Restore

pRestore.Action = SQLDMORestore_Database
pRestore.Database = "SVW"
pRestore.ReplaceDatabase = True

pRestore.Files = "D:\SVW_TEST.bak"

pRestore.RelocateFiles = "SVW_Test_Data, D:\SVW_DATA.mdf, SVW_TEST_LOG, D:\SVW_LOG.ldf"

pRestore.SQLRestore pServer

But it would work: I get an error saying that "The logical file 'SQL' is not part of the SVW-Database". Why 'SQL' ??
I also tried this version:

pRestore.RelocateFiles = "SVW_Data, D:\SVW_DATA.mdf, SVW_LOG, D:\SVW_LOG.ldf"

There I get an error saying that "The logical file 'SVW_DATA' is not part of the SVW-Database".

Can someone please help.I found the problem myself. I just had to put [] arround the names:

pRestore.RelocateFiles = "[SVW_Test_Data], [D:\SVW_DATA.mdf], [SVW_TEST_LOG], [D:\SVW_LOG.ldf]"

eventhough in some examples i found, it was with out them......

Wednesday, March 21, 2012

restore sql 2000 bak to 2005

Hi,
I have an old 2000 bak file for a db that I would now like restored
onto sql server 2005. I keep erroring out though, this is what I'm
doing:
Went to Restore Database in sql 2005, selected the db I want it
restored to, and File (say c:\temp\xyz.bak)
Checked the restore checkbox, went to options checked Overwrite the
existing database.

Do I need to do anything else, maybe in the Restore the database files
as section? As those path are listed as:
C:\Program Files\Microsoft SQL Server\MSSQL\data\xyz.mdf
C:\Program Files\Microsoft SQL Server\MSSQL\data\xyz_log.ldf

If I just run it without updating those mdf and ldf paths, I keep
getting an error:
Exclusive Access could not be obtained because the database is in use.

Thanks.phil2phil (philtwophil@.yahoo.com) writes:

Quote:

Originally Posted by

I have an old 2000 bak file for a db that I would now like restored
onto sql server 2005. I keep erroring out though, this is what I'm
doing:
Went to Restore Database in sql 2005, selected the db I want it
restored to, and File (say c:\temp\xyz.bak)
Checked the restore checkbox, went to options checked Overwrite the
existing database.
>
Do I need to do anything else, maybe in the Restore the database files
as section? As those path are listed as:
C:\Program Files\Microsoft SQL Server\MSSQL\data\xyz.mdf
C:\Program Files\Microsoft SQL Server\MSSQL\data\xyz_log.ldf
>
If I just run it without updating those mdf and ldf paths, I keep
getting an error:
Exclusive Access could not be obtained because the database is in use.


Apparently there are one or more processes active in that database. Be
careful, it could be yourself. For instance, if you are on that node
in the Object Explorer.

Do you want to replace the existing database with the backup?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Yes i wanted to replace the existing on with this one.

Erland Sommarskog wrote:

Quote:

Originally Posted by

phil2phil (philtwophil@.yahoo.com) writes:

Quote:

Originally Posted by

I have an old 2000 bak file for a db that I would now like restored
onto sql server 2005. I keep erroring out though, this is what I'm
doing:
Went to Restore Database in sql 2005, selected the db I want it
restored to, and File (say c:\temp\xyz.bak)
Checked the restore checkbox, went to options checked Overwrite the
existing database.

Do I need to do anything else, maybe in the Restore the database files
as section? As those path are listed as:
C:\Program Files\Microsoft SQL Server\MSSQL\data\xyz.mdf
C:\Program Files\Microsoft SQL Server\MSSQL\data\xyz_log.ldf

If I just run it without updating those mdf and ldf paths, I keep
getting an error:
Exclusive Access could not be obtained because the database is in use.


>
Apparently there are one or more processes active in that database. Be
careful, it could be yourself. For instance, if you are on that node
in the Object Explorer.
>
Do you want to replace the existing database with the backup?
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Tuesday, March 20, 2012

Restore script restoring to old version of the database

A month ago I set up a small program to backup my databases – it ran the
following script against the database:
BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
NOINIT, PASSWORD='xxx', RETAINDAYS=90
This was run every day and saves the backup to a removable USB drive which
is taken off-site at night. The backed up file grew every time the script
was run – so I assumed it was working fine and left it to it.
Then yesterday I had a main drive failure and spent the day rebuilding my
machine. Then I went to restore my databases with the following script (in
query analyzer) (note the MOVE was needed as I am storing the data files in
a
different location now):
RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE 'MyDatabase_Log'
TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
But to my horror it has only restored the database to the point it was in a
month ago when I first started these backups – I appear to have lost a mon
ths
worth of data.
The .Bak file has a modified datetime equal to the last time the script was
run (the night before last) – so the backups were happening. What am I do
ing
wrong here? Note that the recovery model was set to FULL.
Please help.Hi
Looks like you appended each new backup into the same file. With your
restore script, you restored the 1st one.
Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
that the file contains. Then use that information to do a RESTORE DATABASE.
If you do the restore though enterprise manager, it will the backups too and
then you can select which one you want to restore.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>A month ago I set up a small program to backup my databases - it ran the
> following script against the database:
> BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
> NOINIT, PASSWORD='xxx', RETAINDAYS=90
> This was run every day and saves the backup to a removable USB drive which
> is taken off-site at night. The backed up file grew every time the script
> was run - so I assumed it was working fine and left it to it.
> Then yesterday I had a main drive failure and spent the day rebuilding my
> machine. Then I went to restore my databases with the following script
> (in
> query analyzer) (note the MOVE was needed as I am storing the data files
> in a
> different location now):
> RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
> WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE
> 'MyDatabase_Log'
> TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
> But to my horror it has only restored the database to the point it was in
> a
> month ago when I first started these backups - I appear to have lost a
> months
> worth of data.
> The .Bak file has a modified datetime equal to the last time the script
> was
> run (the night before last) - so the backups were happening. What am I
> doing
> wrong here? Note that the recovery model was set to FULL.
> Please help.|||Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
BackupDescription fields are all Null. So how do I specify that I want to
restore the last one?
Also – I can’t use Enterprise Manager because it doesn’t have the opti
on to
specify a password – so I have to use a script.
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> Looks like you appended each new backup into the same file. With your
> restore script, you restored the 1st one.
> Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
> that the file contains. Then use that information to do a RESTORE DATABASE
.
> If you do the restore though enterprise manager, it will the backups too a
nd
> then you can select which one you want to restore.
>
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
> news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>
>|||Ahhhh - Problem solved. I needed to add FILE=13 to the WITH parameters:
RESTORE DATABASE MyDatabase
FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH FILE=13,
MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf',
MOVE 'MyDatabase_Log' TO 'D:\SQLData\Mydatabase_Log.ldf',
Password='xxx'
Many thanks Mike for pointing me in the right direction!
"RodneyL" wrote:
[vbcol=seagreen]
> Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
> BackupDescription fields are all Null. So how do I specify that I want to
> restore the last one?
> Also – I can’t use Enterprise Manager because it doesn’t have the op
tion to
> specify a password – so I have to use a script.
>
> "Mike Epprecht (SQL MVP)" wrote:
>

Restore script restoring to old version of the database

A month ago I set up a small program to backup my databases – it ran the
following script against the database:
BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
NOINIT, PASSWORD='xxx', RETAINDAYS=90
This was run every day and saves the backup to a removable USB drive which
is taken off-site at night. The backed up file grew every time the script
was run – so I assumed it was working fine and left it to it.
Then yesterday I had a main drive failure and spent the day rebuilding my
machine. Then I went to restore my databases with the following script (in
query analyzer) (note the MOVE was needed as I am storing the data files in a
different location now):
RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE 'MyDatabase_Log'
TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
But to my horror it has only restored the database to the point it was in a
month ago when I first started these backups – I appear to have lost a months
worth of data.
The .Bak file has a modified datetime equal to the last time the script was
run (the night before last) – so the backups were happening. What am I doing
wrong here? Note that the recovery model was set to FULL.
Please help.
Hi
Looks like you appended each new backup into the same file. With your
restore script, you restored the 1st one.
Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
that the file contains. Then use that information to do a RESTORE DATABASE.
If you do the restore though enterprise manager, it will the backups too and
then you can select which one you want to restore.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>A month ago I set up a small program to backup my databases - it ran the
> following script against the database:
> BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
> NOINIT, PASSWORD='xxx', RETAINDAYS=90
> This was run every day and saves the backup to a removable USB drive which
> is taken off-site at night. The backed up file grew every time the script
> was run - so I assumed it was working fine and left it to it.
> Then yesterday I had a main drive failure and spent the day rebuilding my
> machine. Then I went to restore my databases with the following script
> (in
> query analyzer) (note the MOVE was needed as I am storing the data files
> in a
> different location now):
> RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
> WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE
> 'MyDatabase_Log'
> TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
> But to my horror it has only restored the database to the point it was in
> a
> month ago when I first started these backups - I appear to have lost a
> months
> worth of data.
> The .Bak file has a modified datetime equal to the last time the script
> was
> run (the night before last) - so the backups were happening. What am I
> doing
> wrong here? Note that the recovery model was set to FULL.
> Please help.
|||Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
BackupDescription fields are all Null. So how do I specify that I want to
restore the last one?
Also – I can’t use Enterprise Manager because it doesn’t have the option to
specify a password – so I have to use a script.
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> Looks like you appended each new backup into the same file. With your
> restore script, you restored the 1st one.
> Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
> that the file contains. Then use that information to do a RESTORE DATABASE.
> If you do the restore though enterprise manager, it will the backups too and
> then you can select which one you want to restore.
>
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
> news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>
>
|||Ahhhh - Problem solved. I needed to add FILE=13 to the WITH parameters:
RESTORE DATABASE MyDatabase
FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH FILE=13,
MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf',
MOVE 'MyDatabase_Log' TO 'D:\SQLData\Mydatabase_Log.ldf',
Password='xxx'
Many thanks Mike for pointing me in the right direction!
"RodneyL" wrote:
[vbcol=seagreen]
> Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
> BackupDescription fields are all Null. So how do I specify that I want to
> restore the last one?
> Also – I can’t use Enterprise Manager because it doesn’t have the option to
> specify a password – so I have to use a script.
>
> "Mike Epprecht (SQL MVP)" wrote:

Restore script restoring to old version of the database

A month ago I set up a small program to backup my databases â' it ran the
following script against the database:
BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
NOINIT, PASSWORD='xxx', RETAINDAYS=90
This was run every day and saves the backup to a removable USB drive which
is taken off-site at night. The backed up file grew every time the script
was run â' so I assumed it was working fine and left it to it.
Then yesterday I had a main drive failure and spent the day rebuilding my
machine. Then I went to restore my databases with the following script (in
query analyzer) (note the MOVE was needed as I am storing the data files in a
different location now):
RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE 'MyDatabase_Log'
TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
But to my horror it has only restored the database to the point it was in a
month ago when I first started these backups â' I appear to have lost a months
worth of data.
The .Bak file has a modified datetime equal to the last time the script was
run (the night before last) â' so the backups were happening. What am I doing
wrong here? Note that the recovery model was set to FULL.
Please help.Hi
Looks like you appended each new backup into the same file. With your
restore script, you restored the 1st one.
Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
that the file contains. Then use that information to do a RESTORE DATABASE.
If you do the restore though enterprise manager, it will the backups too and
then you can select which one you want to restore.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>A month ago I set up a small program to backup my databases - it ran the
> following script against the database:
> BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
> NOINIT, PASSWORD='xxx', RETAINDAYS=90
> This was run every day and saves the backup to a removable USB drive which
> is taken off-site at night. The backed up file grew every time the script
> was run - so I assumed it was working fine and left it to it.
> Then yesterday I had a main drive failure and spent the day rebuilding my
> machine. Then I went to restore my databases with the following script
> (in
> query analyzer) (note the MOVE was needed as I am storing the data files
> in a
> different location now):
> RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
> WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE
> 'MyDatabase_Log'
> TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
> But to my horror it has only restored the database to the point it was in
> a
> month ago when I first started these backups - I appear to have lost a
> months
> worth of data.
> The .Bak file has a modified datetime equal to the last time the script
> was
> run (the night before last) - so the backups were happening. What am I
> doing
> wrong here? Note that the recovery model was set to FULL.
> Please help.|||Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
BackupDescription fields are all Null. So how do I specify that I want to
restore the last one?
Also â' I canâ't use Enterprise Manager because it doesnâ't have the option to
specify a password â' so I have to use a script.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Looks like you appended each new backup into the same file. With your
> restore script, you restored the 1st one.
> Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
> that the file contains. Then use that information to do a RESTORE DATABASE.
> If you do the restore though enterprise manager, it will the backups too and
> then you can select which one you want to restore.
>
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
> news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
> >A month ago I set up a small program to backup my databases - it ran the
> > following script against the database:
> >
> > BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
> > NOINIT, PASSWORD='xxx', RETAINDAYS=90
> >
> > This was run every day and saves the backup to a removable USB drive which
> > is taken off-site at night. The backed up file grew every time the script
> > was run - so I assumed it was working fine and left it to it.
> >
> > Then yesterday I had a main drive failure and spent the day rebuilding my
> > machine. Then I went to restore my databases with the following script
> > (in
> > query analyzer) (note the MOVE was needed as I am storing the data files
> > in a
> > different location now):
> >
> > RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
> > WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE
> > 'MyDatabase_Log'
> > TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
> >
> > But to my horror it has only restored the database to the point it was in
> > a
> > month ago when I first started these backups - I appear to have lost a
> > months
> > worth of data.
> >
> > The .Bak file has a modified datetime equal to the last time the script
> > was
> > run (the night before last) - so the backups were happening. What am I
> > doing
> > wrong here? Note that the recovery model was set to FULL.
> >
> > Please help.
>
>|||Ahhhh - Problem solved. I needed to add FILE=13 to the WITH parameters:
RESTORE DATABASE MyDatabase
FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH FILE=13,
MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf',
MOVE 'MyDatabase_Log' TO 'D:\SQLData\Mydatabase_Log.ldf',
Password='xxx'
Many thanks Mike for pointing me in the right direction!
"RodneyL" wrote:
> Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
> BackupDescription fields are all Null. So how do I specify that I want to
> restore the last one?
> Also â' I canâ't use Enterprise Manager because it doesnâ't have the option to
> specify a password â' so I have to use a script.
>
> "Mike Epprecht (SQL MVP)" wrote:
> > Hi
> >
> > Looks like you appended each new backup into the same file. With your
> > restore script, you restored the 1st one.
> >
> > Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
> > that the file contains. Then use that information to do a RESTORE DATABASE.
> >
> > If you do the restore though enterprise manager, it will the backups too and
> > then you can select which one you want to restore.
> >
> >
> >
> > --
> > --
> > Mike Epprecht, Microsoft SQL Server MVP
> > Zurich, Switzerland
> >
> > IM: mike@.epprecht.net
> >
> > MVP Program: http://www.microsoft.com/mvp
> >
> > Blog: http://www.msmvps.com/epprecht/
> >
> > "RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
> > news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
> > >A month ago I set up a small program to backup my databases - it ran the
> > > following script against the database:
> > >
> > > BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
> > > NOINIT, PASSWORD='xxx', RETAINDAYS=90
> > >
> > > This was run every day and saves the backup to a removable USB drive which
> > > is taken off-site at night. The backed up file grew every time the script
> > > was run - so I assumed it was working fine and left it to it.
> > >
> > > Then yesterday I had a main drive failure and spent the day rebuilding my
> > > machine. Then I went to restore my databases with the following script
> > > (in
> > > query analyzer) (note the MOVE was needed as I am storing the data files
> > > in a
> > > different location now):
> > >
> > > RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
> > > WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE
> > > 'MyDatabase_Log'
> > > TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
> > >
> > > But to my horror it has only restored the database to the point it was in
> > > a
> > > month ago when I first started these backups - I appear to have lost a
> > > months
> > > worth of data.
> > >
> > > The .Bak file has a modified datetime equal to the last time the script
> > > was
> > > run (the night before last) - so the backups were happening. What am I
> > > doing
> > > wrong here? Note that the recovery model was set to FULL.
> > >
> > > Please help.
> >
> >
> >

Monday, March 12, 2012

Restore Problem from an unkown .BAK file

Hi
I am trying to restore an old database may be done in SQL 6.5 into 7.0 or 2000. I dont know what is the database name given at that time or the backup device name used earlier. I just have this .BAK file through which I must restore the database. Is there anyway in which I can restore the database
If anybody can help I would greatful
Thanks
Srinivas RaoYou cannot restore 6.5 backups into SQL Server 7.0 or 2000. You should first
restore this into 6.5 and then use BCP or DTS to move the data from 6.5 to
7.0/2000.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Srinivas Rao" <asraogoud@.yahoo.com> wrote in message
news:E9BE3713-3E91-4419-8167-EC2F244E0CF8@.microsoft.com...
Hi,
I am trying to restore an old database may be done in SQL 6.5 into 7.0 or
2000. I dont know what is the database name given at that time or the backup
device name used earlier. I just have this .BAK file through which I must
restore the database. Is there anyway in which I can restore the database?
If anybody can help I would greatful.
Thanks.
Srinivas Rao|||Hi Srinivas,
You cannot restore the database backups /files of SQL
Server 6.5 to SQL Server 7.0/2000. I would suggest you to
install SQL Server 6.5 ( if you dont have it)on a test
server, restore the .BAK file, then upgrade 6.5 to SQL
Server 7.0/2000 , take a backup and restore on the real
server.
Also You cannot restore a SQL Server 2000 database backup
to a SQL Server 7.0 server.
The following KB's are for ur reference.
http://www.support.microsoft.com/?id=314546 Moving DB's
between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL
Server Databases
to a New Location with Detach/Attach
http://www.support.microsoft.com/?id=246133 How To
Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins
& SIDs after a
Restore
http://www.support.microsoft.com/?id=168001 User Logon
and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve
Permission
Issues When a Database Is Moved Between SQL Servers
Regards
Thirumal Reddy M.
System Administrator
www.sstil.com
>--Original Message--
>Hi,
>I am trying to restore an old database may be done in SQL
6.5 into 7.0 or 2000. I dont know what is the database
name given at that time or the backup device name used
earlier. I just have this .BAK file through which I must
restore the database. Is there anyway in which I can
restore the database?
>If anybody can help I would greatful.
>
>Thanks.
>Srinivas Rao
>.
>|||Hi,
SQL 6.5 backup file can not be restored to SQL 7 or SQL 2000. You have to
use Upgrade wizard to upgrade the database from SQL 6.5 to SQL 7/2000. For
that you should have SQL 6.5 database up.
If it is SQL 7/2000 then use the below statement in query analyzer to get
file info,
Restore filelistonly from disk='driveletter\folder\dbname.bak'
After that you can use any database name to restore the backup file. Execute
the below statement to restore the database.
Restore database dbname from disk='driveletter\folder\dbname.bak' with
stas=10 ,
move 'logical_datafilename' to 'physical_dataname',
move 'logical_logfilename' to 'physical_logname'
Thanks
Hari
MCDBA
"Srinivas Rao" <asraogoud@.yahoo.com> wrote in message
news:E9BE3713-3E91-4419-8167-EC2F244E0CF8@.microsoft.com...
> Hi,
> I am trying to restore an old database may be done in SQL 6.5 into 7.0 or
2000. I dont know what is the database name given at that time or the backup
device name used earlier. I just have this .BAK file through which I must
restore the database. Is there anyway in which I can restore the database?
> If anybody can help I would greatful.
>
> Thanks.
> Srinivas Rao

Restore Problem from an unkown .BAK file

Hi,
I am trying to restore an old database may be done in SQL 6.5 into 7.0 or 20
00. I dont know what is the database name given at that time or the backup d
evice name used earlier. I just have this .BAK file through which I must res
tore the database. Is there
anyway in which I can restore the database?
If anybody can help I would greatful.
Thanks.
Srinivas RaoYou cannot restore 6.5 backups into SQL Server 7.0 or 2000. You should first
restore this into 6.5 and then use BCP or DTS to move the data from 6.5 to
7.0/2000.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Srinivas Rao" <asraogoud@.yahoo.com> wrote in message
news:E9BE3713-3E91-4419-8167-EC2F244E0CF8@.microsoft.com...
Hi,
I am trying to restore an old database may be done in SQL 6.5 into 7.0 or
2000. I dont know what is the database name given at that time or the backup
device name used earlier. I just have this .BAK file through which I must
restore the database. Is there anyway in which I can restore the database?
If anybody can help I would greatful.
Thanks.
Srinivas Rao|||Hi,
SQL 6.5 backup file can not be restored to SQL 7 or SQL 2000. You have to
use Upgrade wizard to upgrade the database from SQL 6.5 to SQL 7/2000. For
that you should have SQL 6.5 database up.
If it is SQL 7/2000 then use the below statement in query analyzer to get
file info,
Restore filelistonly from disk='driveletter\folder\dbname.bak'
After that you can use any database name to restore the backup file. Execute
the below statement to restore the database.
Restore database dbname from disk='driveletter\folder\dbname.bak' with
stas=10 ,
move 'logical_datafilename' to 'physical_dataname',
move 'logical_logfilename' to 'physical_logname'
Thanks
Hari
MCDBA
"Srinivas Rao" <asraogoud@.yahoo.com> wrote in message
news:E9BE3713-3E91-4419-8167-EC2F244E0CF8@.microsoft.com...
> Hi,
> I am trying to restore an old database may be done in SQL 6.5 into 7.0 or
2000. I dont know what is the database name given at that time or the backup
device name used earlier. I just have this .BAK file through which I must
restore the database. Is there anyway in which I can restore the database?
> If anybody can help I would greatful.
>
> Thanks.
> Srinivas Rao