Hi Erix,

Please see below points for the things I completed and things I didn't completed.

Requirement: I wanted to check a production schema with multiple tables have been tampered or not before each new release. Because there can be issues due to the Table column changes, size changes done by unauthorized people. So my goal is to generate a Hash/Checksum value for each table in a schema and store in a table. In the next release deployment, I can run the script again and check the Hash/Checksum values whether the previous generated Hash/Checksum values are matched or not with the new Hash/Checksum list(This is mainly doing for the table ddl level). So if there are any mismatches between the Hash values, which means someone has changed or altered the tables.

Current Status: I have automated this via Perl script for Oracle DB by using DBMS_CRYPTO function. In oracle, I can get the tables and generate a Hash/Checksum value for per table level. Then store in a temporary table and export into a CSV file. Likewise, we can generate theses lists time to time.

Current Issue: As I explained, I have completed this task for the Oracle DB and need to extend this automated feature for PostgreSQL and DB2 databases. Due to the limitations in these databases, I couldn't find a way to generate a Hash/Checksum value for each table DDL level(table definition) in a schema. So that's the problem currently I have in my script... Hash/Checksum (unique key for identify any alterations later) generation in PostresSQL and DB2.


In reply to Re^8: Hashing temporal tables in PostgreSQL by gtk
in thread Hash generate and find tampered tables in PostgreSQL by gtk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.