1.10.2 Two-Tier Deployments of Oracle Graph with Autonomous Database

In two-tier deployments, the client graph application connects directly to the Autonomous Database.

  1. Install Oracle Graph Client, as explained in Installing the Java Client Using a Zip File.
  2. Establish a JDBC connection, as described in the Oracle Autonomous Warehouse documentation.

    You must download the wallet and unzip it to a secure location. You can then reference it when establishing the connection as shown in Example 1-1.

  3. Start the Java Shell as shown in the code:
    /bin/opg4j --no_connect
  4. Connect to your database as shown in Example 1-1.

Note:

If you need to use the Graph Visualization Application, you must additionally install the Oracle Graph Server.

Example 1-1 Creating a Database Connection in a Two-Tier Graph Deployment with Autonomous Database


opg4j> var jdbcUrl = "jdbc:oracle:thin:@<tns_alias>?TNS_ADMIN=<wallet_location>" // jdbc url to the DB
opg4j> var user = "<user>"
opg4j> var pass = "<password>"
opg4j> var conn = DriverManager.getConnection(jdbcUrl, user, pass) // connecting to the DB
conn ==> oracle.jdbc.driver.T4CConnection@57e6cb01
In the preceding example:
  • <tns_alias>: TNS alias used in tnsnames.ora file
  • <wallet_location>: Path to the directory where the wallet is stored
  • <user>: Name of the database user
  • <password>: Password for the user