Wednesday, March 21, 2012

Replication problem in SQL Server 2000

Hi all SQL Server experts!

I have created replication on my two servers (production and backup servers). I used wizards to create it and then generated SQL script for deleting and creating replication. For another task I came across the command sp_removedbreplication 'dbname' and I tried to use that for removing replication more easily on the servers. It seemed to not remove everything on the production server and whenever I install replication now, either by using wizards or my generated SQL scripts I get an error icon (red circle with a black X in it) on my Replication Monitor all the way down to Publisher and the publication named with the computer name. Also this icon is on Agents and Log Reader Agents but not on the actual agent.

Something must have happened when using sp_removedbreplication 'dbname' and I can't fix it. The replication works properly but i wish to not have the error icons.

Does anyone know how the error icons can be removed?

Best,
/M

The cleanest way and supported way is to drop the distributor and recreate it from scratch. However you can also look at the following tables in distribution database and delete any rows that reference your deleted publications (but take a backup of the distribution database first, and note that manually deleting these tables is unsupported):

MSpublications

MSsubscriptions

MSarticles

|||

I have checked these tables and they don't have anything that don't exist in them.

I have also dropped everything that has to do with replication and also the distribution database to use my scripts and install replication again. The replication works fines but there are still error icons on the folders. Only on the folders though and not on the actual items, e.g. agents. I am thinking of reinstalling the SQL Server. Might it be because SQL Server has replaced the actual icons with error icons and "lost" the orignial ones?

My scripts for installing replication has always worked but it is after I have used sp_removedbreplication on the distributor/publisher that these icons occur when I install replication, including using the wizards.

Best,
/M

|||Did you try disconnecting from the distributor and reconnecting to it. Sometimes the refresh of the data can cause such misbehavior. Also try restarting the sql server.|||

When deleting subscription, it's replication job may still remain. You can find it in SQL Server Agent Jobs list (in Enterprise Manager: [DB]->Management->SQL Server Agent->Jobs).

Name of the job consists of Publisher and Subscriber names. When you re-create a subscription, probably same name is generated, and job creation fails.

Use sp_delete_job stored procedure to delete the job.

|||

Thank you very much. That solved my problem.

Best,
/M

No comments:

Post a Comment