Checksum Attribute

Database

Checksum Attribute


Hi,

What is Checksum Attribute in Create Table statement ?

Thanks,
Syed
12 REPLIES

Re: Checksum Attribute

Please Help !

Re: Checksum Attribute

It basically specifies the (percentage) amount of data that should be used to compute the CHECKSUM for the table. It's used for detecting data corruption (bad blocks ?)

More % sample = More reliability in detecting errors, but to compute CHECKSUM over more data, you consume more CPU cycles and takes more time ...

Re: Checksum Attribute

Thanks Joedsilva.

Ok, I got some idea.

But I wonder why this thing is at Table level.

Why they have not put Checksum at Database level?

Re: Checksum Attribute

I am not sure of the exact reason, but I would presume it has something to do with the fact that Checksums are computed over the blocks belonging to the same table (Which would be practical/easier to perform than if it was spread across multiple tables) And then you also have the options of deciding the sampling percentages for different tables independently. So that critical tables can be given higher sampling % than the less critical ones. Also note that the resource consumption is directly proportional to the sampling %, hence the designers might have thought of giving a more granular control.

Re: Checksum Attribute


Cheers
Joedsilva.

Re: Checksum Attribute

I believe the table checksum attribute was intended for the supposedly
rare cases when it was necessary to override the system-wide default
settings.

You can use the DBSCONTROL utility to set the checksum level system-wide defaults
for each table type (including system tables).

Re: Checksum Attribute

really good and informative..

Re: Checksum Attribute

I'm getting the error "3706: Syntax error: Expected a CHECKSUM keyword" when i'm creating table like below.. can anyone help me.. its urgent..
TD version V2R12

CREATE SET TABLE BASE.SOME_TABLE ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
...
)
UNIQUE PRIMARY INDEX ( KEY );

"3706: Syntax error: Expected a CHECKSUM keyword"

Thanks in advance.

Re: Checksum Attribute

@Sree8135
In your SQL, you are using keyword 'KEY' as column which is causing this problem
If you do this
CREATE SET TABLE BASE.SOME_TABLE ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
"KEY" somedatatype ,
...
)
UNIQUE PRIMARY INDEX ( "KEY" );

It will work fine. Plz note "" in the above SQL

HTH

Irfan Ali