When I speify TEST.WORLD in my Tnsnames.ora, I am able to connect to Oracle from a remote computer. But if I take out .WORLD it show the error (TNS not available). Why is that? What is .WORLD by the way?
In Oracle there is a global database name that uniquely identifies a database in the network.The global database name is in the format
e.g. test.world where test=database and world is the domain name
The default domain name in Oracle is world.In case u want it to have other domain name change the init.ora file and make domain_name= and bounce back the database.Also make change in ur tnsnames.ora file to reflect the new change.
In case of any probs please be free to write to me at firstname.lastname@example.org
Please see at the bottom of the detailed information from Oracle-Docs.
There are 2 parameters we have to understand.
One DB_NAME and another NAMES.DEFAULT_DOMAIN.
The DB_NAME is not used as in the case agasimani has mentioned as his problem.It is NAMES.DEFAULT_DOMAIN as i have previously posted is used.
Please look at the diff between both as stated below.
The identifiers in this example serve the following purposes:
The host variables username and password identify a valid user. The host variable db_string contains the Net8 syntax for connecting to a non-default database at a remote node.
The undeclared identifier DB_NAME names a non-default connection; it is an identifier used by Oracle, not a host or program variable.
The USING clause specifies the network, machine, and database to be associated with DB_NAME. Later, SQL statements using the AT clause (with DB_NAME) are executed at the database specified by db_string. Alternatively, you can use a character host variable in the AT clause, as the following example shows:
/* declare needed host variables */
char username = "scott";
char password = "tiger";
char db_name = "oracle1";
char db_string = "NYNON";
/* connect to the non-default database using db_name */
EXEC SQL CONNECT :username IDENTIFIED BY assword
AT :db_name USING :db_string;
If db_name is a host variable, the DECLARE DATABASE statement is not needed. Only if DB_NAME is an undeclared identifier must you execute a DECLARE DB_NAME DATABASE statement before executing a CONNECT ... AT DB_NAME statement.
If you are using domain names, verify that your SQLNET.ORA file contains a NAMES.DEFAULT_DOMAIN parameter. If this parameter does not exist, you must specify the domain name in your connect string.
This trace file provides a summary of what occurs with Net8 when you encounter the error ORA-12154: Could not resolve service name. In this example, a client is unsuccessful in making a connection to net service name JUNE. This is because a NAMES.DEFAULT_DOMAIN = COM parameter exists in the SQLNET.ORA file. This parameter adds the ".COM" extension to all net service names requested, including the net service name JUNE. Unfortunately, this net service name is defined in neither the client's TNSNAMES.ORA file, nor an Oracle Names Server. To troubleshoot this problem, the user should: edit the SQLNET.ORA file to remove the NAMES.DEFAULT_DOMAIN configuration parameter; or request a connection to JUNE.COM instead of JUNE
If you want to be explicit, the net service name may be qualified with the client's domain. The net service name is automatically domain qualified if the NAMES.DEFAULT_DOMAIN parameter in SQLNET.ORA is specified. For further information,
The NAMES.DEFAULT_DOMAIN parameter in SQLNET.ORA defines the domain from which the client most often requests names. When this parameter is set, the domain name is automatically appended to the net service name in a connect string. If this parameter is set with the Net8 Assistant, the domain is appended to any new net service name created without a domain. For example, if NAMES.DEFAULT_DOMAIN=COM is set, the connect string SCOTT/TIGER@ SALES gets searched in the TNSNAMES.ORA as SALES.COM. If the connect string includes the domain extension, (such as SCOTT/TIGER@SALES.COM), the domain is not appended.
Attitude:Attack every problem with enthusiasam ...as if your survival depends upon it