none
Error Deleting publication Microsoft SQL Server, Error: 15517

    Question

  • I have a MSSQL 2008 on a windows 2008 server.

    I cant delete a publication that isnt in use anymore i get the following error.

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

    Could not delete publication 'TASS Publication'.

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

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

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

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

    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.
    Changed database context to 'tass'. (Microsoft SQL Server, Error: 15517)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=15517&LinkId=20476

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

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

     

    I have tried to delete it by right clicking and delete. I have tried by query.

    exec sp_removedbreplication N'<sqlServerName>'

    exec sp_droppublication @publication = N'<sqlServerName>'

     

    I have looked at many forums.

    I am trying to do this as 'sa'.

    Do you have any suggestions?

    Monday, August 09, 2010 2:52 AM

Answers

  • johnyvee,

    Firstly, exec sp_removedbreplication should be corrected in your msg above to have the parameter of 'databasename' instead of 'sqlservername' same for the droppublciation procedure, it must be passed the publication name and not the servername.

    Secondly, go to the properties of 'TASS' database and under Files make sure you have an owner specified, specify sa for example.

    • Marked as answer by JonathonV Monday, August 09, 2010 3:03 AM
    Monday, August 09, 2010 2:57 AM

All replies

  • johnyvee,

    Firstly, exec sp_removedbreplication should be corrected in your msg above to have the parameter of 'databasename' instead of 'sqlservername' same for the droppublciation procedure, it must be passed the publication name and not the servername.

    Secondly, go to the properties of 'TASS' database and under Files make sure you have an owner specified, specify sa for example.

    • Marked as answer by JonathonV Monday, August 09, 2010 3:03 AM
    Monday, August 09, 2010 2:57 AM
  • then you can try to remove the publication again.

    let me know.

    Monday, August 09, 2010 2:57 AM
  • Perfect. Thanks it worked.
    Monday, August 09, 2010 3:04 AM
  • Thanks!
    Tuesday, May 15, 2012 5:29 AM
  • Great, thanks, that 'Secondly' worked for me!
    Monday, September 03, 2012 9:07 AM
  • Thanks so much.
    Saturday, May 04, 2013 8:33 AM
  • The second option worked for me, thanks.
    Wednesday, December 18, 2013 7:30 AM