Matt
Matt

Reputation: 13

SQL Server 2008: What is a sanity Check?

I came across a "Sanity Check" sql task in an old DTS Package, but I cannot open it to look at the code because of some error.

I was just wondering what a sanity check is and how to write one.

thanks

Upvotes: 1

Views: 4057

Answers (2)

ChristopheD
ChristopheD

Reputation: 116207

I was just wondering what a sanity check is...

Straight from wikipedia:

A sanity test or sanity check is a basic test to quickly evaluate whether a claim or the result of a calculation can possibly be true. The point of a sanity test is to rule out certain classes of obviously false results, not to catch every possible error. In arithmetic, for example, when multiplying by 9, using the divisibility rule for 9 to verify that the sum of digits of the result is divisible by 9 is a sanity test - it will not catch every multiplication error, however it's a quick and simple method to discover many possible errors.

In computer science, a sanity test is a very brief run-through of the functionality of a computer program, system, calculation, or other analysis, to assure that the system or methodology works as expected, often prior to a more exhaustive round of testing.

... and how to write one.

Apply the above.

Upvotes: 0

KM.
KM.

Reputation: 103607

a sanity check is some beyond error condition, like

if 1+1 !=2
BEGIN
   PRINT 'the sky is falling!!!'

END

Upvotes: 1

Related Questions