Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Bonjour friends,

Does anyone have commands or steps to setup Db2 level auditing so we can look for which user(s) is using the database, when (timestamp) it was used and what that user did (eg which queries, tables, schema was accessed)?

Merci Geraldine

question from:https://stackoverflow.com/questions/66057734/db2audit-usage-questions-clarifications

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

Here is one of good article:
[Db2] Simple test case shell script for db2audit instance and database level auditing
https://www.ibm.com/support/pages/node/1075779

  • Excerpt of the SQLs in the article *
    db2 -v "drop db $DBNAME"
    db2 -v "create db $DBNAME"
    db2 -v "connect to $DBNAME"
    db2 -v "connect to $DBNAME user hoge using hoge"

  • Excerpt of the resutl of instance level auditing from that article *
    STATUS DATABASE USERID
    ----------- -------- ----------
    0 DB1 db2inst1
    0 DB1 db2inst1
    0 DB1 db2inst1
    0 DB1 db2inst1
    -30082 DB1 hoge
    -----

Much more information on it! So, it might be recommended to review this article.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...