locked
The database principal owns a service in the database, and cannot be dropped. RRS feed

  • Question

  • I try to drop a user from the database, but the system said the user own some service and cannot drop it. I have deleted all schema of the user(but it seems not the case ____ the error message said it own some 'services' not 'schema'). And I have try to search what service it own by the command and it shows nothing.

    select s.name as ServiceName
    from    sys.database_principals p
            inner join sys.services s on p.principal_id = s.principal_id
    where p.name = 'user'

    How can I solve the problem?

    Monday, November 8, 2010 4:24 AM

Answers

  • To troubleshoot this, I would suggest to put the profiler and try deleting use from database using SSMS. You would see bunch of queries and one of them would show the cause of failure.


    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Monday, November 8, 2010 6:14 AM