JChem Oracle Cartridge - Getting started guide

Introduction

The aim of this guide is to provide help for our users to make their first steps with JChem Cartridge. Here, we collect only the inevitably necessary operations to execute a chemical database search using JChem Cartridge.

More detailed information about the administration and use of JChem Cartridge can be found in Administration guide of JChem Cartridge, Development Guide of JChem Cartridge , and in the documentation of Cartridge API.

Software requirements

See requirements described in the administration guide .

Installation of JChem Cartridge

See detailed description of the installation here.

The main steps of the installation are the following:

  • Download JChem Cartridge from ChemAxon's download site and install it on the computer you want to be the host of JChem Cartridge and JChem Server.

  • Start install.sh (or install.bat) from the <installed JChem's home directory>/cartridge/ (the data below are only examples)

    • Database descriptor type (sid, service_name, url) [sid]: <enter>

    • Name of the Oracle host [localhost]: <name of the Oracle host>

    • Oracle listener port [1521]: <enter>

    • Name of the Oracle database (sid) [mydb]: <enter>

    • The host name of the JChem Server [localhost]: host name, or static IP address

    • The port at which the JChem Server accepts connections [1099]: <enter>

    • Maximum memory allocated to the JChem Server process [700m]: <enter>

    • The structure cache id of this JChem Server instance [JCC1]: <enter>

    • DBA login [system]: system

    • DBA password:**** (your system password)

    • Name of the cartridge owner [jchem]: jchemuser (a new user name)

    • Password of the cartridge owner: ****** (give password for this new jchem user)

    • Do you want a role for basic JChem Cartridge user privileges to be created? (This role will be granted to jchem WITH ADMIN OPTION. DataVault users, please, answer with "n") (y, n) [y]: <enter>

    • The role for basic JChem Cartridge user privileges [JCC_BASIC_ROLE]: JCHEMUSER_ROLE (give a new role name)

    • Do you want public synonyms to be created? [y]: n

    • Proceed with the Install? (y, n) [n]: y

    • Do you want to install JChemServer as an operating system service? (y, n) [y]: n

  • Copy your license files into <installed JChem's home directory>/cartridge/licenses/ directory.

Starting JChem Server

Run server.sh start (or server.bat start) from the <installed JChem's home directory>/cartridge/

Create table

Connect to the above specified Oracle database with the above created cartridge owner (jchemuser/password). Create a regular table with SQL commands, and insert chemical structure(s) in one of the columns of that table.

create table mytable (identifier varchar(100), structure varchar2(1000));
insert into mytable (identifier, structure) values ('1','CCCC');
commit;

Note: Not only regular tables, but JChem tables can also be used in JChem Cartridge.

Create index

Prerequivisites:

  • JChem Server must be started.

  • Be connected to the above specified Oracle database with the above created cartridge owner (jchemuser/password), and the connection must be opened after the start of the JChem Server.

  • You have to run exec jchem_core_pkg.use_password('******');

In the case of connection problems, connect as System user and run

exec dbms_java.grant_permission('JCHEMUSER', 'SYS:java.net.SocketPermission', '<host name of JChem server>:1099', 'connect,resolve')

and

exec dbms_java.grant_permission('JCHEMUSER', 'java.security.SecurityPermission', 'createAccessControlContext', '')

Run create index mytable_idx on mytable(structure) indextype is jchemuser.jc_idxtype parameters ('structureType=anyStructures,haltOnError=nf');

Parametrization details of index creation can be read here.

Execute search

Prerequivisites:

  • JChem Server must be started.

  • Be connected to the above specified Oracle database with the above created cartridge owner (jchemuser/password), and the connection must be opened after the start of the JChem Server.

  • You have to run exec jchem_core_pkg.use_password('******');

In the case of connection problems, connect as System user and run

exec dbms_java.grant_permission('JCHEMUSER', 'SYS:java.net.SocketPermission', '<host name of JChem server>:1099', 'connect,resolve')

and

exec dbms_java.grant_permission('JCHEMUSER', 'java.security.SecurityPermission', 'createAccessControlContext', '')

Run SELECT * FROM mytable where jc_compare(structure, 'CCC', 't:s')=1;

Parametrization details of the jc_compare operator can be read here.