Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Error creating log shipping

Author  Topic 

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 2012-06-01 : 06:05:40
Hi all,

When running the Log Shipping setup wizard to create a test database, the following error appears:

14261: "The specified primary_server_name.primary_database_name already exists....

Now, I probably caused this error by dropping a Test database or deleting it's associated jobs without first clicking the "remove log shipping" button

The MSKB http://support.microsoft.com/kb/298743 suggests :

•sp_delete_log_shipping_primary (http://msdn.microsoft.com/en-us/library/aa259637(SQL.80).aspx) : To delete the primary server from the log_shipping_primary table.
•sp_delete_log_shipping_plan (http://msdn.microsoft.com/en-us/library/aa933266(SQL.80).aspx) : To delete the log shipping plan.
•sp_delete_log_shipping_secondary (http://msdn.microsoft.com/en-us/library/aa933265(SQL.80).aspx) : To remove secondary server from log_shipping_secondaries table.
•sp_remove_log_shipping_monitor (http://msdn.microsoft.com/en-us/library/aa238873(SQL.80).aspx) : To delete the log shipping monitor information from the log_shipping_monitor table.


However, won't the very first one disrupt log shipping for the remaining PRODUCTION databases?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-01 : 12:26:05
It's been a while since I've touched log shipping and I don't have a SQL 2000 system to help you specifically, but my recollection is that you just delete the rows that are for the database you dropped. Those 4 articles are to remove the entire thing, so just remove those that are specific to your database if you've got other log shipped databases in place already.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 2012-06-05 : 17:58:17
Hi Tara, thanks for the reply.

I'll check when I'm back at work tomorrow but I remember doing some Select * on those tables and no rows came back containing 'Test', though I did so in EM and it's probably better done in QA. It will be a dire problem when, not if I need to recreate log-shipping for one of the existing shipping pairs, because we have a known issue with one standby DB or other going suspect every week/fortnight.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-05 : 18:09:48
You need to do it on all 3 servers to clear it completely out.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 2012-06-14 : 10:03:56
Hi Tara, in my case TWO, primary is the monitor (as it was when I got here!) but I ran the following on Primary:


DELETE FROM log_shipping_primaries
WHERE Primary_database_name = 'Test'

DELETE From
log_shipping_secondaries
Where secondary_database_name = 'test'

And ran (a few or all) of these on Secondary...

Select plan_id
From sysdbmaintplans
Where plan_name = 'Test'

--Copy plan number for the database in question--
DELETE sysdbmaintplans
WHERE Plan_name = 'Test'

Delete sysdbmaintplan_jobs
Where plan_ID = 'PastePlan_IDHere'

Delete Sysdbmaintplan_databases
Where database_name = 'YourDBNameHere'

And it worked, thank you !! :)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-14 : 12:28:35
You're welcome, glad to help.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -