First of all, I've Google'ed the Oracle error to death w/o any luck of getting any of the suggestions to work...

We have Oracle running on several servers and just got it installed on a new server. But when trying to run sqlplus as system user, we get the error:

Code:
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
Obviously the first thing I did was look in our tnsnames.ora to make sure the SERVICE_NAME parameter was in there properly:

(FYI the server name is Borg. Oracle is running on Borg and I'm trying to connect to it locally. This is Oracle 11g Release 2 (11.2.0.1.0)).

tnsnames.ora:
Code:
BORG =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = borg)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = BORG)
    )
  )
And here is listener.ora
Code:
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = BORG)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = BORG)
      (GLOBAL_DBNAME = BORG)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle
Okay so clearly tnsnames.ora is NOT missing the SERVICE_NAME in CONNECT_DATA. It's there and it looks correct to me.

When researching the error the suggested CAUSE is this:

Code:
The listener was not configured with a default service and SERVICE_NAME was missing from the CONNECT_DATA received by the listener.
and the suggested ACTION is this:

Code:
Possible solutions are:

- Configure DEFAULT_SERVICE parameter in LISTENER.ORA with a valid service name. Reload the listener parameter file using reload []. This should be done by the LISTENER administrator.

- If using a service name, Check that the connect descriptor corresponding to the service name in TNSNAMES.ORA has a SERVICE_NAME or SID component in the CONNECT_DATA.
So let me take those solutions one a time:

1. I've looked all over the place, even in at the listener.ora in the SAMPLES directory and I don't see anywhere that shows the DEFAULT_SERVICE parameter and how it is used or where to place it in the listener.ora. Does anyone know anything about this? It's suggested to do this in a million places but no where does it say where EXACTLY to place this parameter.

2. As I've already said, my tnsnames.ora already has the SERVICE_NAME in the CONNECT_DATA.

So does anyone have any clues here?