The important bid of config is in
listener.ora
, where you need to set the SID; note that this is not necessarily the service name.
There should be something like:
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=foo.bar.com)
(ORACLE_HOME=/oracle10g)
(SID_NAME=foo_bar))
(SID_DESC=
...))
Either change your code to use the correct SID - in the example it is
foo_bar
- or add your SID to
listener.ora
and restart the listener on the server.