TNSNAMES
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: TNSNAMES

  1. #1
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    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?
    Agasimani
    OCP(10g/9i/8i/8)

  2. #2
    Join Date
    Feb 2001
    Location
    Bombay,India
    Posts
    530
    Hi,
    In Oracle there is a global database name that uniquely identifies a database in the network.The global database name is in the format
    database_name.domain_name

    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 rohitsn@altavista.com

    regards,
    Rohit nirkhe,Oracle DBA,OCP 8i




  3. #3
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    Thanks Rohit for your propmt reply. But is it domain_name=
    OR db_domain = ?
    Agasimani
    OCP(10g/9i/8i/8)

  4. #4
    Join Date
    Mar 2000
    Location
    Chennai.Tamilnadu.India.
    Posts
    658

    SQLNET.ORA

    Dear Rohit, 24th April 2001 11:51 hrs chennai

    If you dont want to use the default domain name go to
    sqlnet.ora file D:\Oracle\Ora81\network\ADMIN\sqlnet.ora
    if oracle 8i or in oracle8 in \network\ADMIN\sqlnet.ora

    remove the NAMES.DEFAULT_DOMAIN or disable it with # beofre the parameter.

    then ||rly comeback to tnsnames.ora file edit and remove the word WORLD.

    TEST.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = padmam)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = test)
    )
    )

    Now you can find that you can connect to oracle with TEST alone.

    For More information on NAMES.DEFAULT_DOMAIN find it in Oracle Docs.

    Cheers

    Padmam

    Attitude:Attack every problem with enthusiasam ...as if your survival depends upon it

  5. #5
    Join Date
    Mar 2000
    Location
    Chennai.Tamilnadu.India.
    Posts
    658

    DB_NAME and DEFAULT_DOMAIN

    Hi Rohit, 24th April 2001 12:43 hrs chennai

    Its not domain_name= OR db_domain = ?

    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.

    Cheers

    Padmam
    ==============

    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[10] = "scott";
    char password[10] = "tiger";
    char db_name[10] = "oracle1";
    char db_string[20] = "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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width