Wednesday, March 28, 2012

Log Shipping to two Databases on One Secondary Server

Is it possible to do SQL log shipping to more than one
Databases on same Secondry Server WITH A DIFFERENT SCHEDULE for each
log shipping?
You can set up log shipping to go to as many servers as
you want, but you only get one schedule in the plan. If
you set up a second log shipping schedule, you get an
error because the server is already set up for log
shipping in the other plan.
Just wondering if this is possible.
For example. I have 2 servers.
The Main server needs to ship it's logs to two other
databases. (Server A)
I want the main server to ship the logs to Server A every
45 minutes for ClientDatabase1.
I want the main server to ship the logs to Server A every
60 minutes for ClientDatabase2.
Can this be set up?
ParveenHi Parveen,
Yes, I believe that it is possible. I assume that you are setting up
log shipping by using the Database Maintenance Plan Wizard.
After you complete the setup of log shipping through the wizard there
will be a number of SQL Server Agent jobs created. Their names should
be similar to what I've listed below.
Jobs on primary/main server:
* Transaction Log Backup Job for DB Maintenance Plan <Plan Name>
Jobs on secondary/DR server:
* Log Shipping copy for <Primary Server>.<DB Name>_logshipping
* Log Shipping Restore for <Primary Server>.<DB Name>_logshipping
There are also jobs on the monitor server (if you have one) but you
don't need to worry about these for your purposes.
Now, all you need to do is alter the scheduling of the SQL Server Agent
jobs to get the timing that you want. Please note that the "copy" and
"restore" jobs should occur after the backup job (e.g. 2 minutes after)
and that the "copy" and "restore" jobs should not happen at the same
time. The "copy" job should be scheduled first and the "restore" job
should be scheduled after that (e.g. 2 minutes after the "copy" job).
HTH
Parveen.Beniwal.Daffodil@.gmail.com wrote:
> Is it possible to do SQL log shipping to more than one
> Databases on same Secondry Server WITH A DIFFERENT SCHEDULE for each
> log shipping?
> You can set up log shipping to go to as many servers as
> you want, but you only get one schedule in the plan. If
> you set up a second log shipping schedule, you get an
> error because the server is already set up for log
> shipping in the other plan.
> Just wondering if this is possible.
> For example. I have 2 servers.
> The Main server needs to ship it's logs to two other
> databases. (Server A)
> I want the main server to ship the logs to Server A every
> 45 minutes for ClientDatabase1.
> I want the main server to ship the logs to Server A every
> 60 minutes for ClientDatabase2.
> Can this be set up?
> Parveen|||Hi HTH
Thanx for the quick and helpful reply but i am configuring log
shipping using the Management Studio but i am not aware how to
configure log shipping using DB Maintenance Plan. Will you please guide
me a little bit abt that also.
Parveen|||Hi Parveen,
If you're already familiar with a way of configuring log shipping then
just do it that way. After you have configured your log shipping just
change the scheduling of the SQL Server Agent jobs like I said
previously.
I believe that you're using SQL Server 2005...The instructions I wrote
were geared towards SQL Server 2000. They should probably still be
valid though (i.e. there are log shipping jobs created and the
schedules of these can be edited to suit your needs)|||Hi HTH
Yes you are right i am using the SQL Server 2005 Management
Studio. Let me explain once more my problem. I am having a database
Test on SERVER1 and i want to transfer Log backups of Test to a
secondry Server SERVER2 on Databases Test and Test1 both are read-only
restored databases. Jobs according to that configuration are as
follows:
SERVER1:
LSAlert_SERVER1
LSBackup_Test
SERVER2:
LSAlert_SERVER1
LSCopy_SERVER1_Test
LSRestore_SERVER1_Test
As above SERVER2 is having jobs only for one database not for the
second one that is Test1 to which i want to restore at some different
schedule.
How it is possible ?
Parveen|||Hello Parveen,
Apologies for my late reply but I went offline shortly after posting.
I am not too experienced in the use of SQL Server 2005 so I'm afraid I
can't be of much more help. I would have imagined that you would get
more log shipping jobs showing up as you are log shipping to more than
1 DB.
Have you checked out Books Online for SQL Server 2005?
The only other thing can suggest is that you take a look at what the
backup, copy and restore jobs are actually doing (e.g. what T-SQL code
they execute) and maybe that could lead you down the right path.
Sorry I can't be of more help.

No comments:

Post a Comment