InterviewSolution
| 1. |
Explain And Differentiate Between Settrans () And Settransobject ()? |
|
Answer» While using settrans () the user need not specify an explicit CONNECT or DISCONNECT statement in the script since PB internally calls them whenever required. As PART of internal transaction management of DW controls, when the DW needs to access the DB, the DW control issues an internal CONNECT, performs data access and then issues an internal DISCONNECT. Settransobject () is used when the user goes for a separate transaction object (example SQLCA) or creates a separate one in the script. The sequences of statements are as follows: Transaction tra_1 tra_1 = CREATE transaction tra_1.DBMS = “ODBC” tra_1.database = “myDB” CONNECT using tra_1 Dw_1. Settransobject (tra_1) Dw_1. Retrieve () While using settrans () the user need not specify an explicit CONNECT or DISCONNECT statement in the script since PB internally calls them whenever required. As part of internal transaction management of DW controls, when the DW needs to access the DB, the DW control issues an internal CONNECT, performs data access and then issues an internal DISCONNECT. Settransobject () is used when the user goes for a separate transaction object (example SQLCA) or creates a separate one in the script. The sequences of statements are as follows: Transaction tra_1 tra_1 = CREATE transaction tra_1.DBMS = “ODBC” tra_1.database = “myDB” CONNECT using tra_1 Dw_1. Settransobject (tra_1) Dw_1. Retrieve () |
|