Oracle DBCA utility: “Listener is not up or database service is not registered with it”

configurationoracleoracle-11g-r2tools

I'm a software engineer with some experience on SQL Server but a newbie on Oracle.

I'm attempting to run dbca on a remote linux machine to reconfigure a database that was initially configured to idle with zero memory (so I'm told). Enterprise Manager is not configured properly and my listener.ora is as follows:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION = 
      (ADDRESS = 
        (PROTOCOL = TCP)
        (HOST = Myhost)
        (PORT = 1521)
      )
    )
  )

This database is not on port 1521, it's on port 15321. I can connect to it using SQL Developer by manually creating a connection with the correct port, etc.

I get the error in the title after I press finish in dbca. There is also a log file that is very long. How do I proceed to fix dbca? Ultimately I need to configure Enterprise Manager.

Best Answer

As far as I understand, there is a database on the machine. This database should register itself on the listener. It can do so when it knows where - on which port - the listener runs. In you case the listener is on port 15321. To enable the auto registration of the instance, you should make sure that the LOCAL_LISTENER parameter is filled with the correct port number in order to be able to contact the listener. For docu check Oracle® Database Reference 11g Release 1 (11.1)

. oraenv
[YOUR_ORACLE_SID]
sqlplus / as sysdba
-- if the instance appears not to be running:
startup
alter system set local_listener = '(ADDRESS = (PROTOCOL=TCP)(HOST=Myhost)(PORT=15321))';
-- to force immediate registration:
alter system register;

Now your database should be visible in the listener services list listener.ora should look like this - note the PORT =

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION = 
      (ADDRESS = 
        (PROTOCOL = TCP)
        (HOST = Myhost)
        (PORT = 15321)
      )
    )
  )

check the results:

  lsnrctl services