Skip to content
Advertisement

How to create Oracle 19C Database SQL Developer New Connection?

Well I am a college student and I have a database project to build on Oracle 19c (SQL Developer) just like a management system. When I click on new connection in SQl Developer , then enter database name (my project name) and enter user name as system and pswd. and is SID I write ‘orclpdb’ and when I connect it gives an error that database is not open. How can I start making tables and stuff and complete my project on oracle 19c sql developer. Please guide me. Update: While creating new database connection in SQL Developer, In Service name if I write ‘orcl’ and test then the connection is successful but when I write ‘orclpdb’ it says ‘database not open’

Advertisement

Answer

So it sound like the container database (orcl) is started but the pluggable database (orclpdb) is not. You need to start it.

In order to actually manage a database you are going to have to learn to work without SQL Developer, and use the command-line utility sqlplus.

From a command line:

C:> set ORACLE_SID=orcl
C:> sqlplus / as sysdba   
SQL>  alter pluggable database orclpdb open;

In the above, the sqlplus command is launching the command line utility ‘sqlplus’. the ‘/’ indicates to make a local connection to the database specified by the env variable ORACLE_SID, using OS authentication (os user is a member of the ORACLE_DBA group), and connect with ‘sysdba’ authority. On the next line the ‘SQL>’ is just indicating you are now at the sql prompt within sqlplus, you actually enter the ‘alter’ command, whose purpose should be self-evident.

The listener is a totally separate process. It is like a telephone switchboard. It ‘listens’ (hence, its name) for connection requests coming across the network, and set up the connection, then is out of the picture. You check its status at the command line:

C:> lsnrctl status

One last bit of useful (for us) information. What this the connection ‘type’ you’ve defined in SQL Dev? Is it ‘basic’ or ‘tns’? Either way, what did you specify for the values? Please name the field(s) AND the value you supplied.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement