I have few databases with the same logical names and different physical names. when i tried to creat log shipping on those databases i have noticed that sql server 2005 uses the logical name on the secondary server as the mdf. and ldf file. so i got an error when i tried to log ship the second database. is there a way to force sql to use physical database. it also gave me an error even when i created the database on the secondary server with specific log and data file names. it is very frustrating. i hope there is a solution. please help;
I set up your scenario and see the issue. The log shipping UI does not allow you to modify all the restore database options when the database is restored on the secondary server. There is a DCR bug to improve the log shipping UI for this type of issue.
As for a workaround, there are two options that may work for you.
1) Set the secondary database restore options to put the physical database files in a separate folder than the default data folder. In the UI for log shipping wizard, after defining the backup database settings, you are able to define the secondary database settings. In the secondary database settings page, if you choose to use one of the first two options under "Initialize Secondary Database", then set the restore options to use a different folder for the data and log data files so that the restored database files do not conflict with existing database files on the secondary server.
2) Manually backup the primary database, then manually restore the primary backup file on the secondary server. During the restore you control the names of the physical database files that will exist on the secondary server. While setting up log shipping via the UI, after you define the backup settings, you'll need to choose the last option under "Initialize Secondary Database", which is "No, the secondary database is initialized". Since you manaully controlled the backup and restore, there is no need to have log shipping restore the backup again. The next transaction log from the primary should restore to the secondary and work this way going forward.
Hope this helps,
Tom
This posting is provided AS IS with no warranties, and confers no rights.
|||Tom,
Thank you for your quick response. I have opted to change the logical file name and then set up the log shipping. thank you again.
No comments:
Post a Comment