The service_name may or may not be the ORACLE_SID. It is setup via the init.ora file with the "service_names" parameter. You can check this parameter by:
select name, value from v$parameters
where name like 'service%'
The world part normally get to ge setted up at sqlnet.ora file and tnsnames.ora files. You can just have the service name set as Jeff explained but have the world/domain option to tag it. This you would do through tnsnames.ora and sqlnet.ora files normally found under $ORACLE_HOME/network/admin
Using Net8 configuration Assistant tool to add entry to "tnsname.ora" file
and selecting to create using: Oracle8i release 8.1 database or service
Or manually creating your "tnsnames.ora" file using the service_name or
instance_name parameters .
After configuring the tnsnames file you try to connect and receive the
ORA-12504: TNS:listener was not given the SID in CONNECT_DATA
Cause: The SID was missing from the CONNECT_DATA.
Action: Check that the connect descriptor corresponding to the service
name in TNSNAMES.ORA has an SID component in the CONNECT_DATA.
ORA-12154: TNS:could not resolve service name
Cause: The service name specified is not defined correctly in the
Action: Make the following checks and correct the error:
- Verify that a TNSNAMES.ORA file exists and is in the proper
place and accessible. See the operating system specific manual
for details on the required name and location.
- Check to see that the service name exists in one of the
TNSNAMES.ORA files and add it if necessary.
- Make sure there are no syntax errors anywhere in the file.
Particularly look for unmatched parentheses or stray characters.
Any error in a TNSNAMES.ORA file makes it unusable. See
Chapter 4 in the SQL*Net V2 Administrator's Guide. If
possible, regenerate the configuration files using the Oracle
This is happening due to the fact that the Oracle8i Instance or Listener is
not set up to use the Oracle8i New Features for database configuration.
The "init.ora" file does not contain the following entries:
service_names or instance_name
The "listener.ora" file does not contain:
Solution: Configure "tnsnames.ora" file with appropriate entries
Depending on how your instance is set up with Oracle8i you need to set up
your tnsnames.ora file accordingly:
If your Oracle8i database is configured to use the NewFeatures for Oracle 8i:
In your "INIT.ora" file you have set up your instance to use
service_names and instance_name
And have set up your "listener.ora" file with global_dbname than you will be
able to configure your "tnsnames.ora" file to include service_name and/or
This will enable you to take advantage of the Oracl8i New Features for
Otherwise you would use the tnsnames.ora file for V2 or V8.
Example1 Tnsnames.ora file for using the new Oracle8i New Features:
I do not have global_names set, and I am using the old
config in my listener.ora. Still I don't see the difference
between my different instances, they all appear to be the same way, but at least I see somthing to change now. I'll give it a try when I can get a few minutes of downtime...
From what I remember from the past with regards to using SID= vs. SERVICE_NAME= is that when you choose to use SERVICE_NAME, you need to have the listener.ora entry to have the GLOBAL_NAME= and have it equaling the same value.
If this is what you've found, then I can confirm it.