Skip to Content
0

DBCC what to look for

Nov 15, 2016 at 03:52 PM

61

avatar image
Former Member

Bonjour,

I want to run DBCC to verify database integrity but quite honestly, I have thousands of tables and the ouputs of the dbcc are quite huge. Can you please tell me what I should put my attention to, what shoud I look for? Any documentation on the potential errors or warning in the DBCC output?

dbcc checktable

dbcc checkalloc

dbcc checkcatalog

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Bret Halford
Nov 15, 2016 at 06:39 PM
1

DBCC will report errors that it finds as numbered messages, so search your dbcc output for "Msg" to find them.

Example:

1> dbcc checktable(t1)
2> go
Checking table 't1' (object ID 624002223): Logical page size is 2048 bytes.

Checking partition 't1_624002223' (partition ID 624002223) of table 't1'. The
logical page size of this table is 2048 bytes.
Msg 697, Level 16, State 1:
Server 'rel157_bret_redhead', Line 1:
An attempt was made to fetch logical page '889' for database 'victimdb' (7),
object 't1' (624002223), index 't1' (0), partition 't1_624002223' (624002223)
from cache 'default data cache'. Wrong logical page '624002223' was found in
cache.

DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.

Most of the errors likely to be encountered are documented in the ASE Error Messages and Troubleshooting Guide.

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc00729.1500/html/errMessageAdvRes/title.htm

There are also some updated and new write-ups in a collection on the SCN wiki:

https://wiki.scn.sap.com/wiki/display/SYBASE/ASE+Error%2C+Fault%2C+and+Message+Writeups

Cheers,
-bret

Share
10 |10000 characters needed characters left characters exceeded
Mark A Parsons Nov 15, 2016 at 05:22 PM
0

I'd recommend you look at setting up a dbccdb database and then running the dbcc checkcatalog/checkstorage/checkverify commands.

While these commands won't hit all possible checks they do hit the vast majority of checks, and if you've got the dbccdb database and a named cache configured properly, you can run these dbcc commands relatively quickly (compared to the table/index-level commands) and with minimal hits on user activity (eg, don't have to worry about flushing large quantities of user data out of your current data caches).

See ASE System Admin Guide, Chapter 11: Checking Database Consistency for more details on setting up dbccdb as well as some comparisons of the various dbcc commands.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 15, 2016 at 06:16 PM
0

Thanks Mark,

this is something I plan to setup but meanwhile I need to run the DBCC check commands and honestly, don't know what to look for in terms of errors and/or warning.

I can not setup dbccdb quickly enough for the current situation. Any source of information for that?

Show 1 Share
10 |10000 characters needed characters left characters exceeded

When you're over the current operational hump and have some 'free' time, grab some popcorn and read through that chapter (see link in my previous post) on Checking Database Consistency.

Alternatively you can run a google search and you'll find several links, though keep in mind that there's some flexibility in how to setup and configure dbccdb so you may want to try out a few setups to see what works best in your environment (eg, configuring dbccdb to support running dbcc checkstorage against one database at a time ... vs ... configuring dbccdb to support running dbcc checkstorage concurrently for 2/3/4/.../N databases).

0
avatar image
Former Member Nov 15, 2016 at 07:20 PM
0

Awesome, exactly the info I needed, thanks Bret, that makes my life much easier right now and until I can setup the dbcc database.

Share
10 |10000 characters needed characters left characters exceeded