Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Unanswered: Dropping User owning objects in db

    I would like to drop some users who have left the company from the database , However sybase doesnot allow me to drop users which own objects in a database.

    These tables are still needed so how to change ownership of these tables so that i can delete the user.

  2. #2
    Join Date
    Aug 2004
    select <oldowner>.<tablename> into <[dbo]|newowner>.<tablename>

    extract all syntaxes of the table's attached objects (triggers & indeces) and
    mod em to point to the new table then recompile

    drop table <oldowner>.<tablename>

    sp_recompile <[dbo]|newowner>.<tablename>

    if you haven't dropped the old table, manually recompile all stored procs reffering to the table. No, sp_recompile will not work until then.

Posting Permissions

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