Three Tier Oracle Security in London ~ Paul M. Wright

(nix, oracle, java, www, cloud ) intersect (safety, security, reliability, integrity)

Three Tier Oracle Security in London ~ Paul M. Wright RSS Feed
 

Checksumming database objects to check integrity

In addtion to timestamps and filesize the checksum of a DB object such as a PLSQL package is useful to verify integrity. This query will provide all the object names and corresponding checksums in a given schema.

select object_name,utl_raw.cast_to_raw(md5summer(object_type,object_name,owner)) from dba_objects where owner=’SYS’;

Where md5summer is a function wrapped around dbms_obfuscation_toolkit.md5.
Only problem is that this only work after 8iR3. Therefore previous to R3 need to use dbms_utility instead.

SELECT SUM(dbms_utility.get_hash_value(source,1000000000,power(2,30))) 
INTO HASH from sys.source$@scandb where sys.source$.obj#=SOURCE$OBJID;

This will work on 8,9 and 10. Of course there is the additional problem of how to check the checksummer…

Have a good week folks.

Leave a Reply

You must be logged in to post a comment.