IBM Support

Oracle Extended agent: The correct way to code a silent config response file

Technical Blog Post


Abstract

Oracle Extended agent: The correct way to code a silent config response file

Body

Recent Fixpack (FP2) of the Oracle Extended agent  V6.3.1 introduced some enhancements in the configuration process.

Now, it is possible to specify, using the UI or the command line, a connection type value between Basic, TNS and Advanced.

Depending on the connection type, you are requested to provide a different set of connection parameters.

With Basic connection type you must provide the Oracle server hostname and port, and the Service name or the SID;

with TNS connection type you must provide the TNS alias associated to the wanted Oracle instance;

with Advanced connection type you must provide the Oracle connection string.

Using the configuration UI or the command line, this is a driven procedure and there is little chance to make a mistake or to miss a needed parameter.

If you are instead going to use silent configuration method trough a response file, you must pay attention in using all the needed parameters depending on the connection type that you want to use.

The "Extended Oracle Agent Installation and Configuration guide" manual provides a sample response file, that anyway may by misleading because it does not include the keyword KRZ_CONN_TYPE.

 

It looks like the following:

********************************************************

<removed the part concerning TEMS connection>

INSTANCE=InstanceName
KRZ_CONN_USERID=UserID
KRZ_CONN_PASSWORD=Password
KRZ_ORACLE_HOME=home_path
KRZ_INSTANT_CLIENT_LIBPATH=LibPath
KRZ_TNS_PATHS=Net_Config_File_DIR
KRZ_DYNAMIC_LISTENER=FALSE
KRZ_CUSTOMIZED_SQL=SQL_File
KRZ_CONN_STR.connection1=//host:port/service
KRZ_CONN_USERID.connection1=UserID
KRZ_CONN_PASSWORD.connection1=Password
KRZ_CONN_MODE.connection1=Role
KRZ_LOG_PATHS.connection1=AlertLogPath
KRZ_LOG_CHARSET.connection1=CharSet

********************************************************

As you can see, the last 6 keywords are related to the connection called "connection1" (this suffix is a mandatory label needed to identify the connection associated to these parameters, because you can define multiple connections in the same response file).

We have a keyword KRZ_CONN_STR but there is no KRZ_CONN_TYPE.

Using this sample as-is may result in a wrong cfg file for the agent instance you are trying to configure, and as a consequence on a failed connection

to the target Oracle DB.

For example, if you use a response file like:

 

-----------

# Instance definitions
INSTANCE=ALDO1
KRZ_CONN_USERID=oraitm
KRZ_CONN_PASSWORD=anypaswd
KRZ_ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1
KRZ_TNS_PATHS=/u01/app/admin/network
KRZ_DYNAMIC_LISTENER=FALSE
KRZ_CONN_STR.INST1=//localhost:1521/ALDO1_4TIV
..

..

-----------

the resulting cfg file will look like:

INSTANCE=ALDO1 [    SECTION=customdefault [ ]    SECTION=default [ { KRZ_CONN_USERID=oraitm }  { KRZ_CONN_PASSWORD=\{AES256:keyfile:a\}xxxxxxxxxxxxxxx\=\= }  { KRZ_ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1 }  ]    SECTION=advanced [ { KRZ_DYNAMIC_LISTENER=FALSE }  { KRZ_TNS_PATHS=/u01/app/admin/network }  ]    SECTION=config:INST1 [ { KRZ_CONN_MODE=DEFAULT }  { KRZ_CONN_HOST= }  { KRZ_LOG_CHARSET=AL32UTF8 }  { KRZ_CONN_PORT=1521 }  { KRZ_CONN_TYPE=Basic }  { KRZ_CONN_TNS= }  { KRZ_CONN_STR= }  { KRZ_LOG_PATHS=/u01/app/oracle/oradata/ALDO1/diag/rdbms/aldo1/trace/alert_ALDO1.log }  ]    SECTION=customconfig [ ]    SECTION=customsummary [ ]]

 

The section INST1 contains some connection parameters, but most of them are empty, including KRZ_CONN_STR that was supposed to be instead correctly populated.

It occurs because the response file is missing the keyword "KRZ_CONN_TYPE", and the configuration process set default connection type to "Basic".

This connection type does not use KRZ_CONN_STR, so it does not write the wanted value in the output cfg file.

Furthermore, since we have not defined the parameters needed by Basic connection type (KRZ_CONN_HOST,KRZ_CONN_SERVICE or KRZ_CONN_SID),the configuration is clearly incomplete and will result in a failed connection to Oracle.

So depending on the connection type you want to use, you have to provide all the needed keywords in the response file, as follow:

 

Basic Connection Type

 

KRZ_CONN_TYPE.connection1=Basic
KRZ_CONN_HOST.connection1=oraclehostname
KRZ_CONN_PORT.connection1=oraclePort (default 1521)

KRZ_CONN_USERID.connection1=UserID
KRZ_CONN_PASSWORD.connection1=Password
KRZ_CONN_MODE.connection1=Role
KRZ_LOG_PATHS.connection1=AlertLogPath
KRZ_LOG_CHARSET.connection1=CharSet

KRZ_CONN_SERVICE.connection1=globaldatabasename

or

KRZ_CONN_SID.connection1=systemIdentifierOracleInstance

 

TNS Connection Type

KRZ_CONN_TYPE.connection1=TNS
KRZ_CONN_USERID.connection1=UserID
KRZ_CONN_PASSWORD.connection1=Password

KRZ_CONN_MODE.connection1=Role
KRZ_LOG_PATHS.connection1=AlertLogPath
KRZ_LOG_CHARSET.connection1=CharSet

KRZ_CONN_TNS.connection1=networkAliasFromTnsoraFile

Advanced Connection Type

KRZ_CONN_TYPE.connection1=Advanced
KRZ_CONN_USERID.connection1=UserID
KRZ_CONN_PASSWORD.connection1=Password

KRZ_CONN_MODE.connection1=Role
KRZ_LOG_PATHS.connection1=AlertLogPath
KRZ_LOG_CHARSET.connection1=CharSet

KRZ_CONN_STR.connection1=OracleConnectionString

 

Thanks for reading.

 

 

Tutorials Point

 

Subscribe and follow us for all the latest information directly on your social feeds:

 

 

image

 

image

 

image

 

 

  

Check out all our other posts and updates:

Academy Blogs:https://goo.gl/U7cYYY
Academy Videos:https://goo.gl/FE7F59
Academy Google+:https://goo.gl/Kj2mvZ
Academy Twitter :https://goo.gl/GsVecH


image

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSVJUL","label":"IBM Application Performance Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

UID

ibm11277122