question

chitrarekha.saha avatar image
chitrarekha.saha asked

Log shipping datafiles

The primary server has datafiles in d drive. When I execute the following script use [databasename] go sp_helpfile go It reads that the datafiles are in d drive in secondary server however I do not see any datafiles in d drive of the secondary server. The datafiles are present in c:\\programfiles\\sqlserver.... After restore the datafiles are restored in c:\\programfiles. Is there a way to move the datafiles to d drive in the secondary server while logshipping.
sql-server-2008-r2
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
SirSQL avatar image
SirSQL answered
I'm guessing that you used the wizard to restore the database on the remote server to setup the logshipping and that created the files in the default location. I would recommend disabling the restore job, dropping the database and then performing a fresh restore of the backup using the WITH MOVE command to move the files to the location that you want. Then just enable the logshipping restore job once more and you'll be good to go.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.