by Gert-Jan Strik <sorry@[EMAIL PROTECTED]
>
Apr 23, 2008 at 06:42 PM
David ****tas wrote:
>
> "rcamarda" <robert.a.camarda@[EMAIL PROTECTED]
> wrote in message
>
news:2d88cd48-2853-4f01-b797-c5c166bd167d@[EMAIL PROTECTED]
> > Im using SQL Server 2005 currently patched.
>
> CHECKSUM isn't a reliable way to detect change because it's quite common
to
> find different rows with the same CHECKSUM value. You could use a
ROWVERSION
> column instead. ROWVERSION is guaranteed to increment when the row data
is
> updated.
>
> Another alternative is to use a hash. The HashBytes function will return
a
> secure hash of a binary value with a very high probability of
uniqueness.
> Duplicate hashes are theoretically possible but are incredibly unlikely
to
> occur unintentionally. If you are extremely paranoid then you can use
two
> different hashes.
>
> --
> David ****tas
I agree about the advice for use ROWVERSION.
However, CHECKSUM is also just a hash. Whether the chance of an
unnotices change is lower if you use HashBytes function instead of
CHECKSUM depends on your data.
Although adding a second hash value will lower the chance of a missed
change, it would be silly to do so. In the end you would need as many
hash bytes as there are bytes in the data.
--
Gert-Jan