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

Thread: sql net

  1. #1
    Join Date
    Jan 2003
    Posts
    1

    Question sql net

    am using oracle 92 and i'm trying to link my java programs to it. however since i got a cable internet connection my java programs keep throwing oracle errors. ORA-12547: TNS:lost contact or /and ORA-12570: TNSacket reader failure. However if i physically disconnect the internet (pull it out of the usb) they work fine. Im thinking i have a problem with sql net. (i tried using toad but also came up with similar tns problems). Also looked in the process manager and (an assumption) i don't see a process for sql net. there is one for sql plus though. Any ideas how to fix this problem. If i have to reinstall oracel is there a way i can just install the necessary components instead of the whole bloody thing.

    cheers

    Jules

  2. #2
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    268
    Hi,
    You need to determine the Oracle Net connection methods.
    There are several ways to configure Oracle Network:
    1. Host Naming - In order to use host naming, clients must have TCP/IP protocol and Oracle Net installed on their client machines and hostnames are resolved through DNS, NIS or hosts file. This method eliminates the need for the use of the tnsnames.ora file and identifies only one SID per node. On the server side, TCP/IP must be installed and Oracle Net software as well. A listener must be started on port 1521 and the listener.ora file must contain the GLOBAL_DBNAME= parameter.
    2. Local Naming – Local naming provides a simple way of resolving name addresses. Can use different protocols and can easily be configured using the Oracle Net Configuration Assistant.
    Both methods update the sqlnet.ora file
    3. Local Net Service Names - is used to resolve the name addresses. When working with local net service names, you must specify the database version, name of the host the database reside on, the network protocol, the database server address and port and the database SID name. A name is given to each Name Service. This method updates the tnsnames.ora file, adding a service entry in it.
    This method uses both sqlnet.ora and tnsnames.ora files.

    in the SQLNET.ORA file, insert this line:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME)

    configure the LISTENER.ORA file:
    listener=(address_list=
    (address=
    (protocol=ipc)
    (key=$SID)
    )
    (address=
    (protocol=tcp)
    (host=$IP)
    (port=1521)
    )
    )

    sid_list_listener=(sid_list=
    (sid_desc=
    (sid_name=$SID)
    (oracle_home=$ORACLE_HOME)
    )
    )

    configure the tnsnames.ora:
    MY_CONNECTION =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = $IP)(PORT = 1521))
    (CONNECT_DATA =
    (SID = $SID)
    )
    )

    replace the $SID,$IP and $ORACLE_HOME to your server's SID,IP & Oracle Home.

    Cheers.
    It is better to ask and appear ignorant, than to remain silent and remain ignorant.

    Oracle OCP DBA 9i,
    C++, Java developer

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    For the IP address for a local database, you could use ...

    LOCAL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = LOCAL)
    )
    )
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

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