Nilkanth Desai
Nilkanth Desai

Reputation: 71

Which is the best practice to identify rows changes directly in sql server 2008?

I am working on a project where I have to identify rows in a table which wer modify directly without the use of Application that updates it. I have reviewed several techniques like Checksum and Hashing in SQL Server. My objective is cler out of 20 fields my 5 fields are important and if any changes made to these 5 fields my checksum/hash value must be changed. I am planning to use one sixt colum as rowversion column. Is it a better option to think on it? Please also quote your suggesions and what other alternatives I have? I have to decide which is the best alternative with I can proceed?

Thanks,

Nilkanth S. Desai

Upvotes: 0

Views: 349

Answers (1)

UnderflowE
UnderflowE

Reputation: 176

I can speak towards the Checksum route and highly discourage you from going with that option.

Microsoft BOL for Checksum states directly:

"we do not recommend using CHECKSUM to detect whether values have changed, unless your application can tolerate occasionally missing a change"

In some work with narrow tables, we have gone the route of using hashes created via Hashbytes in order to check for changes.

Upvotes: 1

Related Questions