Overview of Connecting to a DB System

This article provides an introduction about various settings required to connect to an active DB system. How you connect depends on the client tool or protocol you use, the purpose of the connection, and how your cloud network is set up.

Note

You can find information on various networking scenarios in Networking Overview, but for specific recommendations on how you should connect to a database in the cloud, contact your network security administrator.

Prerequisites

This topic describes prerequisites you'll need to perform various tasks in this article.

  • To use the Console or the API to get the default administration service connection strings, you must be given the required type of access in a policy written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don't have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment you should work in.
  • To connect to the database, you'll need the public or private IP address of the DB system.

    Use the private IP address to connect to the system from your on-premises network, or from within the Virtual Cloud Network (VCN). This includes connecting from a host located on-premises connecting through a VPN or FastConnect to your VCN, or from another host in the same VCN. Use the public IP address to connect to the system from outside the cloud (with no VPN). You can find the IP addresses in the Console as follows:

    • On the DB System Details page, under Resources, click Nodes.
    • The Public IP address and Private IP address & DNS name are displayed in the table columns.
  • For Secure Shell (SSH) access to the DB system, you'll need the full path to the file that contains the private key associated with the public key used when the DB system was launched.

If you have problems connecting, see Troubleshoot Connection Issues.

Database Services and Connection Strings

Database services allow you to control client access to a database instance depending on the functionality needed. For example, you might need to access the database for administration purposes only or you might need to connect an application to the database. Connection strings are specific to a database service.

When you provision a DB system, a default database administration service is automatically created. For 12c and later Oracle Databases, this service is for administrating the database at the CDB level. Because this service provides limited functionality, it is not suitable for connecting an application. Oracle recommends that you create a default application service for the initial database after you create your DB system. For 12c and later Oracle Databases, application services connect at the PDB level. Here are some important functions an application service can provide:

  • Workload identification
  • Load balancing
  • Application continuity and Transaction Guard
  • Fast Application Notification
  • Resource assignment based on the service name

For details about these and other High Availability capabilities, see Client Failover Best Practices for Highly Available Oracle Databases.

Create an Application Service

Get the Connection Strings

Derive the Connection String

Use the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use the GetDatabase API operation to get the default administration service connection strings.

For the complete list of APIs for the Database service, see Database Service API.