sp_dropdistpublisher(Transact-SQL)

배포 게시자를 삭제합니다. 이 저장 프로시저는 모든 데이터베이스의 배포자에서 실행됩니다.

항목 링크 아이콘Transact-SQL 구문 표기 규칙

구문

sp_dropdistpublisher [ @publisher = ] 'publisher'
    [ , [ @no_checks = ] no_checks ]
    [ , [ @ignore_distributor = ] ignore_distributor ]

인수

  • [ @publisher= ] 'publisher'
    삭제할 게시자입니다. publishersysname이며 기본값은 없습니다.
  • [ @no_checks= ] no_checks
    게시자가 배포자로서 서버를 제거했는지 sp_dropdistpublisher를 통해 확인할지 지정합니다. no_checksbit이며 기본값은 0입니다.

    0인 경우 복제 시 원격 게시자가 배포자로서 로컬 서버를 제거했는지 확인합니다. 게시자가 로컬인 경우에는 복제 시 로컬 서버에 게시 또는 배포 개체가 남아 있지 않음을 확인합니다.

    1인 경우 원격 게시자를 연결할 수 없어도 배포 게시자와 관련된 모든 복제 개체가 삭제됩니다. 원격 게시자는 이러한 작업 후에 @ignore_distributor = 1sp_dropdistributor를 사용하여 복제를 제거해야 합니다.

  • [ @ignore_distributor= ] ignore_distributor
    게시자가 제거되면 배포자에 배포 개체를 남겨둘지 지정합니다. ignore_distributorbit이며 다음 값 중 하나가 될 수 있습니다.

    1 = publisher에 속하는 배포 개체가 배포자에 남아 있습니다.

    0 = publisher에 대한 배포 개체가 배포자에서 정리되었습니다.

반환 코드 값

0(성공) 또는 1(실패)

주의

sp_dropdistpublisher는 모든 유형의 복제에 사용됩니다.

Oracle 게시자를 삭제할 때 게시자를 삭제할 수 없으면 sp_dropdistpublisher는 오류를 반환하고 게시자에 대한 배포자 개체가 제거됩니다.

사용 권한

sysadmin 고정 서버 역할의 멤버만 sp_dropdistpublisher를 실행할 수 있습니다.

-- This script uses sqlcmd scripting variables. They are in the form
-- $(MyVariable). For information about how to use scripting variables  
-- on the command line and in SQL Server Management Studio, see the 
-- "Executing Replication Scripts" section in the topic
-- "Programming Replication Using System Stored Procedures".

-- Disable publishing and distribution.
DECLARE @distributionDB AS sysname;
DECLARE @publisher AS sysname;
DECLARE @publicationDB as sysname;
SET @distributionDB = N'distribution';
SET @publisher = $(DistPubServer);
SET @publicationDB = N'AdventureWorks';

-- Disable the publication database.
USE [AdventureWorks]
EXEC sp_removedbreplication @publicationDB;

-- Remove the registration of the local Publisher at the Distributor.
USE master
EXEC sp_dropdistpublisher @publisher;

-- Delete the distribution database.
EXEC sp_dropdistributiondb @distributionDB;

-- Remove the local server as a Distributor.
EXEC sp_dropdistributor;
GO

참고 항목

참조

sp_adddistpublisher(Transact-SQL)
sp_changedistpublisher(Transact-SQL)
sp_helpdistpublisher(Transact-SQL)
복제 저장 프로시저(Transact-SQL)

관련 자료

How to: Disable Publishing and Distribution (Replication Transact-SQL Programming)

도움말 및 정보

SQL Server 2005 지원 받기