Migration of JChem Oracle Cartridge

    The aim of this document is to help our customers when they want to migrate their JChem Oracle Cartridge (JOC).
    Here we deal with cases when the database migration is executed by RMAN cloning of the database or by exporting/importing schemas.
    In the cases when the migration of the Oracle database was done by exporting the schemas from the old database and importing the schemas into the new database, the migration is only recommended in combination with a new JOC installation. The version of JOC can be the same or newer than the one used in the original environment.

    Migration of jchem sever only

    1. Stop jchem server

    2. Copy the full <jchem_home> folder to its new place

    3. Modify in jchem owner's (default name JCHEM, jcart.owner.login parameter in jcart.properties file) JC_IDX_PROPERTY table the rmi.server.1 property to the new host:port of the jchem server

    4. Give socketPermission to all cartridge users (Oracle schemas) for the new host:port exec dbms_java.grant_permission( '<USER>', 'SYS:java.net.SocketPermission', '<host>:<port>', 'connect,resolve' );

    5. Start jchem server running on its new host:port

    Migration done by RMAN cloning of the database, jchem server not moved

    1. Stop jchem server

    2. Clone the database

    3. Set the new database parameters (host, port, sid (or service name)) in the <jchem_home>/cartridge/conf/jcart.properties file

    4. Start jchem server

    Migration done by RMAN cloning of the database and moving the jchem server as well

    1. Stop jchem server

    2. Clone the database

    3. Copy the full <jchem_home> folder to its new place

    4. Set the new database parameters (host, port, sid (or service name)) in the <jchem_home>/cartridge/conf/jcart.properties file

    5. Modify in jchem owner's (default name JCHEM, jcart.owner.login parameter in jcart.properties file) JC_IDX_PROPERTY table the rmi.server.1 property to the new host:port of the jchem server

    6. Give socketPermission to all cartridge users (Oracle schemas) for the new host:port exec dbms_java.grant_permission( '<jchem_user>', 'SYS:java.net.SocketPermission', '<host>:<port>', 'connect,resolve' );

    7. Start jchem server running on its new host:port

    Export/Import of the database schemas and new installation of JOC

    1. Install new JOC (new JOC owner, new JCC_BASIC_ROLE, public synonyms)

    2. Create the new table/index owner, cartridge searcher user schemas

    3. Grant privileges to the cartridge users as SYSTEM user

      • GRANT JCC_BASIC_ROLE to <user>;

      • exec dbms_java.grant_permission( '<user>', 'SYS:java.net.SocketPermission', 'jchemserver 's host:port', 'connect,resolve' );

      • if synonyms are not public: call JCHEM.PRIVMAN_PKG.SYNS_FOR_JCOBJS('JCHEM','<user>');

      • call JCHEM.privman_pkg.grants_on_jcobjs('JCHEM', '<user>');

    4. Export only the table/index owners, cartridge searcher schemas, do not export the schema of the cartridge owner (default name JCHEM, jcart.owner.login parameter in jcart.properties file)

    5. Import these schemas into the schemas created above

    6. Drop jc_idxtype indexes - if exist

    7. In table/index owner's schemas delete the following tables - if exist

      • JCHEMPROPERTIES

      • JCHEMPROPERTIES_CR

      • JC_IDX_PROPERTY

      • <indexname>_JCX
      • <indexname>_JCX_UL
      • JC_IDX_UDOP

      • further tables - if exist - starting with JC_ or with the jc_idxtype <indexname>

    8. Create jc_idxtype indexes

    9. Grant - as the index owner - at least select right for the searcher users to the jc_idxtype indexes in table/index owner's schemas: call jchem.privman_pkg.grants_on_jcidx('SEARCHER_USER', 'INDEX_OWNER', 'indexname', 1, 0, 0, 0);