Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

How To Move Datafile on a Standby Database

$
0
0

 

I need to move a datafile on my secondary database which is in standby mode.  I have attempted to use the Restore command with the move and standby parameters

 

use master
RESTORE LOG BWP FROM
DISK='L:\trans_bkp\BWP_20071009080001.trn'
WITH MOVE 'BWPDATA3' 
TO 'N:\BWPDATA3\BWPDATA3.ndf',
standby='L:\TRANS_BKP\BWP_20071009130001.tuf'

 

But I get the following error message

 

 Msg 3174, Level 16, State 1, Line 1
The file 'BWPDATA3' cannot be moved by this RESTORE operation.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.

Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>