DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Connect without an entry in tnsname.ora

  1. #1
    Join Date
    Apr 2003
    Location
    Kuala Lumpur
    Posts
    59

    Question Connect without an entry in tnsname.ora

    Each client has its own tnsname.ora on the local PC. Let say I want to connect to a new location instead from the tnsname. How can I connect?

    I used 'sqlplus system/admin@172.20.21.15:1521rcl' where orcl is the service name. I got an error ORA-06401: NETCMN: invalid driver designator. Pls help on how to connect without a tnsname entry. Tks.

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    You can do it by specifing the connect string after the @ symbol

    eg

    Code:
    sqlplus scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=server_a)(Port=1521))(CONNECT_DATA=(SID=db_a)))
    HTH
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    May 2002
    Posts
    2,645

    Re: Connect without an entry in tnsname.ora

    Originally posted by richyip
    Each client has its own tnsname.ora on the local PC.
    Why? Make one tnsnames.ora file, place it on a shared network drive, and set TNS_ADMIN environment variable (System Properties>Environment)to the shared directory location. Add sqlnet.ora there too if you are using it.

  4. #4
    Join Date
    Sep 2002
    Posts
    411
    but you have to add the registry to point to the network beside system environment variable

  5. #5
    Join Date
    May 2002
    Posts
    2,645
    That is so wrong, it is wronger than wrong.

  6. #6
    Join Date
    Sep 2002
    Posts
    411
    can you explain why , please Stecal????

  7. #7
    Join Date
    May 2002
    Posts
    2,645
    Without getting into all the high tech MCSE knowledge that is running around in my head, you do not need to do anything with the registry in this case. And for that matter, there is little you need to do with the registry on a routine basis. Adding an environment variable, either as a system variable or as a user variable, DOES NOT require any editing of the registry. You can see this for yourself. Add an environment variable named something odd or unique ("mytestenv") and set it to whatever. Close the system properties. THEN go look in the registry. Search for the variable. Did you have to set it? No. It is done by PFM (a form of Windows magic). Use regedit instead of rededt32 (the find key searches across the hives at the same time). If you don't want to wait on the search, go to HKEY_CURRENT_USER/Environment.

  8. #8
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by stecal
    Without getting into all the high tech MCSE knowledge that is running around in my head, you do not need to do anything with the registry in this case. And for that matter, there is little you need to do with the registry on a routine basis. Adding an environment variable, either as a system variable or as a user variable, DOES NOT require any editing of the registry. You can see this for yourself. Add an environment variable named something odd or unique ("mytestenv") and set it to whatever. Close the system properties. THEN go look in the registry. Search for the variable. Did you have to set it? No. It is done by PFM (a form of Windows magic). Use regedit instead of rededt32 (the find key searches across the hives at the same time). If you don't want to wait on the search, go to HKEY_CURRENT_USER/Environment.
    Do you have to reboot?
    Jeff Hunter

  9. #9
    Join Date
    May 2002
    Posts
    2,645
    Actually, this is the ONE time you don't have to reboot. An oversight on Microsoft's part, I'm sure.

  10. #10
    Join Date
    Apr 2003
    Location
    Kuala Lumpur
    Posts
    59
    jovery,

    Yeah this is my connection:
    sqlplus system/admin@172.20.21.15:1521:test

    test is my service name and I got the error. So is there any problem with the connect string?

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