geotiger
asked on
How to set up ODBC for Oracle on Solaris with unixODBC driver manager
I am trying to follow the metalink doc to set up ODBC connections:
https://metalink.oracle.com/metalink/plsql/f?p=130:14:7406918959791655811::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,363899.1,1,0,1,helvetica
But I got the following error:
oracle@ors2di # ./doit
make: Fatal error in reader: /opt/app/oracle/product/10 .2.0/db_1/ odbc/lib/e nv_odbc.mk , line 1422: Unexpected end of line seen
./doit: ./odbcsel1: not found
oracle@ors2di #
https://metalink.oracle.com/metalink/plsql/f?p=130:14:7406918959791655811::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,363899.1,1,0,1,helvetica
But I got the following error:
oracle@ors2di # ./doit
make: Fatal error in reader: /opt/app/oracle/product/10
./doit: ./odbcsel1: not found
oracle@ors2di #
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
1 .Install unixODBC driver
# pkg-get -i unixodbc
2. Configure DNS
root@ors2di # more odbcinst.ini
[owb1odbc]
Description = Oracle 10g R2 ODBC driver.
Driver = /opt/app/oracle/product/10
Setup =
FileUsage =
CPTimeout =
CPReuse =
UsageCount = 1
root@ors2di # more odbc.ini
[ora102]
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
CloseCursor = T
DisableDPM = F
DisableMTS = T
Driver = owb1odbc
DSN = ora102
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName = owb1
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
UserID = std_rep
root@ors2di #
3. test it
oracle@ors2di # pwd
/opt/app/oracle/product/10
oracle@ors2di # more doit
#!/bin/sh
SAMPL=odbcsel1
export SAMPL
rm -rf $SAMPL".o"
rm -rf $SAMPL
LD_LIBRARY_PATH=$ORACLE_HO
export LD_LIBRARY_PATH
/usr/ccs/bin/make -f cdemo_odbc.mk build OBJS=$SAMPL".o" EXE=$SAMPL
./$SAMPL
oracle@ors2di # isql -v ora102 scott tiger
[01000][unixODBC][Driver Manager]Can't open lib '/opt/app/oracle/product/1
[ISQL]ERROR: Could not SQLConnect
oracle@ors2di #