Change Relational Database Server or Port

As part of the Backup/Restore process, you can reconfigure Essbase using a new Oracle database instance. This topic show how to change your relational database server or port.

Change Relational Database Server

  1. Stop the current running Essbase instance.
    cd <Oracle_HOME>/user_projects/domains/essbase_domain/esstools/bin
    ./stop.sh
  2. Create a new database <export_user_name> user and run ‘expdp’ command to make a schema backup. Only export the RCUPrefix_essbase schema.

    For example:

    alter session set container="containername";
    create user <export_user_name> identified by <password>;
    grant create session, create table to <export_user_name>;
    create or replace directory dmpdir to <export_user_name>;
    grant DATAPUMP_EXP_FULL_DATABASE to <export_user_name>;
    grant DATAPUMP_IMP_FULL_DATABASE to <export_user_name>;
    grant user <export_user_name> default tablespace users;
    alter user <export_user_name> quota unlimited on users;
    exit;
    expdp <export_user_name>/<password>@<pdbname> dumpfile=<RCUPrefix>.dmp logfile=<RCUPrefix>.log schema=<RCUPrefix>_ESSBASE directory=dmpdir
  3. It is highly recommended to make a backup of your applications directory. If you already have a backup, or your applications directory has many large applications, you can skip this step.

    For example:

    cd user_projects/applications/essbase/
    tar -cvfz ~/Backup/Apps.tar.gz app/*
  4. Configure a new Essbase instance against a new Oracle database. You will have a chance to enter the Domain Root and Application Directory path - with the following options:
    • If you want to re-use ‘user_projects’ as the main instance, and since it’s already being used by the old instance, then rename the old user_projects to something else before launching Configuration Tool.
    • Or enter a new ‘user_projects_XXX’ for Domain Root and Application Directory path of a new configuration.

    Note:

    Do not try to remove anything until a new instance is up and running.
    For example, (on the Domain Details configuration page, where you select Domain and Application locations):
    • Domain Name essbase_domain
    • Domain Root Oracle/21.4.2/Middleware/Oracle_Home/user_projects/domains
    • Application Directory /Middleware/Oracle_Home/user_projects/applications/essbase
    • WebLogic Administrator Account

      ...

  5. Finish configuring a new Essbase instance against a new Oracle database. Make sure to use a new schema name.
  6. Stop Essbase again (see step #1) after Configure Tool is done.
  7. Create a similar ‘expuser’ user for the new Oracle database and run ‘impdp’ command to restore data from dumpfile obtained from backup in step #3. Import RCUPrefix_essbase schema only with the remap option, if the new schema has a new name.

    For example:

    alter session set container="containername";
    create user <export_user_name> identified by <password>;
    grant create session , create table to <export_user_name>;
    create or replace directory dmpdir to <export_user_name>;
    grant DATAPUMP_EXP_FULL_DATABASE to <export_user_name>;
    grant DATAPUMP_IMP_FULL_DATABASE to <export_user_name>;
    grant user <export_user_name> default tablespace users;
    alter user <export_user_name> quota unlimited on users;
    exit;
    impdp expuser/<password>@<pdbname>  dumpfile=<schema_name>.dmp logfile=<schema_name>.log REMAP_SCHEMA=[OLD_SCHEMA]_ESSBASE:[NEW_SCHEMA]_ESSBASE directory=dmpdir partition_options=merge table_exists_action=replace  
  8. Restore applications directory from the backup or move it from the previous instance.
    cd user_projects/applications/essbase/
    tar xvf ~/Backup/Apps.tar
  9. Start Essbase for the new instance and make sure everything is running successfully. Since you haven’t deleted anything, you can always go back to the previous good instance if necessary. Once everything is working, then you can go ahead and clean up what you don’t need.
    cd <Oracle_HOME>/user_projects/domains/essbase_domain/esstools/bin
    ./start.sh
  10. If the original Essbase domain contained custom WebLogic managed-server settings, reapply those settings to the corresponding managed servers in the new domain.

    For example, if the old essbase_server1 used custom listen ports 9005 and 9006, set those same values for the new essbase_server1. If it used custom identity and trust keystores, select the same keystore configuration and specify paths that are valid in the new domain. If a custom JDBC data source refers to the old database host or port, update its JDBC URL and test the connection.

    In the WebLogic Administration Console, review each server under Environment > Servers, including its General and Server Start settings. If the original domain is unavailable, use a backup of the original domain configuration as a reference (<old_DOMAIN_HOME>/config/config.xml). Do not copy the backed-up config.xml wholesale into the new domain, because it may contain incorrect information.

    For more information, see -

Change Database Server Port Only

  1. Stop Essbase server.
    cd <Oracle_HOME>/user_projects/domains/essbase_domain/esstools/bin./stop.sh
  2. Change the database port in tnsnames.ora and listener.ora files, on the database server, to your required port, for example, 1524.
  3. Restart listener and restart the database. Check the connection in sql developer.
  4. In the following location on the Essbase server, do the following:
    cd <ORACLE_HOME>/user_projects/domains/essbase_domain/config/fmwconfig
    In jps-config.xml, change the port to the new port in this property.
    <property name="jdbc.url" value="jdbc:oracle:thin:@(description=(address=(host=DBhost)(protocol=tcp)(port=1524))(connect_data=(service_name=DBPDBname)(server=dedicated)))"/>
    In jps-config-jse.xml, make a similar change to the properties that refer to the database port.
    <property name="jdbc.url" value="jdbc:oracle:thin:@(description=(address=(host=DBhost)(protocol=tcp)(port=1524))(connect_data=(service_name=DBPDBname)(server=dedicated)))"/>
  5. In the following location, do the following:
    cd <ORACLE_HOME>/user_projects/domains/essbase_domain/config/jdbc
    Change the database port to the new port number in the following files

    essbase_datasource-jdbc.xml

    <url>jdbc:oracle:thin:@(description=(address=(host=DBHost)(protocol=tcp)(port=1524))(connect_data=(service_name=DBPDBName)(server=dedicated)))</url>

    LocalSvcTblDataSource-jdbc.xml

    <url>jdbc:oracle:thin:@(description=(address=(host=DBHost)(protocol=tcp)(port=1524))(connect_data=(service_name=DBPDBName)(server=dedicated)))</url>

    opss-audit-jdbc.xml

    <url>jdbc:oracle:thin:@(description=(address=(host=DBHost)(protocol=tcp)(port=1524))(connect_data=(service_name=DBPDBName)(server=dedicated)))</url>

    opss-auditview-jdbc.xml

     <url>jdbc:oracle:thin:@(description=(address=(host=DBHost)(protocol=tcp)(port=1524))(connect_data=(service_name=DBPDBName)(server=dedicated)))</url>

    opss-datasource-jdbc.xml

    <url>jdbc:oracle:thin:@(description=(address=(host=DBHost)(protocol=tcp)(port=1524))(connect_data=(service_name=DBPDBName)(server=dedicated)))</url>

    WLSSchemaDataSource-jdbc.xml

     <url>jdbc:oracle:thin:@(description=(address=(host=DBHost)(protocol=tcp)(port=1524))(connect_data=(service_name=DBPDBName)(server=dedicated)))</url>
  6. In the following location, do the following:
    cd <ORACLE_HOME>/user_projects/domains/essbase_domain/init-info
    Change the database port, in the following files, to the new port number.

    startup-plan-unsub.xml:

     <jvm:value>'OCI;SERVICE=DBHost:1524/DBPDBName'</jvm:value>

    startup-plan.xml:

    <jvm:value>'OCI;SERVICE=DBHost:1524/DBPDBName'</jvm:value>
  7. Restart Essbase.
    cd <Oracle_HOME>/user_projects/domains/essbase_domain/esstools/bin
    ./start.sh