Database trace for a valid source
To produce the following database trace file example, we want to produce a database trace for input card 2 (which is a database). To do this, you must include the Trace adapter command (-TRACE) in the setting. Upon execution, database trace information is generated for input card 2; the example follows.
01 Database type is Oracle
02 Status returned to engine: (0) Success
03 No existing connection was found.
04 Connection to Oracle has been established.
05 Interface library version 6.0(140)
06 Data being retrieved for input card 2.
07 Database adapter version 6.0(140)
08 Starting a database unload...
09 Host string:
10 Userid : demo
11 Password : ****
12 Query : SELECT I.*, P.LIST_PRICE, P.MIN_PRICE, P.START_DATE, P.END_DATE
13 FROM ITEM I, PRICE P, PRODUCT PR
14 WHERE I.PRODUCT_ID = P.PRODUCT_ID and PR.PRODUCT_ID = 15 I.PRODUCT_ID
15 ORDER BY PR.PRODUCT_ID
16 Query size : 189
17 Output is to a buffer.
18 Statement execution succeeded.
19 The columns are of the following types:
20 Column 1 (ORDER_ID) type is NUMBER(4).
21 Column 2 (ITEM_ID) type is NUMBER(4).
22 Column 3 (PRODUCT_ID) type is NUMBER(6).
23 Column 4 (ACTUAL_PRICE) type is NUMBER(8,2).
24 Column 5 (QUANTITY) type is NUMBER(8).
25 Column 6 (TOTAL) type is NUMBER(8,2).
26 Column 7 (LIST_PRICE) type is NUMBER(8,2).
27 Column 8 (MIN_PRICE) type is NUMBER(8,2).
28 Column 9 (START_DATE) type is DATE.
29 Column 10 (END_DATE) type is DATE.
30 Number of buffers in fetch array = 574
31 Writing results to a buffer.
32 Retrieved 543 records (34451 bytes).
33 Status returned to engine: (0) Success
34 Cleaning up and closing the transaction...
35 The transaction was successfully committed.
36 Status returned to engine: (0) Success
37 Commit was successful.
38 Database disconnect succeeded.
This sample database trace file ( map_name .dbl) reveals important information, examples of which are described below.
- Lines 1-5 show information about the connection made, identifying the database type as Oracle as well as the version number of the interface library. In this example, there was no existing database connection and a new connection was successfully established.
- Line 6 indicates that the data is being retrieved for input card number 2.
- Line 7 identifies the version of the database adapter for Oracle. Lines 8-11 identify the information used to make the connection with the Oracle database: the host string, user ID, and password. Because this information is for an input card, there is a message indicating that a database unload is being started.
- Next, the database trace file indicates that the query successfully executed (as indicated by the following text on Line 18: Statement execution succeeded) and includes descriptions of the ten columns to be retrieved.
- The results of the query are written to the buffer. 543 records (rows) were retrieved using this query.
Use the Trace adapter command (-TRACE) for as many database source or targets as desired. Note that the information for later cards is appended to the default database trace file unless a file name is specified using the -TRACE filename option as described in the Resource Adapters documentation.
The exact information in the database trace file varies, depending upon the information returned by different entities including the database driver, database source versus target, and so on.