user3308131
user3308131

Reputation: 179

Oracle SQL Developer Works SQLplus DOESN'T

With Oracle SQL-Developer I'm able to connect to my VMware CentOS 7 Oracle database ORCL.

if I try to connect with SQLPlus I'm told the realm doesn't exist.

Any idea as to why I can connect with Oracle SQL-Developer and not SQLPlus on the same machine?

TNSPing resolves the SID/Service name without any problems.

C:\oracle\ora11g\11.2.0.2\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (Host = 192.168.1.50) (Port = 1521))) (CONNECT_DATA = (SERVICE_NAME = ORCL)))
OK (10 msec)

Here's the output from the SQLPlus connection attempt from the same machine that SQL-Developer is working without any issues.

C:\oracle\ora11g\11.2.0.2\BIN>sqlplus system/password@orcl

SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 3 08:31:13 2019

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3640
Additional information: -2140813497
Process ID: 0
Session ID: 0 Serial number: 0

Updated Results

Upvotes: 1

Views: 2047

Answers (2)

Sandesh Herwade
Sandesh Herwade

Reputation: 21

This looks like something is wrong with Oracle_Home or your listener.
Could you please - - LSNRCTL and check the status of the same.
If it is fine, then try to connect to sys:

sqlplus /nolog
conn / as sysdba

Upvotes: 0

thatjeffsmith
thatjeffsmith

Reputation: 22412

Your sqlplus command, try this:

 sqlplus user/[email protected]:1521/ORCL

In SQL Developer, once you're connected, run this:

show tns
show connection

enter image description here

Make sure you're actually trying to connect to the same database in SQLPlus, also make sure your $ORACLE_HOME and $ORACLE_SID are properly configured.

Upvotes: 1

Related Questions