debugModerate
Error ORA-12560 when trying to connect Windows SQL*Plus client to Oracle 11g Linux server
Viewed 0 times
11gerrorconnectserversqltryingplusclientorawindows
Problem
I installed 11g on Centos VM on my mac.I have everything up and working on server.I have included following command I ran on cenos.
$lsnrctl status
My tnsnames.ora file is as follows:
On Centos server
$lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-JUN-2014 14:49:41
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hayer)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 23-JUN-2014 14:03:58
Uptime 0 days 0 hr. 45 min. 42 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/hayer/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hayer)(PORT=1522)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfullyMy tnsnames.ora file is as follows:
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = hayer)(PORT = 1522))
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hayer)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
(SID = orcl)
)
)
~
~
~
~On Centos server
Solution
On your Windows client, you need to specify the TNS alias
If you don't have
@ORCL, or else it assumes you're trying to connect to a local database running on your Windows client, which there isn't one. Also, system as sysdba generally isn't used, not even sure if that makes sense. SYS as sysdba and just plain system are used.Enter user-name: system@ORCL
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning optionIf you don't have
tnsnames.ora set up on your Windows client, you can still connect via EZCONNECT string @"hayer:1522/orcl" instead of setting up tnsnames (yes, the quotes are needed).Enter user-name: system@"hayer:1522/orcl"
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning optionCode Snippets
Enter user-name: system@ORCL
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning optionEnter user-name: system@"hayer:1522/orcl"
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning optionContext
StackExchange Database Administrators Q#68939, answer score: 11
Revisions (0)
No revisions yet.