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 |
AgaK
Yak Posting Veteran
86 Posts |
Posted - 2009-12-29 : 18:42:40
|
HiIs there a way to restore a backup with a RESTORE BACKUP command with MOVE and refer the data and log files by id and not logical names?I want to create a script that will restore few backups and move the data and log files to a folder.Something like :RESTORE DATABASE RestoreTest FROM DISK='F:\TestRestore\backup_200912281730.bak'WITH MOVE 'Test' TO 'F:\testdb.mdf', MOVE 'TestLog' TO 'F:\testdb.ldf'but instead of Logical File Name the id?Thank youAK |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-12-29 : 19:04:41
|
u can easily get both by RESTORE WITH FILELISTONLY |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|