Oracle by Example brandingConnect with SQL Developer and Create a View for Data Visualization

section 0Before You Begin

This tutorial shows you how to download Autonomous Database connection credentials and create a secure connection between SQL Developer and an Autonomous Database. With your connection you create a database user, ANALYST1, and create a view to the SH table in the database. This tutorial takes approximately 10 minutes to complete.

Oracle Autonomous Database Visualization Tutorial Series

This tutorial is the first in a series for connecting and visualizing your data with Oracle Autonomous Database. Perform the tutorials sequentially.

Background

Oracle SQL Developer connects to an Autonomous Database using a security credentials zip file. You create the security credentials zip in the first section or get it from your administrator.

In this tutorial, you define a SQL Developer connection to an Autonomous Database. Use SQL Developer to create a user and create a view from the SH sample table.

What Do You Need?

  • Access to an instance of an Autonomous Database: either Oracle Autonomous Data Warehouse or Oracle Autonomous Transaction Processing.
  • Obtain the password for the Autonomous Database Admin user.
  • Download Oracle SQL Developer from Oracle Technology Network download site. Download version 18.2 or later, because this version contains enhancements for key Autonomous Database features.
    If you are a Windows user on 64-bit platform, download the 'Windows 64-bit with JDK 9 included' distribution as it includes the files necessary to run SQL Developer and connect to your Autonomous Data Warehouse Cloud database.


section 1Download Client Credentials Zip File

In this section you download a client credentials zip file for the Autonomous Database instance that you want to connect to. If you already have the client credentials file for your Autonomous Database, skip this step (your administrator can provide this file). The client credentials file contains security-related files, including a wallet file with certificates for Secure Sockets Layer (SSL) communication between the Autonomous Database and Oracle Data Visualization.

  1. Access Oracle Cloud Infrastructure with your URL (web address). On the Oracle Cloud Infrastructure sign-in page, in the Cloud Tenant ID field enter a tenant.
  2. In Oracle Cloud Infrastructure, enter your user name and password, and click Sign In.
  3. On the Oracle Cloud Infrastructure home page, at the top left, click MENU.
    oci_console_menu
    Description of the illustration oci_console_menu.png
  4. Select Autonomous Data Warehouse.
  5. Under List Scope, from the Compartment list, select your compartment or the root compartment.
  6. Under Name, click a database instance.
  7. Click DB Connection.
    adw_console_db_connection
    Description of the illustration adw_console_db_connection
  8. In Database Connection, click Download.
    adw_console_db_download
    Description of the illustration adw_console_db_download
  9. In the Download Wallet dialog enter an encryption password for the wallet, confirm the password, and then click Download.
    adw_db_download_password
    Description of the illustration adw_db_download_password
  10. Click Save File, and then click OK.

section 2Define a SQL Developer Connection

In this section, define a SQL Developer connection as the Admin user.

  1. Open SQL Developer. In the Connections panel, right-click Connections and select New Connection.
    select new connection
    Description of the illustration select_new_connection
  2. The New/Select Database Connection dialog appears. Enter the following:
    • Connection Name - Enter a description for the connection.
    • Username - Enter the database user name. Use Admin or another user with equivalent privileges.
    • Password - Enter the password for the specified user.
  3. From Connection Type, select Cloud PDB.
  4. From the Configuration File list, click Browse, and select the path to your local copy of the Client Credentials zip file. Select wallet_SALESADB.zip.
  5. From the Service list, select the _high menu item: salesadb_high.
  6. select new connection dialog
    Description of the illustration new_select_database_connection
  7. Click Test. When the status is Success, click Connect.

section 3Create a User Analyst1

After you connect SQL Developer to your Autonomous Database, use a SQL Developer worksheet to define a create user statement to create analyst1. You can use this user to connect to your Autonomous Database and load data for data visualization and data analysis.

  1. Open a SQL Developer worksheet and run the following SQL statements to create analyst1, swapping in a password that complies with the password complexity rules.
    create user analyst1 identified by "<password>;";
    
    grant dwrole to analyst1;

    Autonomous Data Warehouse requires strong passwords. The password you specify must meet the default password complexity rules. The database checks for the following requirements when you create or modify passwords:

    • The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character.
    • The password can't contain the username.
    • The password can't be one of the last four passwords used for the same username.
    • The password can't contain the double quote (") character.
    • The password must not be the same password that is set less than 24 hours ago.

section 4Connect as User Analyst1

  1. In SQL Developer, create a connection and connect as Analyst1.
    new connection dialog as analyst
    Description of the illustration select_database_connection_analyst

section 5Create SH View for Data Visualization

In this step you use SQL Developer and the SH schema provided with your database to create a view for tables in the SH schema.

  1. Copy the dv_sh_view.txt script into a worksheet.
    create sh view
    Description of the illustration create_sh_view
  2. Run the script.
    create sh view rusults
    Description of the illustration create_sh_view_results

next stepNext Tutorial

Create Your First Visualization with Data From an Oracle Autonomous Database


more informationWant to Learn More?