Setting up Oracle database for SSB

After installing Oracle database server, you must rename the JDBC connector, and create a database with credentials for SQL Stream Builder (SSB) before installing the service on your cluster. You also must install the Oracle Python connector to integrate with the Streaming SQL Console.

Before you begin

You need to install and configure Oracle database, before setting up the databases for SSB. To install and configure Oracle DB, you must complete the basic steps mentioned in the Private Cloud Base documentation.

Installing the Oracle JDBC connector

  1. Download the Oracle JDBC Driver from the Oracle website.
  2. Rename the JDBC jar file to oracle-connector-java.jar.
    mv ojdbc8-19.3.0.0.jar oracle-connector-java.jar
  3. Copy the Oracle JDBC jar file to your host.
    This host must be the same host where you plan to assign the Streaming SQL Console service role. The service roles are assigned as a next step when installing SQL Stream Builder as a service in Cloudera Manager.
    scp <location>/oracle-connector-java.jar root@<your_hostname>:
    You will be prompted to provide your password.
  4. Access the host on your cluster.
    This host must be the same host where you have added the JDBC jar file.
    ssh root@<your_hostname>
    You will be prompted to provide your password.
  5. Copy the Oracle JDBC jar file to /usr/share/java folder using the following command:
    sudo mkdir -p /usr/share/java
    sudo cp <location>/oracle-connector-java.jar /usr/share/java
    sudo chmod 644 /usr/share/java/oracle-connector-java.jar
  6. Check if the Oracle connector is in the folder with ls command.

Creating Oracle database for SSB

  1. Access a host on your cluster.
    This host must be the same host where you plan to assign the Streaming SQL Console service role. The service roles are assigned as a next step when installing SQL Stream Builder as a service in Cloudera Manager.
    ssh root@<your_hostname>
    You will be prompted to provide your password.
  2. Log in to the Oracle client:
    sqlplus system@localhost
    Enter password: ******
    
  3. Create a user and schema for Streaming SQL Console:
    create user ssb_admin identified by <password> default tablespace ssb_admin;
    grant CREATE SESSION to ssb_admin;
    grant CREATE TABLE to ssb_admin;
    grant CREATE SEQUENCE to ssb_admin;
    grant EXECUTE on sys.dbms_lob to ssb_admin;
  4. Grant a quota on the ssb_admin tablespace where the tables will be created:
    ALTER USER ssb_admin quota 100m on ssb_admin;
    You can also create unlimited space with the following command:
    ALTER USER ssb_admin quota unlimited on ssb_admin;
  5. Confirm that you have created the Streaming SQL Console and Materialized View Engine database using the \l command.