MSSQL Error# 32023. An entry for primary server , primary database does not exist on this secondary. Register the primary first.

Hello Everyone,

Hope all is well. Today I would like post the resolution for an error that I came up with when I was modifying the logshipping configuration. Logshipping in my scenario is not being used for high availability but I am using the logshipped databases for the purpose of SSRS reports. We did a failover a couple of weeks back from Server A to Server B using a third party HA solution and after a couple of weeks I wanted to change the retention on the secondary after the files are copied.

I tried to do this thorough GUI on primary server which is Server B and then when I make changes I got the below error:

SQL Server Management Studio could not save the configuration of ReportServer as a Secondary.An entry for primary server , primary database  does not exist on this secondary. Register the primary first. (Microsoft SQL Server, Error: 32023)

I used the below script to fix the issue, but I still put the value for @primary_server=’Server A’ and not server B. If I put server B I would still receive the same error:

exec master.dbo.sp_change_log_shipping_secondary_primary
@primary_server = 'Server A',
@primary_database = 'Db Name',
@file_retention_period ='time in minutes'

Hope this helps!

Advertisements
This entry was posted in SQL Server DBA Stuff and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s