Monday, March 12, 2012

Removing replications

I have two servers (let's call them SQL01 and SQL02), and SQL01 is our main SQL-server.

I have been doing som replication to SQL02, and I want to remove ALL replications. I have an publication on a database called DB1.

The distributor is set to be SQL02.

I used the wizard 'disable....', and stupid as I was I removed the distributor before removing the publications.

Something went wrong, and now the distributor is removed, but the publications are still there (not working, but they are there).

When I try to remove them I get the error:

'Error 2812: Could not find stored procedure ''

I am in deep trouble, and I hope that someone can help me with the problem.

Best regards...
SrenGo to the menu Tools -> Replication -> Generate SQL Script (select disable/drop components). You can use this to run to drop replication. Follow the stored procedures as listed in the order they are provided.|||Hi,
Thanks for the answer, but when I try to do that, I get the same error...

I have really messed things up, and I you have other suggestions, I would really thankful.

Sren|||Were you able to generate the script ? If so, run the script line by line - let me know where it fails - that will give us an indication as to what is broken.|||Hi,
Sorry for not writing back earlier. I have been on a businesstrip to Finland.

I unfortunately still have the problem, and if I uncheck "Distributor attributes", then I can generate the following script:

<B> use [MarliDK]
GO

-- Dropping the merge subscription
exec sp_dropmergesubscription @.publication = N'MarliDK_NEW', @.subscriber = N'ODSSQL02', @.subscriber_db = N'MarliDK', @.subscription_type = N'push'
GO

-- Dropping the merge publication
exec sp_dropmergepublication @.publication = N'MarliDK_NEW'
GO

-- Disabling the replication database
use master
GO

exec sp_replicationdboption @.dbname = N'MarliDK', @.optname = N'merge publish', @.value = N'false'
GO
</B>

When i Run the first statement I get the following:

<B> Server: Msg 2812, Level 16, State 62, Procedure sp_dropmergesubscription, Line 401
Could not find stored procedure ''.
Server: Msg 14056, Level 16, State 1, Procedure sp_dropmergesubscription, Line 444
The subscription could not be dropped at this time.</B>

I would like to thank you many times for trying to help me. I really appreciate that.

Best regards and greetings from Denmark
Sren

No comments:

Post a Comment