duplicate table name in sysobjects

  • This happened in SQL 2000 yesterday, for no apparent reason. Unfortunately could not get all details before that dba did a DROP TABLE which got rid of both entries.

    Trying to run a CREATE TABLE statement got error something like `table name already exists`. Viewing via Enterprise Manager showed single table, but ...

    SELECT name FROM sysobjects WHERE name='x'

    -- got 2 rows

    How can that happen?!?

  • Different owners?

    Someone messing with Allow Updates?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Different owners a possibility. How would I find out if that situation exists?

  • In sysobjects, the uid column will be different. You can join to sysusers to get the name of the table owner

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply