MSSQL, Drop Publish

 

Ejecutar  la ultima parte del script si el distribuidor ya no existe.

__
DECLARE @publicationDB AS sysname;
DECLARE @publication AS sysname;

--set your publication database here

SET @publicationDB = 'Identitum';

--set your publication name here

SET @publication = N'Publish_Identitum';

-- Remove a transactional publication.

USE identitum
EXEC sp_droppublication

@publication = @publication
,@ignore_distributor=1;

-- Remove replication objects from the database.
go
USE [master]

EXEC sp_replicationdboption
@dbname = @publicationDB,
@optname = N'publish',
@value = N'false';
GO


--execute following command on distributor server

USE master
GO

EXEC sp_dropdistributor @no_checks = 1, @ignore_distributor = 1
GO


--Este script fue el que funciono
use identitum
exec sp_removedbreplication @dbname = 'Identitum'

--

 

También te podría gustar...