Oracle data source Configure the Oracle data source

Configure the Oracle data source

Grafana provides a number of configuration options for the Oracle data source. For general information on installing a data source, see Install Grafana plugins. For general information on adding a data source see Add a data source.

Only users with the organization administrator role can add data sources. Administrators can also configure the data source via YAML with Grafana’s provisioning system.

To install the Oracle plugin, see Installation on the Oracle plugin page.

Configure the data source

To add the Oracle data source, complete the following steps:

  1. Install the Oracle plugin.
  2. Click Connections in the left-side menu.
  3. Under Connections, click Add new connection.
  4. Enter Oracle in the search bar.
  5. Select Oracle Database under the Data Source section.
  6. Click Add new data source in the upper right.

You will be taken to the Settings tab where you will set up your Oracle configuration.

Configuration options

The following is a list configuration options for Oracle.

The first option to configure is the name of your connection:

  • Name - The data source name. This is how you refer to the data source in panels and queries. Examples: Oracle Database-1, Oracle-DB-Sales.

  • Default - Toggle to select as the default name in dashboard panels. When you go to a dashboard panel this will be the default selected data source.


You can connect to Oracle via 2 different connection methods, depending on whether you have an on-premise or cloud account.

  • Host with TCP Port - Connect with a hostname or IP address with the TCP port number.

    • Host - Hostname with IP address with TCP port number.

    • Database - Name of the database.

  • TNSNames Entry - Specify a tnsnames.ora entry for connection. Note that this is not available in Grafana Cloud.

    • TNSName - The configuration connection specified in the tnsnames.ora file.


There are several authentication methods you can choose in the Authentication section. Authentication methods depend on your connection method.

You can select the following authentication methods from the dropdown menu.

  • Basic authentication -The only authentication available with the Host with TCP Port connection method. Authenticate with a username and password.

    • User - The Oracle username with access to the specified database.

    • Password - The Oracle password with access to the specified database.

  • Kerberos Authentication - Kerberos authentication only works with TNSNames enabled, and must be configured in the tnsnames.ora configuration file. See Kerberos for configuration parameters. Follow Oracle’s documentation Configuring Kerberos Authentication to integrate Oracle with Kerberos.

Note: Kerberos authentication is not supported in Grafana Cloud.

Private data source connect (PDC) and Oracle Database

Use private data source connect (PDC) to connect to and query data within a secure network without opening that network to inbound traffic from Grafana Cloud. See Private data source connect for more information on how PDC works and Configure Grafana private data source connect (PDC) for steps on setting up a PDC connection.

  • Private data source connect - Click in the box to set the default PDC connection from the dropdown menu or create a new connection.

Once you have configured your Oracle data source options, click Save & test at the bottom to test out your data source connection. You can also remove a connection by clicking Delete.

Configure the data source with provisioning

You can define and configure the Oracle data source in YAML files as part of Grafana’s provisioning system. For more information about provisioning a data source, and for available configuration options, see Provision Grafana.

The following are provisioning examples for the Oracle data source.

TNSNames enabled with basic auth:

apiVersion: 1
  - name: Oracle (TNS-BASICAUTH)
    type: grafana-oracle-datasource
    access: proxy
    basicAuth: false
    editable: true
      timezone_name: UTC
      useKerberosAuthentication: false
      useTNSNamesBasedConnection: true
      user: USERNAME
      password: PASSWORD
    url: TNSNAME
    version: 1

TNSNames disabled with basic auth:

apiVersion: 1
  - name: Oracle (Integration)
    type: grafana-oracle-datasource
    access: proxy
    basicAuth: false
    editable: true
      database: DATABASE
      user: USERNAME
      password: PASSWORD
    url: HOST
    version: 1

Environment variables

Note: This feature is not currently supported in Grafana Cloud.

You can set GF_PLUGINS_ORACLE_DATASOURCE_MAX_RESPONSE_SIZE in your environment variable to change query response data size. The default is 16, the maximum is 512.