I created a complete backup of a SQL Server 7 database so that I can
recreate it on a SQL Server 2000 database.
I tried 2 options but got the following errors.
1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
of the database and tried restoring it. I selected the backup
BaseFinal_Backup.BAK as the device.
Microsoft SQL-DMO (ODBC SQLState: 42000)
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
'BaseFinal_Data' cannot be restored to
'E:\Mssql\Data\BaseFinal_Data.mdf'.
Use WITH MOVE to identify a valid location for the file.
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
WITH MOVE to identify a valid location for the file.
RESTORE DATABASE is terminating abnormally.
2. Using EM, I created an empty BaseFinal database. Using Tools |
Restore Database, selected BaseFinal and tried restoring it selecting
the device from my C drive.
Microsoft SQL-DMO (ODBC SQLState: 42000)
The backup set holds a backup of a database other than the existing
'BaseFinal' database.
RESTORE DATABASE is terminating abnormally.
Thanks.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!When you are restoring with EM, check the Options tab, part "Restore
database files as:" in the middle. There you can change the path to the
files, so it points to a valid drive and folder.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
> I created a complete backup of a SQL Server 7 database so that I can
> recreate it on a SQL Server 2000 database.
> I tried 2 options but got the following errors.
> 1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
> of the database and tried restoring it. I selected the backup
> BaseFinal_Backup.BAK as the device.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
> 'BaseFinal_Data' cannot be restored to
> 'E:\Mssql\Data\BaseFinal_Data.mdf'.
> Use WITH MOVE to identify a valid location for the file.
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
> cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> RESTORE DATABASE is terminating abnormally.
> 2. Using EM, I created an empty BaseFinal database. Using Tools |
> Restore Database, selected BaseFinal and tried restoring it selecting
> the device from my C drive.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> The backup set holds a backup of a database other than the existing
> 'BaseFinal' database.
> RESTORE DATABASE is terminating abnormally.
> Thanks.
> PLEASE REPLY TO THE GROUP. THANKS.
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!|||Hi,
It seems you have given a physical location which is not in the new server
(Drive and directory) while loading in SQL 2000.
Please follow the below steps in query analyzer:-
Restore filelistonly from disk='c:\backup\dbname.bak'
( replace the 'c:\backup\dbname.bak' with the actual backup file name with
path where the file resides.)
This will give you the Logical and Physical file names of the Backup file
name. While loading you should give the
correct logical file name and the place to keep the physical file. But
Physical file name can be a diffrent one.
Restore Database <dbname> from disk= 'c:\backup\dbname.bak' with
move 'logical_mdf_name' to 'c:\mssql\data\phys_data_name.mdf',
move 'logical_ldf_name' to 'c:\mssql\data\phys_log_name.ldf'
(Replace the logical_mdf_name and logical_ldf_name with the logical name you
got from RESTORE FILELISTONLY command.
Ensure that the directory give in physical file name is there in the server)
Thanks
Hari
MCDBA
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:unJyQaFiEHA.4064@.TK2MSFTNGP12.phx.gbl...
> When you are restoring with EM, check the Options tab, part "Restore
> database files as:" in the middle. There you can change the path to the
> files, so it points to a valid drive and folder.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
> news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
>|||The following code did the trick.
RESTORE FILELISTONLY
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
RESTORE DATABASE DB1639
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
WITH MOVE 'DBFinal_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Data.mdf',
MOVE 'DBFinal_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Log.ldf'
GO
Thanks for the help.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
Showing posts with label sql-dmo. Show all posts
Showing posts with label sql-dmo. Show all posts
Wednesday, March 21, 2012
Restore database error: Microsoft SQL-DMO (ODBC SQLState: 42000)
I created a complete backup of a SQL Server 7 database so that I can
recreate it on a SQL Server 2000 database.
I tried 2 options but got the following errors.
1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
of the database and tried restoring it. I selected the backup
BaseFinal_Backup.BAK as the device.
Microsoft SQL-DMO (ODBC SQLState: 42000)
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
'BaseFinal_Data' cannot be restored to
'E:\Mssql\Data\BaseFinal_Data.mdf'.
Use WITH MOVE to identify a valid location for the file.
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
WITH MOVE to identify a valid location for the file.
RESTORE DATABASE is terminating abnormally.
2. Using EM, I created an empty BaseFinal database. Using Tools |
Restore Database, selected BaseFinal and tried restoring it selecting
the device from my C drive.
Microsoft SQL-DMO (ODBC SQLState: 42000)
The backup set holds a backup of a database other than the existing
'BaseFinal' database.
RESTORE DATABASE is terminating abnormally.
Thanks.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
When you are restoring with EM, check the Options tab, part "Restore
database files as:" in the middle. There you can change the path to the
files, so it points to a valid drive and folder.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
> I created a complete backup of a SQL Server 7 database so that I can
> recreate it on a SQL Server 2000 database.
> I tried 2 options but got the following errors.
> 1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
> of the database and tried restoring it. I selected the backup
> BaseFinal_Backup.BAK as the device.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
> 'BaseFinal_Data' cannot be restored to
> 'E:\Mssql\Data\BaseFinal_Data.mdf'.
> Use WITH MOVE to identify a valid location for the file.
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
> cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> RESTORE DATABASE is terminating abnormally.
> 2. Using EM, I created an empty BaseFinal database. Using Tools |
> Restore Database, selected BaseFinal and tried restoring it selecting
> the device from my C drive.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> The backup set holds a backup of a database other than the existing
> 'BaseFinal' database.
> RESTORE DATABASE is terminating abnormally.
> Thanks.
> PLEASE REPLY TO THE GROUP. THANKS.
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi,
It seems you have given a physical location which is not in the new server
(Drive and directory) while loading in SQL 2000.
Please follow the below steps in query analyzer:-
Restore filelistonly from disk='c:\backup\dbname.bak'
( replace the 'c:\backup\dbname.bak' with the actual backup file name with
path where the file resides.)
This will give you the Logical and Physical file names of the Backup file
name. While loading you should give the
correct logical file name and the place to keep the physical file. But
Physical file name can be a diffrent one.
Restore Database <dbname> from disk= 'c:\backup\dbname.bak' with
move 'logical_mdf_name' to 'c:\mssql\data\phys_data_name.mdf',
move 'logical_ldf_name' to 'c:\mssql\data\phys_log_name.ldf'
(Replace the logical_mdf_name and logical_ldf_name with the logical name you
got from RESTORE FILELISTONLY command.
Ensure that the directory give in physical file name is there in the server)
Thanks
Hari
MCDBA
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si > wrote in
message news:unJyQaFiEHA.4064@.TK2MSFTNGP12.phx.gbl...
> When you are restoring with EM, check the Options tab, part "Restore
> database files as:" in the middle. There you can change the path to the
> files, so it points to a valid drive and folder.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
> news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
>
|||The following code did the trick.
RESTORE FILELISTONLY
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
RESTORE DATABASE DB1639
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
WITH MOVE 'DBFinal_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Data.mdf',
MOVE 'DBFinal_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Log.ldf'
GO
Thanks for the help.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
sql
recreate it on a SQL Server 2000 database.
I tried 2 options but got the following errors.
1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
of the database and tried restoring it. I selected the backup
BaseFinal_Backup.BAK as the device.
Microsoft SQL-DMO (ODBC SQLState: 42000)
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
'BaseFinal_Data' cannot be restored to
'E:\Mssql\Data\BaseFinal_Data.mdf'.
Use WITH MOVE to identify a valid location for the file.
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
WITH MOVE to identify a valid location for the file.
RESTORE DATABASE is terminating abnormally.
2. Using EM, I created an empty BaseFinal database. Using Tools |
Restore Database, selected BaseFinal and tried restoring it selecting
the device from my C drive.
Microsoft SQL-DMO (ODBC SQLState: 42000)
The backup set holds a backup of a database other than the existing
'BaseFinal' database.
RESTORE DATABASE is terminating abnormally.
Thanks.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
When you are restoring with EM, check the Options tab, part "Restore
database files as:" in the middle. There you can change the path to the
files, so it points to a valid drive and folder.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
> I created a complete backup of a SQL Server 7 database so that I can
> recreate it on a SQL Server 2000 database.
> I tried 2 options but got the following errors.
> 1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
> of the database and tried restoring it. I selected the backup
> BaseFinal_Backup.BAK as the device.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
> 'BaseFinal_Data' cannot be restored to
> 'E:\Mssql\Data\BaseFinal_Data.mdf'.
> Use WITH MOVE to identify a valid location for the file.
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
> cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> RESTORE DATABASE is terminating abnormally.
> 2. Using EM, I created an empty BaseFinal database. Using Tools |
> Restore Database, selected BaseFinal and tried restoring it selecting
> the device from my C drive.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> The backup set holds a backup of a database other than the existing
> 'BaseFinal' database.
> RESTORE DATABASE is terminating abnormally.
> Thanks.
> PLEASE REPLY TO THE GROUP. THANKS.
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi,
It seems you have given a physical location which is not in the new server
(Drive and directory) while loading in SQL 2000.
Please follow the below steps in query analyzer:-
Restore filelistonly from disk='c:\backup\dbname.bak'
( replace the 'c:\backup\dbname.bak' with the actual backup file name with
path where the file resides.)
This will give you the Logical and Physical file names of the Backup file
name. While loading you should give the
correct logical file name and the place to keep the physical file. But
Physical file name can be a diffrent one.
Restore Database <dbname> from disk= 'c:\backup\dbname.bak' with
move 'logical_mdf_name' to 'c:\mssql\data\phys_data_name.mdf',
move 'logical_ldf_name' to 'c:\mssql\data\phys_log_name.ldf'
(Replace the logical_mdf_name and logical_ldf_name with the logical name you
got from RESTORE FILELISTONLY command.
Ensure that the directory give in physical file name is there in the server)
Thanks
Hari
MCDBA
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si > wrote in
message news:unJyQaFiEHA.4064@.TK2MSFTNGP12.phx.gbl...
> When you are restoring with EM, check the Options tab, part "Restore
> database files as:" in the middle. There you can change the path to the
> files, so it points to a valid drive and folder.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
> news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
>
|||The following code did the trick.
RESTORE FILELISTONLY
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
RESTORE DATABASE DB1639
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
WITH MOVE 'DBFinal_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Data.mdf',
MOVE 'DBFinal_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Log.ldf'
GO
Thanks for the help.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
sql
Restore database error: Microsoft SQL-DMO (ODBC SQLState: 42000)
I created a complete backup of a SQL Server 7 database so that I can
recreate it on a SQL Server 2000 database.
I tried 2 options but got the following errors.
1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
of the database and tried restoring it. I selected the backup
BaseFinal_Backup.BAK as the device.
Microsoft SQL-DMO (ODBC SQLState: 42000)
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
'BaseFinal_Data' cannot be restored to
'E:\Mssql\Data\BaseFinal_Data.mdf'.
Use WITH MOVE to identify a valid location for the file.
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
WITH MOVE to identify a valid location for the file.
RESTORE DATABASE is terminating abnormally.
2. Using EM, I created an empty BaseFinal database. Using Tools |
Restore Database, selected BaseFinal and tried restoring it selecting
the device from my C drive.
Microsoft SQL-DMO (ODBC SQLState: 42000)
The backup set holds a backup of a database other than the existing
'BaseFinal' database.
RESTORE DATABASE is terminating abnormally.
Thanks.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!When you are restoring with EM, check the Options tab, part "Restore
database files as:" in the middle. There you can change the path to the
files, so it points to a valid drive and folder.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
> I created a complete backup of a SQL Server 7 database so that I can
> recreate it on a SQL Server 2000 database.
> I tried 2 options but got the following errors.
> 1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
> of the database and tried restoring it. I selected the backup
> BaseFinal_Backup.BAK as the device.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
> 'BaseFinal_Data' cannot be restored to
> 'E:\Mssql\Data\BaseFinal_Data.mdf'.
> Use WITH MOVE to identify a valid location for the file.
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
> cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> RESTORE DATABASE is terminating abnormally.
> 2. Using EM, I created an empty BaseFinal database. Using Tools |
> Restore Database, selected BaseFinal and tried restoring it selecting
> the device from my C drive.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> The backup set holds a backup of a database other than the existing
> 'BaseFinal' database.
> RESTORE DATABASE is terminating abnormally.
> Thanks.
> PLEASE REPLY TO THE GROUP. THANKS.
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Hi,
It seems you have given a physical location which is not in the new server
(Drive and directory) while loading in SQL 2000.
Please follow the below steps in query analyzer:-
Restore filelistonly from disk='c:\backup\dbname.bak'
( replace the 'c:\backup\dbname.bak' with the actual backup file name with
path where the file resides.)
This will give you the Logical and Physical file names of the Backup file
name. While loading you should give the
correct logical file name and the place to keep the physical file. But
Physical file name can be a diffrent one.
Restore Database <dbname> from disk= 'c:\backup\dbname.bak' with
move 'logical_mdf_name' to 'c:\mssql\data\phys_data_name.mdf',
move 'logical_ldf_name' to 'c:\mssql\data\phys_log_name.ldf'
(Replace the logical_mdf_name and logical_ldf_name with the logical name you
got from RESTORE FILELISTONLY command.
Ensure that the directory give in physical file name is there in the server)
Thanks
Hari
MCDBA
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:unJyQaFiEHA.4064@.TK2MSFTNGP12.phx.gbl...
> When you are restoring with EM, check the Options tab, part "Restore
> database files as:" in the middle. There you can change the path to the
> files, so it points to a valid drive and folder.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
> news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
> > I created a complete backup of a SQL Server 7 database so that I can
> > recreate it on a SQL Server 2000 database.
> >
> > I tried 2 options but got the following errors.
> >
> > 1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
> > of the database and tried restoring it. I selected the backup
> > BaseFinal_Backup.BAK as the device.
> >
> > Microsoft SQL-DMO (ODBC SQLState: 42000)
> >
> > Device activation error. The physical file name
> > 'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
> > 'BaseFinal_Data' cannot be restored to
> > 'E:\Mssql\Data\BaseFinal_Data.mdf'.
> >
> > Use WITH MOVE to identify a valid location for the file.
> > Device activation error. The physical file name
> > 'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
> > cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
> >
> > WITH MOVE to identify a valid location for the file.
> > RESTORE DATABASE is terminating abnormally.
> >
> > 2. Using EM, I created an empty BaseFinal database. Using Tools |
> > Restore Database, selected BaseFinal and tried restoring it selecting
> > the device from my C drive.
> >
> > Microsoft SQL-DMO (ODBC SQLState: 42000)
> >
> > The backup set holds a backup of a database other than the existing
> > 'BaseFinal' database.
> >
> > RESTORE DATABASE is terminating abnormally.
> >
> > Thanks.
> >
> > PLEASE REPLY TO THE GROUP. THANKS.
> >
> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!
>|||The following code did the trick.
RESTORE FILELISTONLY
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
RESTORE DATABASE DB1639
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
WITH MOVE 'DBFinal_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Data.mdf',
MOVE 'DBFinal_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Log.ldf'
GO
Thanks for the help.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||There is nothing to panic. Just change the paths in the options tab giving the same directory where SQL server is present after selecting the backup file you needed to restore the database from.
No need to apply any queries in SQL analyzer,its just an easy funda i applied myself
From http://www.developmentnow.com/g/118_2004_8_0_0_476198/Restore-database-error-Microsoft-SQL-DMO-ODBC-SQLState-42000.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com
recreate it on a SQL Server 2000 database.
I tried 2 options but got the following errors.
1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
of the database and tried restoring it. I selected the backup
BaseFinal_Backup.BAK as the device.
Microsoft SQL-DMO (ODBC SQLState: 42000)
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
'BaseFinal_Data' cannot be restored to
'E:\Mssql\Data\BaseFinal_Data.mdf'.
Use WITH MOVE to identify a valid location for the file.
Device activation error. The physical file name
'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
WITH MOVE to identify a valid location for the file.
RESTORE DATABASE is terminating abnormally.
2. Using EM, I created an empty BaseFinal database. Using Tools |
Restore Database, selected BaseFinal and tried restoring it selecting
the device from my C drive.
Microsoft SQL-DMO (ODBC SQLState: 42000)
The backup set holds a backup of a database other than the existing
'BaseFinal' database.
RESTORE DATABASE is terminating abnormally.
Thanks.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!When you are restoring with EM, check the Options tab, part "Restore
database files as:" in the middle. There you can change the path to the
files, so it points to a valid drive and folder.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
> I created a complete backup of a SQL Server 7 database so that I can
> recreate it on a SQL Server 2000 database.
> I tried 2 options but got the following errors.
> 1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
> of the database and tried restoring it. I selected the backup
> BaseFinal_Backup.BAK as the device.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
> 'BaseFinal_Data' cannot be restored to
> 'E:\Mssql\Data\BaseFinal_Data.mdf'.
> Use WITH MOVE to identify a valid location for the file.
> Device activation error. The physical file name
> 'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
> cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> RESTORE DATABASE is terminating abnormally.
> 2. Using EM, I created an empty BaseFinal database. Using Tools |
> Restore Database, selected BaseFinal and tried restoring it selecting
> the device from my C drive.
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> The backup set holds a backup of a database other than the existing
> 'BaseFinal' database.
> RESTORE DATABASE is terminating abnormally.
> Thanks.
> PLEASE REPLY TO THE GROUP. THANKS.
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Hi,
It seems you have given a physical location which is not in the new server
(Drive and directory) while loading in SQL 2000.
Please follow the below steps in query analyzer:-
Restore filelistonly from disk='c:\backup\dbname.bak'
( replace the 'c:\backup\dbname.bak' with the actual backup file name with
path where the file resides.)
This will give you the Logical and Physical file names of the Backup file
name. While loading you should give the
correct logical file name and the place to keep the physical file. But
Physical file name can be a diffrent one.
Restore Database <dbname> from disk= 'c:\backup\dbname.bak' with
move 'logical_mdf_name' to 'c:\mssql\data\phys_data_name.mdf',
move 'logical_ldf_name' to 'c:\mssql\data\phys_log_name.ldf'
(Replace the logical_mdf_name and logical_ldf_name with the logical name you
got from RESTORE FILELISTONLY command.
Ensure that the directory give in physical file name is there in the server)
Thanks
Hari
MCDBA
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:unJyQaFiEHA.4064@.TK2MSFTNGP12.phx.gbl...
> When you are restoring with EM, check the Options tab, part "Restore
> database files as:" in the middle. There you can change the path to the
> files, so it points to a valid drive and folder.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "malehit@.devdex.com" <anonymous@.devdex.com> wrote in message
> news:uVSmPTFiEHA.2340@.TK2MSFTNGP11.phx.gbl...
> > I created a complete backup of a SQL Server 7 database so that I can
> > recreate it on a SQL Server 2000 database.
> >
> > I tried 2 options but got the following errors.
> >
> > 1. Using EM's Tools | Restore Database, I typed in BaseFinal as the name
> > of the database and tried restoring it. I selected the backup
> > BaseFinal_Backup.BAK as the device.
> >
> > Microsoft SQL-DMO (ODBC SQLState: 42000)
> >
> > Device activation error. The physical file name
> > 'E:\Mssql\Data\BaseFinal_Data.mdf' may be incorrect. File
> > 'BaseFinal_Data' cannot be restored to
> > 'E:\Mssql\Data\BaseFinal_Data.mdf'.
> >
> > Use WITH MOVE to identify a valid location for the file.
> > Device activation error. The physical file name
> > 'E:\Mssql\Data\BaseFinal_Log.ldf' may be incorrect. File 'BaseFinal_Log'
> > cannot be restored to 'E:\Mssql\Data\BaseFinal_Log.ldf'. Use
> >
> > WITH MOVE to identify a valid location for the file.
> > RESTORE DATABASE is terminating abnormally.
> >
> > 2. Using EM, I created an empty BaseFinal database. Using Tools |
> > Restore Database, selected BaseFinal and tried restoring it selecting
> > the device from my C drive.
> >
> > Microsoft SQL-DMO (ODBC SQLState: 42000)
> >
> > The backup set holds a backup of a database other than the existing
> > 'BaseFinal' database.
> >
> > RESTORE DATABASE is terminating abnormally.
> >
> > Thanks.
> >
> > PLEASE REPLY TO THE GROUP. THANKS.
> >
> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!
>|||The following code did the trick.
RESTORE FILELISTONLY
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
RESTORE DATABASE DB1639
FROM DISK = 'C:\INTOP\DBFinal_Backup.BAK'
WITH MOVE 'DBFinal_Data' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Data.mdf',
MOVE 'DBFinal_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\DB1639_Log.ldf'
GO
Thanks for the help.
PLEASE REPLY TO THE GROUP. THANKS.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||There is nothing to panic. Just change the paths in the options tab giving the same directory where SQL server is present after selecting the backup file you needed to restore the database from.
No need to apply any queries in SQL analyzer,its just an easy funda i applied myself
From http://www.developmentnow.com/g/118_2004_8_0_0_476198/Restore-database-error-Microsoft-SQL-DMO-ODBC-SQLState-42000.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com
Tuesday, February 21, 2012
Restore - Change Logical Name
I am trying to restore a database and change the database logical name.
I the following error:
Microsoft SQL-DMO (ODBC SQLState: 42000)
--
Logical file 'TestOAISys' is not part of database 'TestOAISys'. Use RESTORE
FILELISTONLY to list the logical file names.
RESTORE DATABASE is terminating abnormally.
--
Basically, the logical filename was POAIAPP for our TestOAISys database
(which is also the Logical Name of our equivalent Production Database). I
want to change the logical name of the TEST database to TestOAIApp and I wan
t
to be able to put the Test and the Production databases on the same drives.
Can anyone help?
Thanks,
LeslieYou want to use the WITH MOVE option:
RESTORE DATABASE TestOAIApp
FROM DISK = 'POAIAPP.bak'
WITH MOVE 'POAIApp.mdf' = 'C:\...\TestOAIapp.mdf',
'POAIApp.ldf' = 'C:\...\TestOAIapp.ldf'
HTH,
Stu|||Thanks Stu,
I will give this a try. Will this give the new database the logical name of
TestOAIApp?
Leslie
"Stu" wrote:
> You want to use the WITH MOVE option:
> RESTORE DATABASE TestOAIApp
> FROM DISK = 'POAIAPP.bak'
> WITH MOVE 'POAIApp.mdf' = 'C:\...\TestOAIapp.mdf',
> 'POAIApp.ldf' = 'C:\...\TestOAIapp.ldf'
>
> HTH,
> Stu
>|||Hi Leslie
Databases don't have logical names. They just have names. The files the
databases are created on have both logical and physical names.
By default, if you create a database named test without specifying any file
names, the logical filenames will be test and test_log, and the physical
names will be test.mdf and test_log.ldf.
To change the database name, you can use sp_renamedb. That will not change
either the logical or physical file names.
To change the physical file name, perhaps also including the directory, you
need to either detach or backup the db, and then attach or restore with the
new file names explicitly specified.
To change the logical file names, you can use ALTER DATABASE in SQL Server
2000 or 2005. It is not possible to change the logical filenames in SQL
Server 7
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Leslie" <Leslie@.discussions.microsoft.com> wrote in message
news:4623E802-EE8C-4736-A9C9-E35D42C78241@.microsoft.com...
>I am trying to restore a database and change the database logical name.
> I the following error:
> --
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> --
> Logical file 'TestOAISys' is not part of database 'TestOAISys'. Use
> RESTORE
> FILELISTONLY to list the logical file names.
> RESTORE DATABASE is terminating abnormally.
> --
> Basically, the logical filename was POAIAPP for our TestOAISys database
> (which is also the Logical Name of our equivalent Production Database). I
> want to change the logical name of the TEST database to TestOAIApp and I
> want
> to be able to put the Test and the Production databases on the same
> drives.
> Can anyone help?
> Thanks,
> Leslie
>|||Karen,
Thank you for your response. It helped clarify some of the nomenclature.
In your last paragraph, you note it is possible to alter the database logica
l
file name in SQL2000 and SQL2005. We are running SQL 2000 version 8.00.760
.
Can you tell me the syntax for changing the logical file name using ALTER
DATABASE?
DB Names DB Log. FileName DB Physical Names
OAIApp POAIAPP POAIAPP.mdf
TestOAIApp POAIAPP TestOAIApp.mdf
Thanks,
Leslie
"Kalen Delaney" wrote:
> To change the logical file names, you can use ALTER DATABASE in SQL Server
> 2000 or 2005. It is not possible to change the logical filenames in SQL
> Server 7
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com|||Try:
alter database TestOAIApp
modify file
(
name = POAIAPP
, newname = MyNewPOAIAPP
)
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada tom@.cips.ca
www.pinpub.com
"Leslie" <Leslie@.discussions.microsoft.com> wrote in message
news:046EE9E1-91BC-41F1-8F0C-3899B1F71299@.microsoft.com...
> Karen,
> Thank you for your response. It helped clarify some of the nomenclature.
> In your last paragraph, you note it is possible to alter the database
> logical
> file name in SQL2000 and SQL2005. We are running SQL 2000 version
> 8.00.760.
> Can you tell me the syntax for changing the logical file name using ALTER
> DATABASE?
> DB Names DB Log. FileName DB Physical Names
> OAIApp POAIAPP POAIAPP.mdf
> TestOAIApp POAIAPP TestOAIApp.mdf
> Thanks,
> Leslie
> "Kalen Delaney" wrote:
>|||Tom,
This did it! I ran the SELECT FILE_NAME() command for the .mdf and the .ldf
exact logical filenames before running the modify. THANK YOU very much for
the syntax!
Leslie
"Tom Moreau" wrote:
> Try:
> alter database TestOAIApp
> modify file
> (
> name = POAIAPP
> , newname = MyNewPOAIAPP
> )
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada tom@.cips.ca
> www.pinpub.com
> "Leslie" <Leslie@.discussions.microsoft.com> wrote in message
> news:046EE9E1-91BC-41F1-8F0C-3899B1F71299@.microsoft.com...
>
>|||Hi Leslie
Please check the Books Online for the complete ALTER DATABASE syntax. There
are LOTS of things you can do with this command.
HTH
Kalen (not Karen) Delaney, SQL Server MVP
www.solidqualitylearning.com
"Leslie" <Leslie@.discussions.microsoft.com> wrote in message
news:DEF3D2B2-DD05-4E0F-BEE1-E0A0CB1744E8@.microsoft.com...
> Tom,
> This did it! I ran the SELECT FILE_NAME() command for the .mdf and the
> .ldf
> exact logical filenames before running the modify. THANK YOU very much
> for
> the syntax!
> Leslie
> "Tom Moreau" wrote:
>
>|||Kalen (with an "L"),
Sorry for calling you Karen (my sister's name), I mis-read your name when I
responded originally. Apologies.
Yes, the ALTER DATABASE command worked fine as Tom Moreau noted in his
response. I actually did look up the ALTER DATABASE command, but was
on how the exact syntax was supposed to be written, and Tom gave a
good working example.
Thanks again for your responses.
Cheers,
Leslie
> Please check the Books Online for the complete ALTER DATABASE syntax. Ther
e
> are LOTS of things you can do with this command.
> HTH
> Kalen (not Karen) Delaney, SQL Server MVP
I the following error:
Microsoft SQL-DMO (ODBC SQLState: 42000)
--
Logical file 'TestOAISys' is not part of database 'TestOAISys'. Use RESTORE
FILELISTONLY to list the logical file names.
RESTORE DATABASE is terminating abnormally.
--
Basically, the logical filename was POAIAPP for our TestOAISys database
(which is also the Logical Name of our equivalent Production Database). I
want to change the logical name of the TEST database to TestOAIApp and I wan
t
to be able to put the Test and the Production databases on the same drives.
Can anyone help?
Thanks,
LeslieYou want to use the WITH MOVE option:
RESTORE DATABASE TestOAIApp
FROM DISK = 'POAIAPP.bak'
WITH MOVE 'POAIApp.mdf' = 'C:\...\TestOAIapp.mdf',
'POAIApp.ldf' = 'C:\...\TestOAIapp.ldf'
HTH,
Stu|||Thanks Stu,
I will give this a try. Will this give the new database the logical name of
TestOAIApp?
Leslie
"Stu" wrote:
> You want to use the WITH MOVE option:
> RESTORE DATABASE TestOAIApp
> FROM DISK = 'POAIAPP.bak'
> WITH MOVE 'POAIApp.mdf' = 'C:\...\TestOAIapp.mdf',
> 'POAIApp.ldf' = 'C:\...\TestOAIapp.ldf'
>
> HTH,
> Stu
>|||Hi Leslie
Databases don't have logical names. They just have names. The files the
databases are created on have both logical and physical names.
By default, if you create a database named test without specifying any file
names, the logical filenames will be test and test_log, and the physical
names will be test.mdf and test_log.ldf.
To change the database name, you can use sp_renamedb. That will not change
either the logical or physical file names.
To change the physical file name, perhaps also including the directory, you
need to either detach or backup the db, and then attach or restore with the
new file names explicitly specified.
To change the logical file names, you can use ALTER DATABASE in SQL Server
2000 or 2005. It is not possible to change the logical filenames in SQL
Server 7
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Leslie" <Leslie@.discussions.microsoft.com> wrote in message
news:4623E802-EE8C-4736-A9C9-E35D42C78241@.microsoft.com...
>I am trying to restore a database and change the database logical name.
> I the following error:
> --
> Microsoft SQL-DMO (ODBC SQLState: 42000)
> --
> Logical file 'TestOAISys' is not part of database 'TestOAISys'. Use
> RESTORE
> FILELISTONLY to list the logical file names.
> RESTORE DATABASE is terminating abnormally.
> --
> Basically, the logical filename was POAIAPP for our TestOAISys database
> (which is also the Logical Name of our equivalent Production Database). I
> want to change the logical name of the TEST database to TestOAIApp and I
> want
> to be able to put the Test and the Production databases on the same
> drives.
> Can anyone help?
> Thanks,
> Leslie
>|||Karen,
Thank you for your response. It helped clarify some of the nomenclature.
In your last paragraph, you note it is possible to alter the database logica
l
file name in SQL2000 and SQL2005. We are running SQL 2000 version 8.00.760
.
Can you tell me the syntax for changing the logical file name using ALTER
DATABASE?
DB Names DB Log. FileName DB Physical Names
OAIApp POAIAPP POAIAPP.mdf
TestOAIApp POAIAPP TestOAIApp.mdf
Thanks,
Leslie
"Kalen Delaney" wrote:
> To change the logical file names, you can use ALTER DATABASE in SQL Server
> 2000 or 2005. It is not possible to change the logical filenames in SQL
> Server 7
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com|||Try:
alter database TestOAIApp
modify file
(
name = POAIAPP
, newname = MyNewPOAIAPP
)
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada tom@.cips.ca
www.pinpub.com
"Leslie" <Leslie@.discussions.microsoft.com> wrote in message
news:046EE9E1-91BC-41F1-8F0C-3899B1F71299@.microsoft.com...
> Karen,
> Thank you for your response. It helped clarify some of the nomenclature.
> In your last paragraph, you note it is possible to alter the database
> logical
> file name in SQL2000 and SQL2005. We are running SQL 2000 version
> 8.00.760.
> Can you tell me the syntax for changing the logical file name using ALTER
> DATABASE?
> DB Names DB Log. FileName DB Physical Names
> OAIApp POAIAPP POAIAPP.mdf
> TestOAIApp POAIAPP TestOAIApp.mdf
> Thanks,
> Leslie
> "Kalen Delaney" wrote:
>|||Tom,
This did it! I ran the SELECT FILE_NAME() command for the .mdf and the .ldf
exact logical filenames before running the modify. THANK YOU very much for
the syntax!
Leslie
"Tom Moreau" wrote:
> Try:
> alter database TestOAIApp
> modify file
> (
> name = POAIAPP
> , newname = MyNewPOAIAPP
> )
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada tom@.cips.ca
> www.pinpub.com
> "Leslie" <Leslie@.discussions.microsoft.com> wrote in message
> news:046EE9E1-91BC-41F1-8F0C-3899B1F71299@.microsoft.com...
>
>|||Hi Leslie
Please check the Books Online for the complete ALTER DATABASE syntax. There
are LOTS of things you can do with this command.
HTH
Kalen (not Karen) Delaney, SQL Server MVP
www.solidqualitylearning.com
"Leslie" <Leslie@.discussions.microsoft.com> wrote in message
news:DEF3D2B2-DD05-4E0F-BEE1-E0A0CB1744E8@.microsoft.com...
> Tom,
> This did it! I ran the SELECT FILE_NAME() command for the .mdf and the
> .ldf
> exact logical filenames before running the modify. THANK YOU very much
> for
> the syntax!
> Leslie
> "Tom Moreau" wrote:
>
>|||Kalen (with an "L"),
Sorry for calling you Karen (my sister's name), I mis-read your name when I
responded originally. Apologies.
Yes, the ALTER DATABASE command worked fine as Tom Moreau noted in his
response. I actually did look up the ALTER DATABASE command, but was
good working example.
Thanks again for your responses.
Cheers,
Leslie
> Please check the Books Online for the complete ALTER DATABASE syntax. Ther
e
> are LOTS of things you can do with this command.
> HTH
> Kalen (not Karen) Delaney, SQL Server MVP
Subscribe to:
Posts (Atom)