본문 바로가기
㏈ª By β┖υΕJini/MS-SQL

Merge Replication - Could not delete the subscription at Subscriber 'XXXXX' in database 'XXXXDB'.

by ㏈ª ☞ β┖υΕJini.κR 2012. 8. 28.

게시 DB : SQL 2008 R2 10.05.2817 
구독 DB : SQL 2008 R2 10.05.1600


머지 복제에서 아래와 아래와 같은 오류가 발생 이후  Replication 동작 하지 않음

상태

- 구독자 View Synchronization Status Starting 만 표시후 반응 없음
- Reinitialize 되지 않음
- 아티클을 전부 제거 하였음에도 Replication 삭제 되지 않음
- Replication 삭제시  아래와 같은 에러 발생

TITLE: Microsoft SQL Server Management Studio
------------------------------

Could not delete the subscription at Subscriber 'XXXXX' in database 'XXXXX'.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.0.2100.60&EvtSrc=Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.
Replication.ReplicationMenuItem&EvtID=CantDeleteSubscriptionAt&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

User does not have permission to perform this action.
The subscription could not be dropped at this time.
Changed database context to 'ESales'. (Microsoft SQL Server, Error: 15247)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=10.50.2817&EvtSrc=MSSQLServer&EvtID=15247&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


1. Merget Replication

2. 구독자 삭제 시도


3. 아래와 같은 에러로 삭제 불가

삭제 방법

게시자 서버에서 실행

use [게시DB명]
exec sys.sp_dropmergesubscription
@publication = N'머지복제이름', 
@subscriber = N'구독자서버' ,
@ignore_distributor=1


exec 구독서버명.구독 DB명.sys.sp_mergesubscription_cleanup
@publisher = N'게시자서버', 
@publisher_db = N'게시DB' ,
@publication = N'머지복제이름'


exec sp_dropmergepublication @publication = N'머지복제이름'