Hi Guys,
I have the following problem with SQL 2012 server.
someone setup a snapshot replication for one of the db. we want to detach this database (the one being replicated) and remove the replications db also and the replication. there are no subscriptions anymore.
the error that i receive is
Msg 15517, Level 16, State 1, Procedure sp_replcmds, Line 1
Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.
the publication db owner is SA and the db it is replicating to is a windows account.
I also tried the manual remove them using
-------Run the following script at the Subscriber:--------
USE <Subscription database name>
GO
EXEC sp_droppullsubscription @publisher = N'<Publisher server name>', @publisher_db = N'<Publication database name>', @publication = N'<Publication name>'
-------Run the following script at Publisher:---------
USE <Publication database name>
GO
EXEC sp_dropsubscription @publication=N'<Publication name>', @subscriber = N'<Subscriber server name>', @article = N'all', @destination_db = N'all'
-------To drop a snapshot publication, run the following script at Publisher:---------
USE <Publication database name>
GO
EXEC sp_droppublication @publication = N'<Publication name>'
USE master
GO
EXEC sp_droppublication @publication = N'<Publication name>'
exec sp_replicationdboption @dbname = N'<Publication database name>', @optname = N'publish', @value = N'false'
PLease can someone assist me..
Kind Regards