Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Oracle Instant Client (No Oracle Home) tnsnames (Read 48024 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Oracle Instant Client (No Oracle Home) tnsnames
25.01.07 at 16:43:43
Oracle Instant Client (No Oracle Home) tnsnames
SQL*XL customer Toni from Finland asked the following question.
If I read your pages about the Oracle Instant Client (Oracle IC) correctly the Oracle Client (SQL*Plus) is not needed?  
But however, only installing th eOracle IC, the TNS names file is missing totally and the DB connection without that can't be established, or can it?
Why not give SQL*XL a try today.
SQL*XL: SQL Excel software

Download SQL*XL now!

You can use a tnsnames.ora file but you need to create one yourself. I copied one from another Oracle Client usually kept in oracle_home/network/admin. It needs a few system variables to be setup however. I have put the details below. You can also connect without a tnsnames.ora file but that requires quite a few details to be remembered. I have used the tnsnames.ora file and that works fine for me.
I have copied a few interesting details from the Oracle Instant Client Release Notes. I trust these provide the information you are after:

  • "Note that no ORACLE_HOME or ORACLE_SID environment variables need to be set."
  • "SQL*Plus Instant Client is always 'remote' from any database server. To connect to a database you must specify the database using an Oracle Net connection identifier."
  • An example using an Easy Connection identifier to connect to the HR schema in the MYDB database running on mymachine is:  
    sqlplus hr/your_password@//mymachine.mydomain:port/MYDB
  • "If you want to use Net Service Names configured in a local Oracle Net tnsnames.ora file, then set the environment variable TNS_ADMIN to the directory containing the tnsnames.ora file."

As said, I used the tnsnames.ora technique. I copied it from another PC but you can also copy the lines below and save it in a file called tnsnames.ora:
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora817\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORA817 =
	(ADDRESS = (PROTOCOL = TCP)(HOST = ora817)(PORT = 1521))
	(SERVICE_NAME = ora817)

I added a few user variables to get it all to work. In Windows Explorer, select the My Computer item. Right click and go to properties. Go to the Advanced tab and click the Environment Variables button.
I think I added the following user variable in error but for completeness:
I added user variable: SQLPATH with value C:\instantclient10_1 where my instant client files + tnsnames.ora file live.
In the system variables I made the following changes:
-I added c:\instantclient10_1 to my path variable:
-I added system variable:
SQLPATH with value c:\instantclient10_1
-I added system variable:
TNS_ADMIN with value c:\instantclient10_1
I trust this helps to get it going.  
How to connect to Oracle without installing the Oracle Client software
The SQL*XL software pages:
Oracle connection problems
Back to top
« Last Edit: 22.11.09 at 23:23:28 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1