Run:
lsnrctl status LISTENERNAME
... where LISTENERNAME
is the name of the listener that is listening on port 1531. You can get this name from your $ORACLE_HOME/network/admin/listener.ora
file.
For example:
LISTENER1531 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1531))
)
)
)
LISTENER1531
would be the listener name for the above listener.ora
entry.
If you need to add databases to the listener, add an entry to the listener.ora
, as follows:
SID_LIST_LISTENER1531 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = YOURDB)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
(SID_NAME = YOURDB)
)
)
Obviously you'll need to add your own database and listener names & change the path to your $ORACLE_HOME
.
You can reload the listener config with:
lsnrctl reload LISTENER1531
The above works fine for me with a `tnsnames.ora as follows:
YOURDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host = node1)(Port = 1531))
)
(CONNECT_DATA =
(SERVICE_NAME = YOURDB)
)
)
May the reason be why I installed Oracle as desktop class instead of server class?
No, 'Desktop Class' just means you only get basic choices from the installer1, according to the docs:
Desktop Class—This installation class is most appropriate for laptop or desktop computers. It includes a starter database and
requires minimal configuration.
Server Class—This installation class is for servers, such as you would find in a data center, or used to support enterprise-level
applications. Choose this installation class if you need access to
advanced configuration options.
During a Desktop Class installation, you make only basic choices. For
a Server Class installation, you choose either typical installation
(where you make only basic choices) or advanced installation.
During a Desktop Class or a typical installation, Oracle Database
automatically installs the sample schemas.
You'll need to go through the kind of troubleshooting steps suggested in the comments to find out what is causing the ORA-12545 error:
An ORA-12545 error occurs when the client is not able to contact the
listener on the node specified. For example: when the listener has not
been started on the node, if the node address has been specified
incorrectly, or a firewall blocks access.
1 So 'Desktop Class' and 'Server Class' are poor names for the installation types. 'Basic' and 'Custom' might be better?
Best Answer
The above connection string should work with the addition of
(UR=A)
. Seems like your SQL Developer connection is configured differently.Alternatively, you can define the connection type as
Advanced
, and use the below custom JDBC url: