Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBCC Checktable

Status
Not open for further replies.

bstacy1

Technical User
May 21, 2002
11
US
The following was returned when I ran DBCC Checktable against a table in my database

0 rows affected on 204327 pages

My question is, why is the page count so high on a table that contains 0 rows?

 
Interesting one. Is this specific to this table or other empty ones as well? Which version of sybase are you using.

--do the following

dbcc traceon(3604)
go
dbcc checktable(<table>)
go
dbcc tablealloc (<table>, full,fix)
go

If you still see the same message and the table is empty and you can reverse engineer the table and triggers, then I suggest that you rename the table as follows:

sp_rename <table>, <table_prev>
go
-- create a table with the original name and make sure
-- that you add indexes, primary key and triggers.
--do

update statistics <table>
go
update index statistics <table>
go
sp_recompile <table>
go
and do checktable again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top