Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: CHECKSUM to...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 10984 of 11517
Post > Topic >>

Re: CHECKSUM to determine record changes

by "David Portas" <REMOVE_BEFORE_REPLYING_dportas@[EMAIL PROTECTED] > Apr 22, 2008 at 07:25 AM

"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
 




 4 Posts in Topic:
CHECKSUM to determine record changes
rcamarda <robert.a.cam  2008-04-21 15:22:36 
Re: CHECKSUM to determine record changes
rcamarda <robert.a.cam  2008-04-21 15:33:34 
Re: CHECKSUM to determine record changes
"David Portas"   2008-04-22 07:25:56 
Re: CHECKSUM to determine record changes
Gert-Jan Strik <sorry@  2008-04-23 18:42:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 1:01:20 CST 2008.