How to Resolve Connection Issues in Oracle
Once you have installed Oracle 19c and unlocked the Scott and HR Schema‘s , you can connect to the databases using SQL developer. Sometimes you will face a problem in connecting to Oracle database, especially when you close the SQL developer application and launch it again. In this article, we will see how to resolve connection issues in Oracle.
When you close SQL developer and launch it again or when your computer restarts, you will see the following error when connecting to the Oracle database:
This error shows that your pluggable database (which contains your sample schema’s) is not open. You need to check the status of the pluggable database and open it, if it is closed.
Steps to open the Pluggable database
- Launch command prompt by typing cmd in your windows Start program.
- Login to SQL plus using the command sqlplus sys/sys as sysdba. Once connected, you will see an SQL> prompt.
- Check if the pluggable database is open. Use the following command
- If you see that pluggable database ORCLPDB is mounted, that means it needs to be started or its state needs to be altered
- To start the pluggable database ORCLPDB, use the ‘Alter’ command
- After successful execution of the above statement, you will see that the pluggable database is altered. You can check the status of it, by executing this command again
- If you see a status of READ WRITE, that means that pluggable database is open and you can connect to the sample databases using SQL developer.
- Navigate to SQL developer and try connecting to it. You will be successful now.