August 6, 2014 at 2:59 pm
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/
August 6, 2014 at 3:32 pm
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
August 6, 2014 at 3:48 pm
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/
August 6, 2014 at 4:16 pm
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
August 6, 2014 at 4:16 pm
Blocking on the system tables would be my first guess. Did you check for blocking locks?
August 6, 2014 at 4:17 pm
D'oh. I type too slowly...
August 6, 2014 at 4:19 pm
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
August 6, 2014 at 5:14 pm
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