Hi Fabrizio, hi everybody,
> unixODBC is only a driver manager.
> I need the oracle driver for the connection. You can download the ODBC
> driver for oracle from OTN (search for the instant client).
> To have an idea of the configuration look at:
> http://nextre.it/oracledocs/genericconnectivity.html
... I downloaded the instant client plus ODBC archive and "installed"
it. Then I had to tamper a few hours with it to find out how it
works. I can in fact connect now, but only with TWO_TASK set. If I
set TWO_TASK and then start the OpenSystemsArchitect or ODBCConfig
then I can connect. If I don't set TWO_TASK then I get an
ORA-12162,
even tho OPOSSUM.WORLD appears in the listbox.
oracle@(protected)
12162, 00000, "TNS:net service name is incorrectly specified"
// *Cause: The connect descriptor corresponding to the net service
name in
// TNSNAMES.ORA or in the directory server (Oracle Internet
Directory) is
// incorrectly specified.
// *Action: If using local naming make sure there are no syntax
errors in
// the corresponding connect descriptor in the TNSNAMES.ORA file. If
using
// directory naming check the information provided through the
administration
// used for directory naming.
Why do I have to set TWO_TASK to be able to connect? Or did I do
something wrong in my listener.ora or tnsnames ora? Can you, or
someone else here, please help? I mean, though I can do what I
intended to do, i.e. test the Open Systems Architect, it seems to be
a rather unorthodox way to chose the database one wants to connect to
in a shell environment before starting a GUI application, isn't
it? ;-) Below is my complete environment. Why would I need a DB entry
in the odbc.ini if it doesn't work?
I have the following envorinment for the instant client:
export ORACLE_HOME=/home/oracle/product/iclient
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME:$PATH
The file ~/.odbc.ini looks like this:
[OPOSSUM.WORLD]
Description = Oracle 10g ODBC driver
Driver = Oracle 10g ODBC driver
DB = OPOSSUM.WORLD
USER =
PASSWORD =
ORACLE_HOME = /home/oracle/product/iclient
TNS_ADMIN = /home/oracle/product/iclient/network/admin
File /etc/unixODBC/odbcinst.ini (created with ODBCConfig):
[Oracle 10g ODBC driver]
Description =
Driver = /home/oracle/product/iclient/libsqora.so.10.1
Driver64 =
Setup = /usr/lib/unixODBC/liboraodbcS.so.1
Setup64 =
UsageCount =
CPTimeout =
CPReuse =
FileUsage = 1
File /etc/unixODBC/odbc.ini is empty.
The network directory is a link to $ORACLE_HOME/network of the Oracle
server installation.
oracle@(protected)
lrwxrwxrwx 1 oracle dba 35 2006-09-16 19:18 network -> /home/oracle/
product/10.2.0/network
I did this because the docs said the only reason to set ORACLE_HOME
is to enable the driver to locate the tnsnames.ora. And even if one
sets it it should be set to the installation directory of the Instant
Client. So I set it there, along with LD_LIBRARY_PATH and linked the
Oracle server network/admin directory to it. From that point on, I
could at least connect setting TWO_TASK beforehand...
$ORACLE_HOME/network/admin/listener.ora:
OPOSSUM =
(address_list =
(address = (protocol = tcp) (host = localhost) (port = 25000))
(address = (protocol = ipc) (key = OPOSSUM.WORLD))
)
sid_list_OPOSSUM =
(sid_list =
(sid_desc =
(sid_name = OPOSSUM)
(global_dbname = OPOSSUM.WORLD)
(oracle_home = /home/oracle/product/10.2.0)
)
)
log_file_OPOSSUM = OPOSSUM
log_directory_OPOSSUM = /home/oracle/product/10.2.0/network/log
trace_level_OPOSSUM = off # off, user, admin, support
trace_file_OPOSSUM = OPOSSUM
trace_directory_OPOSSUM = /home/oracle/product/10.2.0/network/trace
connect_timeout_OPOSSUM = 10
sqlnet.authentication_services = (none)
$ORACLE_HOME/network/admin/tnsnames.ora:
OPOSSUM.WORLD =
(description =
(address = (protocol = tcp) (host = localhost) (port = 25000))
(connect_data =
(sid = OPOSSUM)
(global_name = OPOSSUM.WORLD)
)
)
--
cul8er
Paul
paul.foerster@(protected)
--
To unsubscribe, email: suse-oracle-unsubscribe@(protected)
For additional commands, email: suse-oracle-help@(protected)
Please see http://www.suse.com/oracle/ before posting