Moving database to a new server

Hi Everyone,

We are trying to move a database to a new location, so the techinque that we used is to use the log shippmnet version of database for this move. steps that we did are as follow:

1- Stop the sql server service on log shipped database(secondary) while it is in restoreing mode.

2- Create a blank database with the same file structure in destination.

3- Stop SQL SERVER service on destination.

4- Copy the mdf & ldf files to the same locations in destnation.

5- start the SQL SERVER service in destaintion.

We have used this techinque before and it was working fine. but this time I recieved the following error message:

An unexpected file id was encountered. File id 3 was expected but 4 was read from "F:\Data\test_FG_02_MP01\test_FG_2_1.ndf". Verify that files are mapped correctly in sys.master_files. ALTER DATABASE can be used to correct the mappings.

Note: We can not take Full backup on this database and that is why we used this techinque.

I would appreciate if somebody help me on this regard.

Thanks

September 3rd, 2015 2:49pm

Take copy only backup and restore on secondary server that will not impact on log shipping.
Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 9:23pm

So as I can understand you are trying to move secondary database to new location. In that case I would suggest you to follow steps mentioned in this article

The way you are doing is incorrect

September 4th, 2015 10:19am

The way you do is actually pure luck if it succeeds or fails if you have more than one data file. I would suggest to detach the DB and attach it again after moving the files. Or do a backup + restore...
Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 2:40pm

With the steps you mentioned  you haven't mentioned anywhere changing the physical location of database files in master. Without that if you move and start the sql services it will search for the database files in previous location.

Please see this to understand the process in a better way

http://blogs.technet.com/b/mdegre/archive/2009/09/25/moving-database-files-on-the-secondary-server-in-log-shipping.aspx

September 4th, 2015 3:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics