| Quang Nguyen 2005-12-02, 8:23 pm |
| Hi Glen,
Thanks for the reply. After you ran the
> RESTORE FILELISTONLY
> FROM MyDatabase
and got the following in return:
Logical names Physical names
MyDatabase_data D:\MyData\MyDatabase
_Test_data.mdf
MyDatabase_log D:\MyData\MyDatabase
_Test_log.ldf
The question remains is when you run the
> RESTORE DATABASE MyDatabase_Test
> FROM MyDatabase
> WITH RECOVERY,
> MOVE 'MyDatabase_data' TO 'D:\MyData\MyDatabas
e_Test_data.mdf',
> MOVE 'MyDatabase_log' TO 'D:\MyData\MyDatabas
e_Test_log.ldf'
You've only changed the name of the physical files. What about the logical
names of MyDatabase_data and MyDatabase_log? Under your new MyDatabase_Test
database, you would have the same logical names as your MyDatabase. My
question is is that will this pose a problem for SQL Server in any way?
"GlennThomas5" wrote:
> If you want to keep them both in the same folder you can change the
> name of one. eg
>
> USE master
> GO
> -- First determine the number and names of the files in the backup.
> -- MyDatabase is the name of the backup device.
> RESTORE FILELISTONLY
> FROM MyDatabase
> -- Restore the files for MyDatabase_Test.
> RESTORE DATABASE MyDatabase_Test
> FROM MyDatabase
> WITH RECOVERY,
> MOVE 'MyDatabase_data' TO 'D:\MyData\MyDatabas
e_Test_data.mdf',
> MOVE 'MyDatabase_log' TO 'D:\MyData\MyDatabas
e_Test_log.ldf'
> GO
>
>
|