Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2008

    Unanswered: How to Clean Garbage on System Tables

    Hi All,

    I have a big problem with some garbage on system tables. (Ex: suids which doesnt mach with uid from syslogins).

    I would like to know if someone was already develop a few querys to detect with rows on system tables are garbage.
    Normaly my garbage problems are between sysroles /sysusers/ sysprotects from each database by it will be good to detect automatly by some querys perform to each database.

    Any ideas will be welcome ?? or someone had the same problem in the past ???

    Thanks For All,

  2. #2
    Join Date
    Mar 2008
    Dear Bana
    If u r using proper sps like sp_dropuser,sp_droplogin etc .... then no such garbage condition will rise. for example if u try to drop a login, which have a user in some database, using sp_droplogin it will prompt a massage to drop the user first from any of the databases as following

    User exists or is an alias or is a database owner in at least one database. Drop
    the user or the alias, or change the database ownership before dropping the

    So such situation does not happen unless you are modifying system tables manually which is definately not recommemded.
    Last edited by ishu.cs; 01-27-09 at 10:45.

Posting Permissions

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