Error Deleting publication Microsoft SQL Server, Error: 15517


  • 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:


    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:




    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


  • 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