cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Checking Sybase database for consistency(dbcc commands)

Former Member
0 Likes
1,878

Good afternoon, colleagues.

Tell me what there is common measures to check the Sybase database for consistency? I of course mean dbcc commands. I would be happy with any links and if you share your personal experience in this matter.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Based on my long Sybase experience I think the best way is to use 'dbcc checkstorage':

1. configure database dbcc

2. run from crontab checkstorage each day/week  (before full backup) on each important system/user database

3. check from crontab/Bradmark/"any other" tool:

  a) dbccdb..dbcc_operation_log if in last 24 h there was a dbcc checkstorage

  b) link tables dbccdb..dbcc_operation_results, dbccdb..dbcc_operation_log, dbccdb..dbcc_types, dbccdb..dbcc_faults and check if there are any soft or hard errors

4. if you will be given any alert about error then run (on your own)

  sp_dbcc_summaryreport @dbname = <datbase_name where was error>, @display_recommendations = 1

5. read output and there will be information which dbcc command you shoul run (in most cases it's work)

It is the most sufficient and optimal way of checking datbase consistency

Former Member
0 Likes

Now that's similar to what I was saying. Just like training. I imagine something like this would be. Thank you for sharing experiences. That's what I intended to make the process of verifying the consistency of the database.

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Stepan,

Database Consistency Checker (dbcc) checks the logical and physical consistency of a database and provides statistics, planning, and repair functionality

Refer to document for different options available with dbcc command

http://infocenter.sybase.com/help/topic/com.sybase.dc36272_1251/pdf/commands.pdf

SyBooks Online

As per SAP note 1657303 - SYB: Checking database consistency


SAP does not mandate regular consistency checks of your database in order to remain supported.

If you want to regularly check your database consistency, you have the option to specify the 'with verify' clause in the dump database command. The 'with verify' clause allows you to specify 'header only' or 'full'. This instrucutes the Sybase 'backupserver'  to perform a minimal header or structural row check on the data pages as they are being copied to the archives.

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Likes

Thank you. This is all I read. In particular parameter 'with verify' does not give a complete check of consistency and there are a number of cases in the event of data loss which will not make a backup. Why I ask, wondering how in practice implements a check consistency, namely on real practical examples from your own experience.

Former Member
0 Likes

Hi Stepan,

From my experience I had an issue where one of the fragment size was showing 64TB which was not in actual. When we made of copy of this system , it was showing the correct size and not 64TB.

This issue was fixed by running dbcc checkdb fixed the issue.

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Likes

Thanks for the information . I understand adminastrotry SAP bypassing normal check database consistency , without nuances and subtleties . I started this discussion , because recently completed a course of advanced database administration Sybase, there told a lot of interesting moments and nuances that may arise . For example, when the page is linked but not allocated , the page which contains the data . In this case, the database dump with such problems , and these pages are skipped if not promptly resolve these issues, you can not get grease base and problem coasting dump will not be solved.