Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Tuesday, November 11, 2008

How to generate server_id for a new node manually

During a server move, Anand asked me this question:

How to generate server_id for a new server to which the instance has moved, without running autoconfig. The answer is the AdminAppServer utility. As per metalink note 93590.1:

The AdminAppServer class will perform three functions:

- Create an encoded SERVER_ID for this machine
- Create a _.dbc file in the $FND_TOP/secure
directory that contains the SERVER_ID as well as other machine - and
database-specific information.
- Add an row in the database table FND_APPLICATION_SERVERS with the
SERVER_ID and other machine-specific information.

As per Metalink Note 150475.1:

There are 3 'AdminAppServer' commands in the adgendbc.sh script. The order in the adgendbc.sh file (from the beginning of the file) should be:

AdminAppServer DELETE
AdminAppServer ADD
AdminAppServer UPDATE

Metalink note 187403.1 says:

Adding, Updating or Deleting Server IDs

Application servers can be registered as trusted machines with
a database server. This works by generating a large random ID
number and storing that in both the application server and the
database. When the application server attempts to connect to the
database it will supply its server ID and the database will verify
that it matches a trusted machine. The server ID is stored as a
parameter in the DBC file for each application server. It can
also be defined as an environment variable. The AdminAppServer
utility is used to generate server IDs and then register them
with a database server.

To add a server ID:

Server ID values are generated by the AdminAppServer utility, and
therefore cannot be supplied on the command line. They will be
added to the database automatically when the AdminAppServer is used
to create a dbc file:

jre oracle.apps.fnd.security.AdminAppServer apps/apps \
ADD [SECURE_PATH=$FND_TOP/secure] \
DB_HOST= \
DB_PORT= \
DB_NAME=

See the section on Creating DBC files in Administering Oracle
Applications Security in Release 11i for more details.

However the above command fails. We can get the correct command, if we open $COMMON_TOP/admin/install/adgendbc.sh:

$COMMON_TOP/util/jdk1.6.0_05/bin/java
-classpath "$COMMON_TOP/util/jdk1.6.0_05/lib/dt.jar:$COMMON_TOP/util/jdk1.6.0_05/lib/tools.jar:
$COMMON_TOP/util/jdk1.6.0_05/jre/lib/rt.jar:$COMMON_TOP/util/jdk1.6.0_05/jre/lib/charsets.jar:$COMMON_TOP/java/appsborg2.zip:$COMMON_TOP/java/apps.zip:$ORACLE_HOME/forms60/java:$COMMON_TOP/java" oracle.apps.fnd.security.AdminAppServer ADD FNDNAM=$USERNAME GWYUID=APPLSYSPUB/PUB "$DBC_CONNECT_ID" TWO_TASK=STAGE11I GUEST_USER_PWD=GUEST/ORACLE SECURE_PATH=$FND_TOP/secure
APPS_JDBC_DRIVER_TYPE=THIN DB_PORT=1521 DB_HOST=stage11i.justanexample.com NODE_NAME=$HOST_NAME FND_MAX_JDBC_CONNECTIONS=500 FND_JDBC_STMT_CACHE_SIZE=200 -nopromptmsg

No comments: