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:
Output
The output depicts that the sqlplus is installed in the system.
Use the following syntax to connect to a remote database using sqlplus:
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:
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.