N2SVCD Configuration - DBApp

DB Application Configuration

The N2SVCD DB Application is a helper gateway application which performs asynchronous database requests. The default for Oracle SQL*Net DB requests is that the client will block and wait for the database lookup to complete. The N2SVCD DB Application spawns child processes which allow for long-running queries to be performed in the background, while allowing other tests and call processing to continue without interruption.

The following configuration is used to create a DB Application instance to perform asynchronous DB requests to a database server. A single DB Application instance will maintain a pool of connections to a single database server. If you need to connect to more than one remote database server, you must configure multiple DB Application instances (each with unique names).

In some cases, you may even wish to configure multiple DB Application instances to the same server. For example, you may wish to use one pool of DB connections for long-running queries, while creating a second pool for faster and more important queries.

<?xml version="1.0" encoding="utf-8"?>
    <application name="DB-SMF" module="DBApp">
        <parameter name="connect" 
        <parameter name="username" value="smf"/>
        <parameter name="password" value="top-s3cr3t"/>
        <parameter name="pool" value="3"/>
        <parameter name="post_login_sql" value="BEGIN SMF_SECURITY.RESPONSE(SMF.SMF_SECURITY_RESPONSE(SMF_SECURITY.CHALLENGE('N2 DB App'))); END;"/>

The application element attributes for a DB Application instance are:

Attribute Type Description
name String [Required] A unique name for this application instance.
module String [Required] DBApp
include.lib String [Required] ../apps/osd/lib
parameters Array [Required] Array of name = value Parameters for this Application instance.
.connect String [Required] The DBI connection string for the target database.
When using DBD::Oracle with port 1521, it is strongly suggested that you explicitly specify the ";port=<port-num>" component of the connection string, to avoid a 60 second connection delay associated with a failed attempt to connect to port 1526.
.username String Username to present to the database as credentials.
.password String Password to present to the database as credentials.
.pool Integer Number of simultaneous child processes to maintain - one database connection per child.
(Default = 2).
.backlog_timeout Integer Number of seconds to wait for a free connection before abandoning the request.
(Default = 10 seconds).
.server_timeout Integer Number of seconds to wait on a submitted request before abandoning the request.
(Default = 5 seconds).
.reconnect_interval Integer Time in seconds between attempts to re-connect a failed database connection.
(Default = 5 seconds).
.ping_interval Integer Time in seconds between 'ping' to check connection on an inactive database connection.
A ping_interval of zero will disable ping connection checks.
(Default = 60 seconds).
.long_raw_len String Maximum length in bytes for reading LONG RAW columns. Applicable to Oracle DB only.
(Default = 65536).
.post_login_sql String An SQL command to perform via "do" after the DB connection is made.
(Default = None).

Note: The DBI connection string format varies according to the type of target database.

For an Oracle DB the format is is dbi:Oracle:host=<host-name-or-ip>;sid=<oracle-sid>.