| by Arround The Web | No comments

How to Connect to a Remote Oracle Database?

Oracle database is the world’s most popular relational database according to DB-Engine. If you want to host your Oracle database, AWS is a good option as it provides the most secure and best cloud services. By using the AWS service name RDS, the Oracle database can be easily created and connected anywhere in the world.

This article will cover how to:

How to Create a Remote Oracle Database?

Open AWS Management Console, search for the “RDS” service, and open it for creating a remote Oracle database:

Click on the “Create database” button:

Select the “Standard create” option available under the “Choose a database creation method” section:

Select “Oracle” from the “Engine options”:

Select “Amazon RDS”, “Oracle Enterprise Edition”, and then the best-suited “Engine version”:

Select the “Templates” according to your requirements:

In the settings section, provide the name of “DB instance identifier”, “Master username”, and “Master password” for authentication purpose:

Select the “DB instance class” according to the requirements:

Assign the “Allocated storage” and in the storage section, set the other settings according to your needs:

Select the “VPC” and leave the other settings as default:

Make sure to select “Yes” for the “Public access”:

Select “Password authentication” in the “Database authentication” section:

Leave the other settings as default and then click on the “Create database” button:

Now wait until the creation process completes:

Once the database is created, the status will change to “Available”. After that, click on the DB identifier (linuxhint-database) to connect to the database:

Go to “Connectivity & security”, and note down the “Endpoint” and “Port”:

Go to “Configuration” and copy the “DB name”:

How to Connect to a Remote Oracle Database?

To connect to the remote Oracle database, open the CMD and confirm the installation of “sqlplus”. To do that, type the following command:

sqlplus -v

Output

The output depicts that the sqlplus is installed in the system.

Use the following syntax to connect to a remote database using sqlplus:

sqlplus username/password@hostname:port/service_name

Specify the appropriate username, password, hostname, port, and service_name to connect to a remote database.

Let’s connect to a remote Oracle database by using the following command:

sqlplus root/root1234@linuxhint-database.cbylwvk80pdw.us-east-1.rds.amazonaws.com:1521/ORCL

Output

The output displayed the successful connection to the remote database.

Conclusion

To connect to a remote Oracle database, simply create an Oracle database in the AWS management console. After the successful creation, the remote database can be connected using the “sqlplus username/password@hostname:port/service_name” command. Make sure to provide the username, password, hostname, port, and service_name according to your database. This article provided a step-by-step guide on how to connect to a remote Oracle database.

Share Button

Source: linuxhint.com

Leave a Reply