Looker support for Oracle was implemented using traditional Oracle deployments. If your Oracle database is an Oracle RAC deployment, Looker can integrate successfully but may have issues killing queries due to a difference in metadata for retrieving query connection IDs from nodes.
Encrypting network traffic
Looker strongly recommends encrypting network traffic between the Looker application and your database. Consider one of the options described on the Enabling secure database access documentation page.
If you’re interested in using SSL encryption, see the Oracle documentation.
Creating a Looker user
First, create a designated Looker user:
Next, give the new Looker user the ability to create sessions:
Finally, give the Looker user the appropriate SELECT
permissions for the data tables you plan to access from Looker. If you want to access additional tables in the future, you will need to grant SELECT
on those new tables as well.
Ensuring Looker can see all tables
Looker may not be able to identify tables (especially empty tables) without first collecting statistics in Oracle. If tables you need do not appear in generated LookML or SQL Runner, try executing:
For alternative methods, consult your Oracle documentation.
Setting up main database objects
Your Oracle DBA must set up the following objects and permissions on Oracle. The following commands create LOOKER_SESSION
and LOOKER_SQL
as synonyms for V$SESSION
and V$SQL
.
Run the following commands as the root user to complete this setup. These examples assume that the Looker user’s name is LOOKER
.
Setting up symmetric aggregates
Your Oracle DBA must set up the LOOKER_HASH
function to enable symmetric aggregates. The LOOKER_HASH
function is a synonym for the Oracle dbms_crypto.hash
function. The DBA must also create the associated synonym and privileges. The following commands assume that the Looker user’s name is LOOKER
:
Depending on your Oracle database configuration, the
SYS
prefix may beSYSDBA
,ADMIN
, or unnecessary.
Setting up persistent derived tables
To enable persistent derived tables, give the Looker user the UNLIMITED TABLESPACE
and CREATE TABLE
permissions. The following commands assume that the Looker user’s name is LOOKER
:
Setting up query killing
Follow these instructions to configure query killing for either a traditional Oracle deployment or an Amazon RDS deployment.
Traditional Oracle deployments
To set up query killing in traditional Oracle deployments, the Oracle DBA must create the LOOKER_KILL_QUERY
procedure as a synonym of ALTER SYSTEM KILL SESSION
. To do this, execute the following command:
The DBA will also need to run these related commands:
Depending on your Oracle database configuration, the
SYS
prefix may beSYSDBA
,ADMIN
, or unnecessary.
Amazon RDS deployments
In Amazon RDS Oracle deployments, the rdsadmin.rdsadmin_util.kill
procedure is used to kill queries. To use this procedure, the Looker database user must have the DBA
role assigned.
Because DBA is an elevated database role, you might consider skipping this step and forgoing query killing in Looker.
To give the Looker database user query killing abilities, run:
Setting up the Looker connection
In the Admin section of Looker, select Connections, and then select New Connection.
The majority of these settings are common to most database dialects, and are described on the Connecting Looker to your database documentation page. The following settings are specific to Oracle or to the example Connections Settings page shown above:
- Name: Specify the name of the connection. This is how you will refer to the connection in LookML projects.
- Dialect: Oracle.
- Use TNS: Enable Transparent Network Substrate (TNS) connections.
- Host: Hostname or TNS alias.
- Port: Database port.
- Database: Database name (if not using TNS).
- Service Name: Service name (if using TNS).
- Username: Database username or Temp Database if PDTs are enabled.
- Password: Database user password.
- Persistent Derived Tables: Check this box to enable persistent derived tables. This reveals the Temp Database field and the PDT Overrides column.
- Temp Database: In Oracle a user is a schema, so this should be specified as the name of the database user. For this example, we would use the temp schema value
LOOKER
. - Max PDT Builder Connections: Specify the number of possible concurrent PDT builds on this connection. Setting this value too high could negatively impact query times. For more information, see the Connecting Looker to your database documentation page.
- Additional Params: Leave this blank, since Oracle does not support additional JDBC parameters.
- PDT And Datagroup Maintenance Schedule: A
cron
expression that indicates when Looker should check datagroups and persistent derived tables. Read more about this setting in our PDT and Datagroup Maintenance Schedule documentation. - SSL: Check to use SSL connections.
- Verify SSL Cert: Ignore this field. Oracle will use the default Java Truststore to verify SSL.
- Max Connections: Can be left at the default value initially. Read more about this setting in the Max Connections section of the Connecting Looker to your database documentation page.
- Connection Pool Timeout: Can be left at the default value initially. Read more about this setting in the Connection Pool Timeout section of the Connecting Looker to your database documentation page.
- SQL Runner Precache: To cause SQL Runner not to preload table information and to load table information only when a table is selected, uncheck this option. Read more about this setting in the SQL Runner Precache section of the Connecting Looker to your database documentation page.
- Database Time Zone: Specify the time zone used in the database. Leave this field blank if you do not want time zone conversion. See the Using time zone settings documentation page for more information.
Feature support
For Looker to support some features, your database dialect must also support them.
In Looker 22.6, Oracle supports the following Looker features:
Next steps
After you have completed the database configuration, connect to the database from Looker.