Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restoring a BAK from a SQL 2000 system to 2005

Status
Not open for further replies.

runnerlk

MIS
Jul 19, 2002
41
US
I have a BAK file from a SQL2000 std ed, I am attempting to restore it to a 2005 system, I am getting the following error:

system.data.sqlclient.sqlerror:directory lookup for the file C:\program Files\xx\cds.data.dat cannot find the specified path.

One of my customers provided me with the BAK file and i am attempting to restore to my system.

Thanks,

Lou
 
You need to change the restore as path on the options page of the restore wizard. You need to change it to a valid path.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Hi thanks for the assistance, when I change the path I now get the following error:

System.Data.SqlClient.SqlError: File 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\NCRB_CDS' is claimed by 'CDS_INDEX'(3) and 'CDS_DATA'(1). The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo)
 
That is correct, you must use the WITH MOVE option in your restore. Can you post you restore code.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Paul,

When I run restore with filelistonly I get:

CDS_DATA C:\Program Files\Softheon InsignIO\Repository\Database\MSSQL\CDS_DATA.DAT D PRIMARY 11534336 35184372080640 1 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 1 NULL 7195000000007700004 26A33186-BF3F-45EF-8D4A-1D49DA8E3B6F 0 1
CDS_INDEX C:\Program Files\Softheon InsignIO\Repository\Database\MSSQL\CDS_INDEX.DAT D seg_index 4325376 35184372080640 3 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 2 NULL 7195000000007700004 26A33186-BF3F-45EF-8D4A-1D49DA8E3B6F 0 1
CDS_LOG C:\Program Files\Softheon InsignIO\Repository\Database\MSSQL\CDS_LOG.DAT L NULL 16908288 35184372080640 2 0 0 00000000-0000-0000-0000-000000000000 0 0 0 512 0 NULL 0 00000000-0000-0000-0000-000000000000 0 0

Then I execute:

RESTORE DATABASE CDS_DATA
FROM DISK = 'C:\Wip\NCRB\cds.bak'
WITH MOVE 'cds_data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\cds_data.mdf',
MOVE 'cds_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\cds_log.ldf',
MOVE 'CDS_INDEX.DAT' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\cds_INDEX.DAT'

Results:

(3 row(s) affected)
Msg 3234, Level 16, State 2, Line 6
Logical file 'CDS_INDEX.DAT' is not part of database 'CDS_DATA'. Use RESTORE FILELISTONLY to list the logical file names.
Msg 3013, Level 16, State 1, Line 6
RESTORE DATABASE is terminating abnormally.


Thanks,

Lou
 
don't include this line. It's not part of the backup.

MOVE 'CDS_INDEX.DAT' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\cds_INDEX.DAT'

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
When i remove the line I get this:

RESTORE DATABASE CDS_DATA
FROM DISK = 'C:\Wip\NCRB\cds.bak'
WITH MOVE 'cds_data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\cds_data.mdf',
MOVE 'cds_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\cds_log.ldf'


Msg 5105, Level 16, State 2, Line 1
Device activation error. The physical file name 'C:\Program Files\Softheon InsignIO\Repository\Database\MSSQL\CDS_INDEX.DAT' may be incorrect.
Msg 3156, Level 16, State 1, Line 1
File 'CDS_INDEX' cannot be restored to 'C:\Program Files\Softheon InsignIO\Repository\Database\MSSQL\CDS_INDEX.DAT'. Use WITH MOVE to identify a valid location for the file.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

Keeps referencing CDS_INDEX.SAT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top