In this section: |
Configuring the adapter consists of specifying connection and authentication information for each of the connections you want to establish.
How to: Reference: |
In order to connect to an Oracle database server, the adapter requires connection and authentication information. You supply this information using the SET CONNECTION_ATTRIBUTES command. You can:
You can declare connections to more than one Oracle database server by including multiple SET CONNECTION_ATTRIBUTES commands. The actual connection to Oracle Server takes place when the first query that references the connection is issued. If you issue multiple SET CONNECTION_ATTRIBUTES commands:
You can configure the adapter from either the Web Console or the Data Management Console.
or
From the Data Management Console, expand the Adapters folder.
The Adapters folder opens.
The Add Adapter to Configuration pane opens.
The Oracle adapter is under the SQL group folder.
The following list describes the connection attributes for which you can supply values. To complete the attribute declaration, click the Configure button.
Is the logical name used to identify this particular set of connection attributes. There is no default connection name. You must provide a value.
Service (TNS) name used as a connect descriptor to an Oracle database server across the network. It must point to a valid entry in the tnsnames file.
Connection to a local database server can be entered as <local>. Note that <local> may not have a match in the tnsnames.ora file.
There are three methods by which a user can be authenticated when connecting to a database server:
Primary authorization ID by which you are known to the data source.
Password associated with the primary authorization ID.
Select a profile from the drop-down menu to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.
If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field (The extension is added automatically).
Store the connection attributes in the server profile (edasprof).
Explicit authentication. The user ID and password are explicitly specified for each connection and passed to Oracle, at connection time, for authentication.
ENGINE SQLORA SET CONNECTION_ATTRIBUTES connection TNS_name/userid,password
Password passthru authentication. The user ID and password are explicitly specified for each connection and passed to Oracle, at connection time, for authentication.
ENGINE SQLORA SET CONNECTION_ATTRIBUTES connection TNS_name/
Trusted authentication. The adapter connects to Oracle as an operating system login using the credentials of the operating system user impersonated by the server data access agent.
ENGINE SQLORA SET CONNECTION_ATTRIBUTES connection TNS_name/,
where:
Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.
Is a logical name used to identify this particular set of attributes.
Note that one blank space is required between connection and TNS_name.
Is the Service (TNS) name used as a connect descriptor to an Oracle database server across the network. It must point to a valid entry in the tnsnames file. Connection to a local database server can be entered as <local>. Note that <local> may not have a match in the tnsnames.ora file.
Is the primary authorization ID by which you are known to Oracle.
Is the password associated with the primary authorization ID.
The following SET CONNECTION_ATTRIBUTES command allows the application to access the Oracle database server named SAMPLESERVER, defined in tnsnames.ora as SAMPLESERVER, with an explicit user ID (MYUSER) and password (PASS). To ensure security, specify connection attributes from the Web Console, which encrypts the password before adding it to the server profile.
ENGINE SQLORA SET CONNECTION_ATTRIBUTES SAMPLESERVER SAMPLESERVER/MYUSER,PASS
The following SET CONNECTION_ATTRIBUTES command connects to the local Oracle database server and does not use tnsnames:
ENGINE SQLORA SET CONNECTION_ATTRIBUTES <Local> <Local>/MYUSER,PASS
The following SET CONNECTION_ATTRIBUTES command connects to the Oracle database server named SAMPLESERVER using Password Passthru Authentication:
ENGINE SQLORA SET CONNECTION_ATTRIBUTES SAMPLESERVER SAMPLESERVER/
The following SET CONNECTION_ATTRIBUTES command connects to a local Oracle database server using operating system authentication:
ENGINE SQLORA SET CONNECTION_ATTRIBUTES SAMPLESERVER SAMPLESERVER/,
The syntax for the SET CONNECTION_ATTRIBUTES command for this adapter has been enhanced to include a logical connection name that is designed to support the porting of applications from development to production environments. This enhanced syntax may necessitate the migration of existing CONNECTION_ATTRIBUTES commands.
The Web Console Migrate option migrates your server settings to the newer release. To access this option, select Workspace, then Configuration/Monitor from the menu bar. Right-click Migrate from the Server folder in the navigation pane, and select Configure. On the Migrate pane, type the full path of the configuration instance directory (EDACONF) and click the Migrate button. This is the recommended approach.
If you choose not to use the Migrate option, please note the following information:
For example, suppose that prior 7.6.1 the connection was defined as:
ENGINE SQLORA SET CONNECTION_ATTRIBUTES DSN_A/uid,pwd
When synonyms based on objects stored in this DSN_A are created, the Access Files contains the following description:
CONNECTION=DSN_A
If you then add a new connection, you must change the connection name from the default CON01 to DSN_A and save it as DSN_A in order to reuse the existing synonym. The connection is stored in the profile as:
ENGINE SQLORA SET CONNECTION_ATTRIBUTES DSN_A DSN_A/uid,pwd
How to: |
Once connections have been defined, the connection named in the first SET CONNECTION_ATTRIBUTES command serves as the default connection. You can override this default using the SET DEFAULT_CONNECTION command.
ENGINE SQLORA SET DEFAULT_CONNECTION connection
where:
Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.
Is the connection defined in a previously issued SET CONNECTION_ATTRIBUTES command. If this name was not previously declared, the following message is issued:
FOC1671, Command out of sequence
Note:
FOC1671, Command out of sequence.
The following SET DEFAULT_CONNECTION command selects the database server named SAMPLENAME as the default database server:
ENGINE SQLORA SET DEFAULT_CONNECTION SAMPLENAME
How to: |
The SET AUTODISCONNECT command controls the persistence of connections when using the adapter for each of the connections you want to establish.
ENGINE SQLORA SET AUTODISCONNECT ON {FIN|COMMAND|COMMIT}
where:
Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.
Disconnects automatically only after the session has been terminated. FIN is the default value.
Disconnects automatically after each request. Depending on how often the event occurs, the SET AUTODISCONNECT command may result in considerable overhead. Almost all of this overhead is not related to the server. It is related to the operating system and the data source.
Disconnects automatically only after COMMIT or ROLLBACK is issued as a native SQL command.
iWay Software |