cancel
Showing results for 
Search instead for 
Did you mean: 

Validation should check the signature, too

VolkerBarth
Contributor
2,346

Based on that question, I would suggest that the validation of a database should check the signature string, too.

As John and Mark have explained in comments on this answer, some bytes in the first database page (the "signature") state whether the database file is valid or not.

Well, if the signature is invalid, validation of the database should give an error, too.

Nevertheless, the following statement running on my (not successfully upgraded) database (under 12.0.1.3356) returned no errors at all:

call dbo.sa_validate()

That just seems wrong.

Side effect: If it had given an error, the maintenance plan would not have overwritten a valid database backup.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

I don't think I have ever said this Volker, but I disagree with you in this case. In order for you to call dbo.sa_validate(), you need to be running the database. That means that the signature was valid at the time you started the database. The only way the signature can subsequently become invalid is through a failed upgrade as stated in my answer in your other post. So, while I agree that the enhancement you suggest might be worthwhile in some small way, I think it is better to enhance the documentation to state clearly that a failed upgrade will lead to an invalid database file and hence a backup is absolutely essential prior to starting the upgrade process.

VolkerBarth
Contributor
0 Kudos

"I don't think I have ever said this Volker" - that's alright with me:)

Well, if the only way a signature can become invalid is because of a failed upgrade, then I agree that the announced enhancement for an ALTER DATABASE restart warning would solve this issue better.

Nevertheless, I would naively expect that the validation of any database page (and isn't this what validation is for) would check for invalid contents. - Would validation notice when a page of a running database gets corrupted by a virus or the like? (I'm aware that the database files are opened exclusively by the database engine - but I could imagine that malicious programs might be able to overcome that protection.)

Former Member

Fair enough Volker. I have opened an enhancement request to have validate database verify the database signature.

Answers (0)