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

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

db2 - db2audit usage questions/clarifications

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...