Can't Drop Table, Select or create a PK or Index

  • I Can't Drop Table, Select or create a PK or Index

    DBCC CHECKTABLE ("AC_LossDetails_Wrapper")

    DBCC results for 'AC_LossDetails_Wrapper'.

    There are 0 rows in 5 pages for object "AC_LossDetails_Wrapper".

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    It does not make sense?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • What doesn't make sense? There's nothing wrong with the check table output and without any more info on what you mean by 'can't Drop Table, Select or create a PK or Index', there's nothing much that can be said.

    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
  • It does not drop the table. I can't select, create a PK, etc.

    I never saw anything like this.

    It continues for ever. I does not finish. Am I making myself clear?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Your query is blocked. Check and see what is blocking you.

    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
  • Blocking on the system tables would be my first guess. Did you check for blocking locks?


    And then again, I might be wrong ...
    David Webb

  • D'oh. I type too slowly...


    And then again, I might be wrong ...
    David Webb

  • David Webb-CDS (8/6/2014)


    Blocking on the system tables would be my first guess. Did you check for blocking locks?

    Not on the system tables. On the table itself. Dropping, altering, creating a PK all require a schema modification lock. Any other lock on the table will block that. A select will be blocked by an exclusive lock.

    Probably an open transaction with a delete.

    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
  • There was an open query using an unfriendly name. I did not recognize it.

    Thank you.

    I was able to create the PK.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Viewing 8 posts - 1 through 7 (of 7 total)

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