The following articles mainly describe a real use case provided by the DB2 9.7 autonomous transaction, as well as a detailed description of its prerequisites in actual operations, the following is a detailed description of the main content of the article. I hope you will have a better understanding of it after browsing.
A real use case provided by DB2 9.7 autonomous transactions:
Bank B wants to correctly record every query in a table containing sensitive customer data. To achieve this goal, application developers of Bank B obtain a set of interfaces that can be used to access sensitive data. Each interface is implemented as a stored procedure. The stored procedure returns the required information from the table, and records the queried employee user ID and the account number of the queried customer record, including the date and time.
Prerequisites
SQL makes the following assumptions:
Database connection exists
Disable Automatic submission
The statement Terminator is set to % by entering the DB2 CLP statement DB2 + c-td % when a new db2 CLP session is started.
Start
First, create necessary tables. You need to use one table to store sensitive customer information, and the other table to store the information recorded each time you access sensitive information. Listing 3 shows an example.
The above content is an introduction to a real use case provided by DB2 9.7 autonomous transactions. I hope you will gain some benefits.
The above content describes a real use case provided for the DB2 9.7 autonomous transaction, hoping to help you in this regard.