Jump to: navigation, search

Configure unixODBC for Oracle on Solaris

  1. Go to the Instant Client installation directory: $DRIVER
  2. Run
  3. ./odbc_update_ini.sh $UNIXODBC $DRIVER Oracle11gDriver ORAONSOL

    1. The $UNIXODBC/etc/odbcinst.ini file is updated with:
    2. [Oracle11gDriver]
      Description = Oracle ODBC driver for Oracle 11g
      Driver = $DRIVER/libsqora.so.11.1
      Setup =
      FileUsage =
      CPTimeout =
      CPReuse =

    3. The $HOMEDIR/.odbc.ini file is updated with:
    4. [ORAONSOL]
      Application Attributes = T
      Attributes = W
      BatchAutocommitMode = IfAllSuccessful
      BindAsFLOAT = F
      CloseCursor = F
      DisableDPM = F
      DisableMTS = T
      Driver = Oracle11gDriver
      DSN = ORAONSOL
      EXECSchemaOpt =
      EXECSyntax = T
      Failover = T
      FailoverDelay = 10
      FailoverRetryCount = 10
      FetchBufferSize = 64000
      ForceWCHAR = F
      Lobs = T
      Longs = T
      MaxLargeData = 0
      MetadataIdDefault = F
      QueryTimeout = T
      ResultSets = T
      ServerName =
      SQLGetData extensions = F
      Translation DLL =
      Translation Option = 0
      DisableRULEHint = T
      UserID =
      StatementCache=F
      CacheBufferSize=20
      UseOCIDescribeAny=F

  4. Create a new Network Configuration file named $HOMEDIR/.tnsnames.ora with the following:
  5.   (DESCRIPTION =
        (ADDRESS_LIST =
         (ADDRESS = (PROTOCOL = TCP)(HOST = oraclehost)(PORT = 1521))
       )
       (CONNECT_DATA =
         (SERVICE_NAME = MY_ORAQ)
       )
     )
    
    Important
    MY_ORAQ is a sample name only.
  6. In the .odbc.ini file, change ServerName to be the same as SERVICE_NAME in .tnsnames.ora, and set the UserID and Password
  7. Set Environment Variables:
  8. export LD_LIBRARY_PATH=$UNIXODBC/lib/:$DRIVER/
    export ORACLE_SID=my_oraq
    
  9. Go to $UNIXODBC/bin and test DSN with the command:
  10. ./isql -v ORAONSOL
    
This page was last edited on June 19, 2020, at 14:27.
Comments or questions about this documentation? Contact us for support!