How do I log in to Oracle database?
One can log in to the Oracle database using either the command line tool SQL*Plus or the graphical interface tool Oracle SQL Developer.
The steps to log in to an Oracle database using SQL*Plus are as follows:
- Open the command prompt or terminal window.
- Enter the following command to connect to the database:
sqlplus username/password@host:port/service_name
username refers to the username of the database user to log in, password is the user’s password, host is the hostname or IP address of the database server, port is the port number of the database server, default is 1521, and service_name is the service name of the database instance being connected to.
- After entering the command and hitting the Enter key, you will be prompted to enter your password. Once you have entered your password, press Enter again.
- After successfully logging in, you will see the SQL*Plus command line prompt.
The steps for logging into an Oracle database using Oracle SQL Developer are as follows:
- Open the Oracle SQL Developer graphical interface tool.
- Click on the “New Connection” button on the connection panel, or choose “File” -> “New” -> “Connection” from the menu bar.
- Connection Name: Custom Connection Name.
- Username: The username of the database user to log in.
- Password: The user’s password.
- Hostname: Hostname or IP address of the database server.
- Port: the default port number of the database server is 1521.
- SID/Service Name: The SID or service name of the database instance connected to.
- Click the “Test” button to ensure the connection configuration is correct.
- Click the “connect” button to link to the database.
- After successfully connecting, you will see the main interface of SQL Developer, where you can execute SQL queries and manage database objects.