Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12545 when connecting to default (OK when using SID)

Dennis LoveladyDec 8 2012 — edited Dec 11 2012
I am working with the Oracle Virtual Machine templates for HCM912 and TOOLS852. The installation and configuration went well, with only a couple of hurdles. Among them, there was no tnsnames.ora, listener.ora, and sqlnet.ora file created (probably because I missed something). However, I have created these, and everything is sort of working. In particular, I'm able to connect to and use the PIA, and Application Designer is working flawlessly.

The problem is that when any local (not network-based) user (oracle and psadm2 among them) tries to connect to the database without specifying an instance name, ORA-12545 results. But connection with an instance name (SYSADM@HCM912) works fine. I could live with this (sort of), but it seems that the sqr utility is not operable at all since (as far as I can see) I cannot tell the local sqr what database to connect to. It will use the default, and the result is:

psadm2@hcm /opt/oracle/psft/pt/tools/sqr> sqr setspace.sqr
Enter Username: SYSADM
Enter Password:
SQR for PeopleSoft V8.52
(SQR 5528) ORACLE OCIServerAttach error 12545 in cursor 0:
ORA-12545: Connect failed because target host or object does not exist
(SQR 4701) Cannot logon to the database.
SQR for PeopleSoft: Program Aborting.

Similarly, sqlplus result is like this:

psadm2@hcm /opt/oracle/psft/pt/tools/sqr> sqlplus SYSADM
SQL*Plus: Release 11.2.0.2.0 Production on Sat Dec 8 05:52:36 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12545: Connect failed because target host or object does not exist
Enter user-name: SYSADM@HCM912
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning and Oracle Label Security options
SQL>

What do I need to do in order to make the system default to HCM912? (ORACLE_SID is currently set to HCM912, which I thought was enough for this.)

Here're the essentials:

/u01/app/oracle/product/11.2.0.x/db_1/network/admin/tnsnames.ora
HCM912=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL=TCP)(HOST=hcm)(PORT=1521))
)
(CONNECT_DATA =
(SERVICE_NAME = HCM912)
)
)

/u01/app/oracle/product/11.2.0.x/db_1/network/admin/sqlnet.ora
ames.directory_path = (LDAP, TNSNAMES, HOSTNAME)
names.default_domain =
trace_level_client = OFF
sqlnet.expire_time = 30

/u01/app/oracle/product/11.2.0.x/db_1/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hcm)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

$ lsnrctl status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hcm)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 02-DEC-2012 08:13:48
Uptime 5 days 21 hr. 44 min. 29 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.x/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0.x/db_1/log/diag/tnslsnr/hcm/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hcm)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "HCM912" has 1 instance(s).
Instance "HCM912", status READY, has 1 handler(s) for this service...
Service "XDB" has 1 instance(s).
Instance "HCM912", status READY, has 1 handler(s) for this service...
The command completed successfully

Select environment variables (for psadm2 user)

ORACLE_BASE=/opt/oracle/psft/pt/oracle-client
ORACLE_HOME=/opt/oracle/psft/pt/oracle-client/11.2.0.x
ORACLE_SID=HCM912
PS_APP_HOME=/opt/oracle/psft/pt/apptools
PS_CFG_HOME=/home/psadm2/psft/pt/8.52
PS_DB=ORA
PS_DBVER=8.1.x
PS_DM_DATA_IN=/opt/oracle/psft/pt/tools/data
PS_DM_DATA_OUT=/home/psadm2/PS_DM/data
PS_DM_LOG=/home/psadm2/PS_DM/log
PS_DM_SCRIPT=/opt/oracle/psft/pt/tools/scripts
PS_HOME=/opt/oracle/psft/pt/tools
PS_HOSTTYPE=oel-5-x86_64
PS_JRE=/opt/oracle/psft/pt/tools/jre
PS_LIBPATH=/opt/oracle/psft/pt/tools/bin
PS_SERVDIR=/home/psadm2/PS_CACHE
PS_SERVER_CFG=/opt/oracle/psft/pt/tools/setup/psdmtx.cfg
PWD=/home/psadm2
SQRDIR=/opt/oracle/psft/pt/tools/bin/sqr/ORA/bin
SQR_HOME=/opt/oracle/psft/pt/tools/bin/sqr/ORA

---

psadm2@hcm /home/psadm2> ping hcm
PING hcm (127.0.0.1) 56(84) bytes of data.
64 bytes from hcm (127.0.0.1): icmp_seq=1 ttl=64 time=0.020 ms
64 bytes from hcm (127.0.0.1): icmp_seq=2 ttl=64 time=0.032 ms
64 bytes from hcm (127.0.0.1): icmp_seq=3 ttl=64 time=0.020 ms
^C
--- hcm ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 0.020/0.024/0.032/0.005 ms

Not sure what else I might provide to help. Any ideas what I'm doing wrong here, and how I can get sqr to connect?

Thanks for your time!

Edited by: Dennis Lovelady on Dec 8, 2012 8:27 AM - removed blank lines for clarity
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2013
Added on Dec 8 2012
19 comments
5,398 views