Issue: A DAD was configured for the “mod_plsql” module in OHS. However when attempting to run a database procedure via OHS, the following error message is displayed in the end-user’s browser which will result in an OHS failure with dads.conf misconfigurations:

“The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.” The HTTP error was a 503 error.

Cause:

We reproduced the issue and found in the OHS logs that OHS had a TNS error and couldn’t resolve the database SID that was configured in the PlsqlDatabaseConnectString parameter in the $ORACLE_INSTANCE/config/OHS/ohs1/mod_plsql/dads.conf file.

The correct entries were in the $TNS_ADMIN/tnsnames.ora file.

The exact cause was OHS could not resolve the SID against the logical name provided in PlsqlDatabaseConnectString value in dads.conf against the SID configured in tnsnames.ora.

For example:

  • tnsnames.ora:
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )
  • dads.conf:
    <Location /pls/plsqlapp>
    SetHandler pls_handler
    Order deny,allow
    Allow from all
    AllowOverride None
    PlsqlDatabaseUsername scott
    PlsqlDatabasePassword tiger
    PlsqlDatabaseConnectString orcl
    PlsqlDefaultPage scott.home
    PlsqlDocumentTablename scott.wwdoc_document
    PlsqlDocumentPath docs
    PlsqlDocumentProcedure scott.wwdoc_process.process_download
    PlsqlAuthenticationMode Basic
    </Location>

Solution:

To prevent an OHS failure with dads.conf misconfigurations, in the $ORACLE_INSTANCE/config/OHS/ohs1/mod_plsql/dads.conf file, specify a full TNS connect string in the “PlsqlDatabaseConnectString” parameter. Save changes to dads.conf and reboot OHS to apply changes. Once OHS is successfully rebooted, test.

Format of a full TNS connect string is as follows: db_host:db_port:SID

Here is an example of how the TNS connect string should be structured (using tnsnames.ora example from above): hostname:1521:orcl