Did you actually create a database instance named ORCL?
Check out the actual name of your database with the command
lsnrctl status
This should tell you what services the listener knows about, which is what you're talking to when connecting with the @ syntax. The reason you can connect without the @ORCL is that in that case you're using interprocess communication (IPC) and bypassing the listener, because the database is on the same computer as your SQL*Plus client session.
You can also find out the database name when you connect in the first example with this:
SELECT name FROM v$database;
EDIT:
Try the EZConnect syntax and see if that works:
sqlplus user/pw@localhost/ORCL
Keep in mind that TNSPING
doesn't do anything besides contact the listener - it doesn't verify the database can be accessed.
One more thing: It looks like maybe TCP isn't a configured protocol for the listener? check your listener.ora file (in the same directory as your tnsnames.ora file). The entry for LISTENER should look something like this:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
My TNSPING
output looks a bit different in one line near the start of output:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1521)))