Results 1 to 6 of 6

Thread: Deleting users

  1. #1
    Join Date
    Mar 2004
    Posts
    11

    Unanswered: Deleting users

    Quick question:

    What is the easiest way to delete a user account?

  2. #2
    Join Date
    Mar 2004
    Posts
    11
    I ask because sp_droplogin gives me a message, something about the user being an owner of objects.

    I'm not sure of how to proceeed

  3. #3
    Join Date
    Nov 2002
    Posts
    833
    do you want to drop a login from the server or
    do you want to drop a user from a certain database?

    if a login is still owning objects , i.e. has rights within a database of that server and owns a procedure or sth. you can't drop her, you first have to drop the objects which the login owns ....

  4. #4
    Join Date
    Mar 2004
    Posts
    11
    Thanks for the reply,

    Yes, I want to drop a user from a database.

    So, if I understand you correctly, I have to first drop that particular users ownership of objects and then drop the login?

    Forgive me for asking, but how do I find this info? sp_displaylogin does not show me much.

    And once I find it how do I go about removing these objects from the user?

  5. #5
    Join Date
    Nov 2002
    Posts
    833
    you want to drop a user from the database

    isql
    > use <database>
    >go
    >sp_dropuser <user you want to drop>
    >go

    or use sybase central instead if you don't like the commend shell
    I'm assuming all objects within a database are owned by dbo
    and individual users are granted using these objects via a role
    when the user is dropped successfully
    >sp_droplogin <login to be removed>
    >go

    osy

  6. #6
    Join Date
    Mar 2004
    Posts
    11
    Thanks,

    That was what I needed to know.

Posting Permissions

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