H Creating Oracle Entitlement Server Schemas for Apache Derby

Apache Derby 10.5.3.0 is an evaluation database included in your Oracle WebLogic Server installation. If you are using Apache Derby for Oracle Entitlements Server policy store, you must create schemas for Oracle Entitlements Server as described in this appendix.

Note:

Derby policy store is supported only on WebLogic Server. Derby database should be used for development purposes only.

Oracle strongly recommends you to use Oracle Database.

If you are using Apache Derby for Oracle Entitlements Server policy store, then you must complete the following steps:

  1. Open setNetworkServerCP (located in MW_HOME/wlserver_10.3/common/derby/bin on UNIX) or setNetworkServerCP.bat (located in MW_HOME\wlserver_10.3\common\derby\bin on Windows) in a text editor and specify the DERBY_HOME as shown in the following example:

    DERBY_HOME="MW_HOME/wlserver_10.3/common/derby"
    
  2. Start the Apache Derby database by running the following commands:

    • setNetworkServerCP (located in MW_HOME/wlserver_10.3/common/derby/bin on UNIX) or setNetworkServerCP.bat (located in MW_HOME\wlserver_10.3\common\derby\bin on Windows).

    • startNetworkServer (located in MW_HOME/wlserver_10.3/common/derby/bin on UNIX) or startNetworkServer.bat (located in MW_HOME\wlserver_10.3\common\derby\bin on Windows).

    You can also run startDerby.sh (located in wlserver_10.3/common/bin) or startDerby.cmd (located in wlserver_10.3\common\bin) to start the Apache Derby database. The Apache Derby database also starts automatically when you start Oracle WebLogic Server.

  3. Test the network server connection, by running ij (located in wlserver_10.3/common/derby/bin on UNIX) or ij.bat (located in wlserver_10.3\common\derby\bin on Windows) as follows:

    bin/ij
    
  4. Connect to the Apache Derby Server, as shown in the following example:

    ij> connect 'jdbc:derby://myhost/data/oesdb;create=true';
    

    oesdb is the name of database and data is the relative path (based on the directory where you start the server. In this example, it is Oracle/Middleware/wlserver_10.3/common/derby/bin where the database files will be saved.

  5. Open opss_user.sql (located in RCU_HOME/rcu/integration/opss/scripts/derby) in a text editor and replace &&1 with the schema owner.

    Note:

    After you download the rcuHome.zip file, extract the contents of the rcuHome.zip file to a directory of your choice. This directory is referred to as the RCU_HOME directory.

    For more information about Repository Creation Utility (RCU), refer to the Oracle Fusion Middleware Repository Creation Utility User's Guide.

    Repeat the above steps for the following SQL files (located in RCU_HOME/rcu/integration/opss/scripts/derby):

    • opss_tables.sql

    • opss_version.sql

    • opss_gencatalog.sql

    Note:

    This is the schema owner that you will need to specify when you configure the Oracle Entitlements Server described in Configuring Oracle Entitlements Server Administration Server.

    Oracle Identity and Access Management components require the existence of schemas in a database prior to installation. These schemas are created and loaded in your database using the Repository Creation Utility (RCU).

  6. Run the following SQL files (located in RCU_HOME/rcu/integration/apm/sql/derby) in the ij console:

    • run'opss_user.sql';

    • run'opss_tables.sql';

    • run'opss_version.sql';

    • run'opss_gencatalog.sql';

    Note:

    Ensure that you run the SQL files in the same order listed above and make a note of the schema owner and password that you have created.