I have installed a local Publication.
For whatever reason I need to delete it from this server.
I tried with right-click Delete and with Disable Publishing and Distribution. The same result:
SQL Server could not disable publishing and distribution on <computer-name>\<sqlServerName>.
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 ‘master’. (Microsoft SQL Server, Error: 15517)”
the database didn’t have an owner so when i logged in (as any account) I was not able to alter the owner using a query. So I logged in as SA right clicked the database ->properties->files->…(2nd setting) and assigned the owner to SA. Now its sorted!