Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
tfrugia
Starting Member
1 Post |
Posted - 2006-03-18 : 15:24:29
|
| Hello all, I am using SQLDMO to try and restore a database to a 'new' database. I am using the relocatefiles property and setting it correctly, but when I restore I always get the error:"[Microsoft][ODBC SQL Server Driver][SQL Server]Logical file 'OLDDATABASENAME' is not part of database 'NEWDATABASENAME'. Use RESTORE FILELISTONLY to list the logical file names.[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE DATABASE is terminating abnormally."My code is set up like this:restoreObject.RelocateFiles = "[oldDbName],[C:\newDbName.mdf],[oldDbName],[C:\newDbName.ldf]";Any ideas? |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-03-18 : 23:24:27
|
| use the with move optionreview the restore database syntax in BOLhth--------------------keeping it simple... |
 |
|
|
Kristen
Test
22859 Posts |
|
|
|
|
|