Configuring the Adapter for IDMS/SQL

In this section:

x

Configure the adapter using the Web Console Adapter Add screen and click Configure.


Top of page

x
Declaring Connection Attributes

How to:

In order to connect to an IDMS/SQL 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 IDMS/SQL database server by including multiple SET CONNECTION_ATTRIBUTES commands. The actual connection to IDMS/SQL Server takes place when the first query that references the connection is issued. If you issue multiple SET CONNECTION_ATTRIBUTES commands:



x
Procedure: How to Declare Connection Attributes

You can configure the adapter from either the Web Console or the Data Management Console.

  1. From the Web Console menu bar, click Adapters.

    or

    From the Data Management Console, expand the Adapters folder.

    The Adapters folder opens.

  2. Expand the Available folder, if it is not already expanded.
  3. Expand the appropriate group folder and the specific adapter folder. The group folder is described in the connection attributes reference.
  4. Right-click the adapter name and/or version and select Configure.

    The Add Adapter to Configuration pane opens.

  5. Enter values for the parameters required by the adapter, as described in the connection attributes reference.
  6. Click Configure. The configured adapter is added to the Adapters list in the navigation pane.

Note: The IDMS adapter is under the SQL group folder. No input parameters are required.


Top of page

x
Overriding the Default Connection

How to:

An SQL session is a connection between the application and the IDMS/SQL data source. It begins when the application connects to a dictionary. You use the CONNECT command to override the IDMS/SQL default (automatic) connection. The length of time an SQL session stays in effect depends on whether the connection began automatically or a CONNECT command was issued. If the CONNECT command was issued, the SQL session is in effect until a COMMIT RELEASE, ROLLBACK RELEASE, or RELEASE command is executed. All of these commands may be executed within the IDMS/SQL session using SQL Passthru. Refer to the appropriate IDMS documentation for more information regarding SQL sessions.



x
Syntax: How to Override Default Connections With the CONNECT Command

Issue the following syntax within a stored procedure

ENGINE SQLIDMS CONNECT TO dictionary

where:

SQLIDMS

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

dictionary

Is the data source (dictionary) to start the IDMS/SQL session. The default is the dictionary in effect for the user session. This default is set outside of the server session, for example, with a SYSIDMS DICTNAME parameter. Refer to the appropriate IDMS documentation for a complete description.


Top of page

x
Other Session Commands

Other IDMS/SQL commands that affect the IDMS/SQL session can be executed explicitly.

To issue IDMS/SQL session commands such as COMMIT, COMMIT RELEASE, ROLLBACK, ROLLBACK RELEASE, and COMMIT CONTINUE, the syntax is:

ENGINE SQLIDMS COMMIT RELEASE

Top of page

x
Controlling the Connection Scope

How to:

The SET AUTODISCONNECT command controls the persistence of connections when using the adapter for each of the connections you want to establish.



x
Syntax: How to Control the Connection Scope
x
ENGINE SQLIDMS SET AUTODISCONNECT ON {FIN|COMMIT}

where:

SQLIDMS

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

FIN

Disconnects automatically only after the session has been terminated. FIN is the default value.

COMMIT

Disconnects automatically only after COMMIT or ROLLBACK is issued as a native SQL command.

The COMMIT setting frees the thread of execution for use by other users. The disadvantage is the cost of repeatedly connecting and acquiring a thread. Threads, once released, may not be available when needed, so you may experience delays while your request waits for a thread.

Depending on how often the event occurs, the 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.


iWay Software