Microsoft KB Archive/298743

= BUG: All Changes May Not be Rolled Back when Log Shipping Maintenance Wizard Fails =

Article ID: 298743

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Enterprise Edition

-



This article was previously published under Q298743



BUG #: 353349 (SHILOH_BUGS)

BUG #: 353719 (SHILOH_BUGS)



SYMPTOMS
When you set up log shipping through the Database Maintenance Wizard, and the wizard fails to complete because of an error, not all of the wizard's changes are rolled back.

This may cause the following error message to occur after you fix the original problem, and then re-run the wizard:

Error 14261: The specified primary_server_name.primary_database_name ('N') already exists.

Error 14426: A log shipping monitor is already defined (...)



CAUSE
There are left over jobs on the log shipping monitor server and on the primary server:
 * Primary server: An entry for the monitor server in table msdb.dbo.log_shipping_monitor.
 * Monitor server: Job &quot;Log shipping Alert Job - Backup&quot;.
 * Monitor server: Job &quot;Log shipping Alert Job - Restore&quot;.
 * Monitor server: An entry for the primary server in table msdb.dbo.log_shipping_primaries.

The jobs are there because there are rows in the log_shipping_primaries table. In all failure cases of the setup Wizard the problem is that the log_shipping_primaries and log_shipping_monitor tables are not always cleaned up.



WORKAROUND
After you run the Maintenance Wizard and it fails to create the Log Shipping setup, you must manually clean up the tables before you run the wizard again.

Depending on where the failure is, you must run some of the stored procedures to delete the entry.

You may have to run the following stored procedures to clean up log shipping entries and allow the wizard to be re-run:
 * sp_delete_log_shipping_primary: To delete the primary server from the log_shipping_primary table.
 * sp_delete_log_shipping_plan: To delete the log shipping plan.
 * sp_delete_log_shipping_secondary: To remove secondary server from log_shipping_secondaries table.
 * sp_remove_log_shipping_monitor: To delete the log shipping monitor information from the log_shipping_monitor table.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 2000.

