2.1.1 Customer Managed Oracle Database

A regular Oracle database can be used as a metadata store by editing the file jetty-osa-datasource.xml, in /u01/app/osa/osa-base/etc folder.

Note:

After configuring the OSA to a new metadata store, execute the below sql to the same user/schema.

UPDATE osa_system_property SET value="true" where mkey="osa.oci.instance".

Follow the steps below to use Oracle database as a metadata store:

  1. Stop GGSA by running the command sudo systemctl stop osa.
  2. Comment the MySQL section in jetty-osa-datasource.xml file as shown below.
    <?xml version="1.0"?>
    <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
    <Configure id="Server" class="org.eclipse.jetty.server.Server">
    <!--
     <New id="osads" class="org.eclipse.jetty.plus.jndi.Resource">
            <Arg>
                <Ref refid="wac"/>
            </Arg>
            <Arg>jdbc/OSADataSource</Arg>
            <Arg>
                <New class="com.mysql.cj.jdbc.MysqlConnectionPoolDataSource">
                    <Set name="URL">jdbc:mysql://localhost:3306/OSADB</Set>
                    <Set name="User">osa</Set>
                    <Set name="Password">
                        <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate">
                            <Arg>OBF:{OBFUSCATED_PASSWORD}</Arg>
                        </Call>
                    </Set>
                    <Set name="maxAllowedPacket">209715200</Set>
                    <Set name="allowPublicKeyRetrieval">true</Set>
                </New>
            </Arg>
        </New>
    -->
    </Configure>
    
  3. Add the following section for Oracle database right below the commented section.
    <New id="osads" class="org.eclipse.jetty.plus.jndi.Resource">
             <Arg>
                 <Ref refid="wac"/>
             </Arg>
             <Arg>jdbc/OSADataSource</Arg>
             <Arg>
                 <New class="oracle.jdbc.pool.OracleDataSource">
                     <Set name="URL">jdbc:oracle:thin:@myhost.example.com:1521:XE</Set>
                     <Set name="User">osa</Set>
                     <Set name="Password">
                        <Call class="org.eclipse.jetty.util.security.Password" name="deobfuscate">
                            <Arg>OBF:{OBFUSCATED_PASSWORD}}</Arg>
                        </Call>
                    </Set>
                    <Set name="connectionCachingEnabled">true</Set>
                    <Set name="connectionCacheProperties">
                        <New class="java.util.Properties">
                            <Call name="setProperty"><Arg>MinLimit</Arg><Arg>1</Arg></Call>
                            <Call name="setProperty"><Arg>MaxLimit</Arg><Arg>15</Arg></Call>
                            <Call name="setProperty"><Arg>InitialLimit</Arg><Arg>1</Arg></Call>
                        </New>
                    </Set>
                 </New>
             </Arg>
    </New>
    
  4. Decide on an OSA schema username and a plain-text password. For example, osa as schema user name and alphago as password.

    Change directory to /u01/app/osa/lib and execute the following command:

    java -cp ./jetty-util-9.4.17.v20190418.jar org.eclipse.jetty.util.security.Password osa <your password>

    For example, java -cp ./jetty-util-9.4.17.v20190418.jar org.eclipse.jetty.util.security.Password osa alphago

    You should see results like below on console:

    2019-06-18 14:14:45.114:INFO::main: Logging initialized @1168ms to org.eclipse.jetty.util.log.StdErrLogalphago

    OBF:obfuscated password

    MD5:34d0a556209df571d311b3f41c8200f3

    CRYPT:osX/8jafUvLwA

    Note down the obfuscated password string that is displayed (shown in bold), by copying it to clipboard or notepad.

  5. Change database host, port, SID, osa schema user name and osa schema password fields marked in bold in the code in Step 3.
  6. The next step is to initialize the metadata store and set the password for user osaadmin.

    Note:

    You will need database administrator credentials with sysdba privileges to perform this step.
    1. Change directory to /u01/app/osa/osa-base/bin
    2. Execute ./start-osa.sh dbroot=<db sys user> dbroot_password=<db sys password> osaadmin_password=${OSA_ADMIN_PASSWORD}
    3. Execute ./stop-osa.sh
    4. Execute sudo systemctl start osa, to start GGSA as a system service