0

I get this error message "Invalid service name" when submitting the Database Connection Details form in Repository Creation Utility. I have put the required information as below:

Host Name : localhost

Port : 1521

Service Name : orcl

Username : sys

The version of the database I have installed is 19c.

Any idea how to fix that?

Nadim
  • 382
  • 1
  • 7
  • 29
  • 1
    the service name is most likely incorrect. run `lsnrctl status` to get all of the registered service names. if you have a multi-tenant database configuration make sure you are connecting to a pluggable database and not the container database. also make sure `sys` is an appropriate username for what you're trying to do. don't use it unless your documentation explicitly tells you to use it. – pmdba Feb 03 '22 at 18:40
  • I am actually connecting to a container database. Is it possible to alter it to a pluggable database or should I uninstall it and install a new one? – Nadim Feb 04 '22 at 07:56
  • 1
    You should connect to the pluggable database *in* the container database. It should have its own service name. container databases should *never* contain application data themselves; they only exist to manage the pluggable databases. Just like you wouldn't install an application directly in VMware - you create a virtual machine and install the application there. Same concept. – pmdba Feb 04 '22 at 12:13

1 Answers1

0

I have fixed it! I should have connected to a pluggable database instead of the container database. In order to do that, I ran the command-lines below:

  1. sqlplus user/password as sysdba
  2. ALTER PLUGGABLE DATABASE orclpdb OPEN;
  3. ALTER SESSION SET CONTAINER = ORCLPDB;

Afterwards, I put the service name as orclpdb.lan instead of orcl in the Database Connection Details form. So, the relevant required information should be as below:

Host Name : localhost

Port : 1521

Service Name : orclpdb.lan

Username : sys

Nadim
  • 382
  • 1
  • 7
  • 29