Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    13

    Unanswered: Unable to drop user

    I restored a user database from another server and created a script to drop and recreate the users. This has worked for me in the past to synchronize logins/passwords. Recently I have been unable to drop two users and get the following error message:

    Server: Msg 15183, Level 16, State 1, Procedure sp_MScheck_uid_owns_anything, Line 17
    The user owns objects in the database and cannot be dropped.

    I'm unable to find any objects owned by the user and have unsuccessfully been able to drop them. Has anyone else anything similar to this error?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd substitute your user's name for Phred, then run:
    Code:
    SELECT o.name
       FROM dbo.sysusers AS u
       JOIN dbo.sysobjects AS o
          ON (o.uid = u.uid)
       WHERE  u.name = 'Phred'
       ORDER BY o.name
    -PatP

  3. #3
    Join Date
    Feb 2003
    Posts
    13

    Red face

    Thanks Pat that took care of it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •