Implicit connection management for the default activation group
The application requester can implicitly connect to an application server. Implicit connection occurs when the application requester detects the first SQL statement is being issued by the first active SQL program for the default activation group and the following items are true:
- The SQL statement being issued is not a CONNECT statement with parameters.
- SQL is not active in the default activation group.
For a distributed program, the implicit connection is to the relational database specified on the RDB parameter. For a nondistributed program, the implicit connection is to the local relational database.
SQL ends any active connections in the default activation group when SQL becomes not active. SQL becomes not active when the application requester detects that the first active SQL program for the process has ended and the following conditions are all met:
- There are no pending SQL changes
- There are no connections using protected conversations
- A SET TRANSACTION statement is not active
- No programs that were precompiled with CLOSQLCSR(*ENDJOB) were run
If there are pending changes, protected conversations, or an active SET TRANSACTION statement, then SQL is placed in the exited state. If programs precompiled with CLOSQLCSR(*ENDJOB) were run, then SQL will remain active for the default activation group until the job ends.
- At the end of a unit of work if SQL is in the exited state. This occurs when you issue a COMMIT or ROLLBACK command outside of an SQL program.
- At the end of a job.
Parent topic:
Connecting to a distributed relational database