September 15, 2008 at 4:10 pm
RESTORE DATABASE test
--restore filelistonly
FROM DISK = 'D:\BACKUP\test_db_200809150315.BAK'
WITH NORECOVERY,
with MOVE 'tws_dat' TO 'D:\Data\test.mdf',
with MOVE 'tws_Log' TO 'D:\LOG\test_log.ldf'
What is wrong with this above syntax, I am getting incorrect syntax near the keyword 'with'. Thank you.
September 15, 2008 at 9:46 pm
You only need to specify "WITH" once...
RESTORE DATABASE test
--restore filelistonly
FROM DISK = 'D:\BACKUP\test_db_200809150315.BAK'
WITH NORECOVERY,
MOVE 'tws_dat' TO 'D:\Data\test.mdf',
MOVE 'tws_Log' TO 'D:\LOG\test_log.ldf'
September 16, 2008 at 9:24 am
Thank you. It works.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply