Results 1 to 15 of 15
  1. #1
    Join Date
    May 2009
    Posts
    7

    Unanswered: What are the ODBC connect details for the HR sample database?

    I have installed Oracle Express on Ubuntu 8.10 and read the Getting Started tutorials. Everything worked fine.

    THE DSN

    I need to connect via ODBC, to start with to the HR sample database on my PC using unixODBC.
    The Getting Started tutorial says the userid and password are both hr, but what is the data source name (dsn) to be used with the SQLConnect?

    THE INIs

    The ini files below are the result of googling, not of any insight on my part.

    /etc/odbcinst.ini
    [OracleExpressdrv]
    Driver = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libsqora.so.10.1
    Description = Oracle 10g express driver


    /etc/odbc.ini
    [hrdsn]
    Driver = OracleExpressdrv
    Application Attributes = T
    Attributes = W
    BatchAutocommitMode = IfAllSuccessful
    CloseCursor = F
    DisableDPM = F
    DisableMTS = T
    DSN = TestDSN
    EXECSchemaOpt =
    EXECSyntax = T
    Failover = T
    FailoverDelay = 10
    FailoverRetryCount = 10
    FetchBufferSize = 64000
    ForceWCHAR = F
    Lobs = T
    Longs = T
    MetadataIdDefault = F
    QueryTimeout = T
    ResultSets = T
    # ServerName is TNS_alias_from_tnsnames.ora
    ServerName = OraDB
    SQLGetData extensions = F
    Translation DLL =
    Translation Option = 0
    UserID = ken


    THE ENVIRONMENT

    Before running my odbc test program I issued
    LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib;export LD_LIBRARY_PATH
    and checked via env command that the ldlibpath actually had been set correctly.



    After SQLConnect received the following error:

    Usage error: SQLConnect: dsn=hrdsn, user=hr, password=hr <<< output by my test program
    1: st=IM002, nerr=0, msg=
    [unixODBC][Driver Manager]Data source name not found, and no default driver specified

    The first part of the error message hints at there being something wrong with dsn=hrdsn. I don't understand the second part 'and no default driver specified'.

    I am totally stuck. Advice would be most appreciated.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Good Luck!

    Just yesterday I installed V10.2.0.1 on Ubuntu V9.0.4 (Jaunty) so I know it can be done.
    I don't do XE or ODBC.
    I do recall a webpage which described how to install XE directly from oracle.com; so I know it can be made to work.
    Upon further review & consideration, I do not think ODBC is involved with XE.

    Enjoy!
    Last edited by anacedent; 05-09-09 at 14:19.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2009
    Posts
    7
    Many thanks.
    Good to hear Oracle is working on Ubuntu 9.04.

    I think ODBC is possible on XE. Section 4.5 in the XE installation guide for Linux

    Oracle&#174; Database Express Edition Installation Guide


    talks about Compiling the Oracle ODBC Driver Demos. It tells you to download and install the unixODBC DriverManager from unixODBC. On Ubuntu this is already preinstalled and/or available via the Synaptic Manager. It also instructs you to run a makefile demo_xe.mk to build an odbcdemo program. The makefile did not work for me (hundreds of compilation errors), but I looked at the odbcdemo.c code and could see that dsn=TESTDBDSN for user=hr and password=hr. In other words, by luck the demo program seems to be connecting to the HR sample database.

    I changed the /etc/odbc.ini file to:


    [TestDBDSN]
    Application Attributes = T
    Attributes = W
    BatchAutocommitMode = IfAllSuccessful
    CloseCursor = F
    DisableDPM = F
    DisableMTS = T
    Driver = OracleExpressdrv
    DSN = TestDBDSN
    ....

    and also in my test program which now produced the following error:


    Usage error: SQLConnect: dsn=TestDBDSN, user=hr, password=hr
    1: st=IM004, nerr=0, msg=
    [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed


    which shows that the unixODBC driver manager has loaded the driver and that the driver immediately encountered problems.

    The sql calls issued before the SQLConnect("TestDBDSN", "hr" , "hr") were OK, i.e. these:

    rc0 = SQLAllocHandle ( SQL_HANDLE_ENV , SQL_NULL_HANDLE , &henv ) ;
    rc = SQLSetEnvAttr ( henv, SQL_ATTR_ODBC_VERSION , *)SQL_OV_ODBC3 , 0 ) ;
    rc = SQLAllocHandle ( SQL_HANDLE_DBC , henv , &hdbc ) ;
    SQLSetConnectAttr ( hdbc , SQL_LOGIN_TIMEOUT , (void*)5 , 0 ) ;

    However, the error appears after SQLConnect and yet the rc0 was reported as OK.

    The error message 'Driver's SQLAllocHandle on SQL_HANDLE_HENV failed' is totally unhelpful to me as a user since I don't know the conditions that lead to failure.

    I don't think this is a bug. It is so fundamental Oracle could/should not have got it wrong. The connect does not even start.

    I have googled for hours, but every lead has failed.

    I don't want to give up on this. What can I do?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >and also in my test program which now produced the following error:
    I am curious as to in which language is this program written?
    Why are you writing a program to access this sample schema data?

    >Usage error: SQLConnect: dsn=TestDBDSN, user=hr, password=hr
    >1: st=IM004, nerr=0, msg=[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
    Above is not any standard Oracle error message


    >which shows that the unixODBC driver manager has loaded the driver and that the driver >immediately encountered problems.
    Somewhat encouraging

    >The sql calls issued before the SQLConnect("TestDBDSN", "hr" , "hr") were OK, i.e. these:

    In order for ODBC to work an Oracle background process called a listener need to be running.

    As the owner of the Oracle software tree (usually oracle) run the following command.
    lsnrctl status
    & using CUT & PASTE post the results back here.

    Every connection requests gets logged usually into $ORACLE_HOME/network/log/listener.log

    CUT & PASTE the "tail end" of this file here.

    CUT & PASTE the content of $ORACLE_HOME/network/admin/tnsnames.ora

    Read & heed the #1 STICKY post at top of this forum to see how to use <code tags>
    so posted information retains desired formatting.
    http://www.dbforums.com/oracle/10316...s-posters.html
    http://www.dbforums.com/misc.php?do=bbcode

    Good Luck!
    Last edited by anacedent; 05-10-09 at 12:16.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    May 2009
    Posts
    7
    Many thanks.

    I am writing this in C++.

    The error message is output by the unixODBC driver manager. The message format:

    [unixODBC][Driver Manager] means the source of the error message is output by the unixODBC driver manager. The rest of the message 'Driver's SQLAllocHandle on SQL_HANDLE_HENV failed' is the native Oracle ODBC driver's message, which the unixODBC driver manager passes on as is.

    I wrote an SQL authoring system with Intellisense features for Windows about 5 years ago. It could handle SQL programming for DB2, MySQL, Mimer SQL. SQL Anywhere and SQL Server, but I did not have time then to make it work for Oracle. Having a bit of spare time, I want to go back to that now, but I left the world of Windows (good riddance!) about 10 months ago and I am now on Ubuntu 8.10. unixODBC is a free package for Linux that is equivalent to the Windows ODBC Administrator. It is also a driver manager that provides the layer between application programs and dbproduct-specific ODBC drivers. I have checked the ODBC plumbing via unixODBC for DB2, MySQL, Mimer and SQL Anywhere by connecting to their sample databases. That is what I need to do for Oracle too as a preparatory step.

    I am new to Oracle, so I will need to study a bit first before I can copy and paste the information you requested. Hopefully, I will come back on this tomorrow.

    Ken

  6. #6
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I suggest you consider doing the following:
    Get a Windows PC.
    Install Oracle client s/w on it.
    Configure SQL*Net on Windows PC so it can & does connect to Oracle DB on Ubuntu.
    Configure ODBC so that Excel on Windows can connect to Oracle DB on Ubuntu.
    Then compare & contrast Windows ODBC to your programs.


    Right not I don't know for sure whether the root cause for the present errors are due to
    problems with the DB server configuration or with the client s/w.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  7. #7
    Join Date
    May 2009
    Posts
    7
    Here is the requested info:

    LSNRCTL status

    I assume 'oracle' is a username, so navigated to the database login page via Ubuntu menuitems: Application->Other->Goto Database Home Page. I entered oracle as username. I remember only setting one password when installing and gave that as password. It was rejected. I then logged in as user system and gave the same password. Login was ok this time, but I don't know if this is the way to do it. If totally wrong, please instruct and I will do it again.

    Code:
    I first changed current directory to Oracle's bin:
    
    ken@ken-desktop:~$ cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
    
    and called lsnrctl status:
    
    ken@ken-desktop:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin$ ./lsnrctl status
    
    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-MAY-2009 09:30:16
    
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    
    Message 1053 not found; No message file for product=network, facility=TNSMessage 1020 not found; No message file for product=network, facility=TNSMessage 1021 not found; No message file for product=network, facility=TNSMessage 1022 not found; No message file for product=network, facility=TNSMessage 1023 not found; No message file for product=network, facility=TNSMessage 1026 not found; No message file for product=network, facility=TNSMessage 1034 not found; No message file for product=network, facility=TNSMessage 1024 not found; No message file for product=network, facility=TNSMessage 1025 not found; No message file for product=network, facility=TNSMessage 1040 not found; No message file for product=network, facility=TNSMessage 1422 not found; No message file for product=network, facility=TNSMessage 1033 not found; No message file for product=network, facility=TNSMessage 1028 not found; No message file for product=network, facility=TNSMessage 1415 not found; No message file for product=network, facility=TNS  Message 1050 not found; No message file for product=network, facility=TNS
      Message 1050 not found; No message file for product=network, facility=TNS
      Message 1050 not found; No message file for product=network, facility=TNS
    Message 1029 not found; No message file for product=network, facility=TNSMessage 1411 not found; No message file for product=network, facility=TNS
      Message 1408 not found; No message file for product=network, facility=TNS
    Message 1411 not found; No message file for product=network, facility=TNS
      Message 1408 not found; No message file for product=network, facility=TNS
    Message 1411 not found; No message file for product=network, facility=TNS
      Message 1408 not found; No message file for product=network, facility=TNS
    Message 1411 not found; No message file for product=network, facility=TNS
      Message 1408 not found; No message file for product=network, facility=TNS
    Message 1052 not found; No message file for product=network, facility=TNS


    THE LISTENER.LOG

    Taken after restart of PC around 11:08

    Code:
    11-MAY-2009 11:01:03 * service_update * XE * 0
    11-MAY-2009 11:08:46 * service_update * XE * 0
    11-MAY-2009 11:08:46 * service_update * XE * 0
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    11-MAY-2009 11:08:47 * service_died * XE * 12537
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ken-desktop)(PORT=1521)))
    Listener completed notification to CRS on stop
    
    
    11-MAY-2009 11:08:47 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=ken-desktop)(USER=oracle))(COMMAND=stop)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * stop * 0
    
    TNSLSNR for Linux: Version 10.2.0.1.0 - Production on 11-MAY-2009 11:10:03
    
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    
    System parameter file is /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
    Log messages written to /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
    Trace information written to /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/trace/listener.trc
    Trace level is currently 0
    
    Started with pid=4982
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ken-desktop)(PORT=1521)))
    Listener completed notification to CRS on start
    
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    11-MAY-2009 11:10:04 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=ken-desktop)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * status * 0
    11-MAY-2009 11:10:10 * service_register * XE * 0
    11-MAY-2009 11:10:10 * service_update * XE * 0
    11-MAY-2009 11:10:11 * service_update * XE * 0
    11-MAY-2009 11:10:17 * service_update * XE * 0
    11-MAY-2009 11:10:23 * service_update * XE * 0
    11-MAY-2009 11:10:29 * service_update * XE * 0
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    11-MAY-2009 11:10:32 * service_update * XE * 0
    11-MAY-2009 11:10:38 * service_update * XE * 0
    11-MAY-2009 11:11:32 * service_update * XE * 0
    11-MAY-2009 11:12:38 * service_update * XE * 0
    
    
    At around 11:14:
    From command line set the LD_LIBRARY_PATH:
    
    LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib;export LD_LIBRARY_PATH
    
    Then changed current directory to my testprogram:
     
    ken@ken-desktop:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log$ cd /home/ken/projects/ls/bin/Debug
    
    and executed test program called ls (unfortunate name since it clashes with linux ls command, but it was defined on Windows a long time ago):
    
    ken@ken-desktop:~/projects/ls/bin/Debug$ ./ls
    Usage error: SQLConnect: dsn=TestDBDSN, user=hr, password=hr
    1: st=IM004, nerr=0, msg=
    [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
    
    The ./ls command was issued around 11:15
    
    
    Now, at 11:34 the tailpart of the log contaions two more entries:
    
    11-MAY-2009 11:14:50 * service_update * XE * 0
    11-MAY-2009 11:24:51 * service_update * XE * 0
    I don't know if the logentry for 11:14:50 was is created by my ls test program trying to connect.



    TSNAMES.ORA Network Configuration File:

    Code:
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ken-desktop)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
        )
      )
    
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
        )
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
        )
      )

    Ken

  8. #8
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    The SID/service name for your database is "XE".
    From what you have posted I do not see where for ODBC you actually configured it to communicate with XE.

    I STRONGLY suggest you can the name of your program to something other than "ls".

    I suggest you consider doing the following:
    Get a Windows PC.
    Install Oracle client s/w on it.
    Configure SQL*Net on Windows PC so it can & does connect to Oracle DB on Ubuntu.
    Configure ODBC so that Excel on Windows can connect to Oracle DB on Ubuntu.
    Then compare & contrast Windows ODBC to your programs.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  9. #9
    Join Date
    May 2009
    Posts
    7
    I have contacted unixODBC and they confirmed the message 'Driver's SQLAllocHandle on SQL_HANDLE_HENV failed' is output by the unixODBC driver manager and that the loaded Oracle ODBC driver did not produce any native error message to assist its users. unixODBC also suggested I run strace to get runtime tracing. Here is the start of the strace log:

    execve("/bin/ls", ["ls"], [/* 43 vars */]) = 0
    brk(0) = 0x9d34000
    access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
    mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f7c000
    access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/sse2/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/sse2/cmov", 0xbfd999bc) = -1 ENOENT (No such file or directory)
    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/sse2/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/sse2", 0xbfd999bc) = -1 ENOENT (No such file or directory)
    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/librt.so.1", O_RDONLY) = 3


    I have never used strace, but assume the open("/usr/lib/oracle/xe/app/..../server/lib/tls/i686/sse2/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

    is from the Oracle driver trying to open shared object library librt.so.1.

    The Oracle install did not put tls/i686/sse2/cmov/librt.so.1 into the /usr/lib/oracle/xe/app/..../server/lib directory which is also the LD_LIBRARY_PATH. I did, because there is a tls directory on the PC and I just copied it there.

    ken@ken-desktop:~$ locate /tls/i686
    /lib/tls/i686
    /lib/tls/i686/cmov
    /lib/tls/i686/cmov/ld-2.8.90.so
    /lib/tls/i686/cmov/ld-linux.so.2
    /lib/tls/i686/cmov/libBrokenLocale-2.8.90.so
    .....
    .....
    /lib/tls/i686/cmov/librt-2.8.90.so
    /lib/tls/i686/cmov/librt.so.1
    /lib/tls/i686/cmov/libthread_db-1.0.so
    /lib/tls/i686/cmov/libthread_db.so.1
    /lib/tls/i686/cmov/libutil-2.8.90.so
    /lib/tls/i686/cmov/libutil.so.1

    shows the tls functionality is in /lib, but there is no path /lib/tls/i686/sse2/cmov/.... So there are missing libraries.

    I did ldd on the Oracle driver so file:

    ken@ken-desktop:~$ ldd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libsqora.so.10.1
    linux-gate.so.1 => (0xb80dd000)
    libdl.so.2 => /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/libdl.so.2 (0xb8046000)
    libm.so.6 => /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/libm.so.6 (0xb8020000)
    libpthread.so.0 => /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/libpthread.so.0 (0xb8006000)
    libnsl.so.1 => /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/libnsl.so.1 (0xb7fed000)
    libclntsh.so.10.1 => /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so.10.1 (0xb7239000)
    libodbcinst.so.1 => /usr/lib/libodbcinst.so.1 (0xb7215000)
    libc.so.6 => /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/libc.so.6 (0xb70b7000)
    /lib/ld-linux.so.2 (0xb80de000)
    libnnz10.so => /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libnnz10.so (0xb6eb1000)
    libltdl.so.7 => /usr/lib/libltdl.so.7 (0xb6ea8000)

    which as far as I understand things did not find any missing library dependencies.



    I don't know what the tls directory is for nor do I understand why the Oracle driver assumes the tls stuff in the ld_library_path when the Oracle installer does not put it there. I tried adding :/lib/tls/i686 to the LD_LIBRARY_PATH hoping the Oracle driver would pick the tls stuff in situ from there. It did not make any difference.

    I have been googling for days and still have not found Oracle user documentation about this. I think it is way too complicated for an ODBC user to solve by trial and error. I would certainly welcome self-contained, complete and tested Oracle documentation. A single page is probably enough for each major Linux distribution. And of course Ubuntu needs to be covered. It is rapidly gaining in popularity.

    Having said that I am still live and kicking and open to suggestions!

  10. #10
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Having said that I am still live and kicking and open to suggestions!
    Then why have you seemingly ignored my previous suggestions?

    >open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/librt.so.1", O_RDONLY) = 3
    Means it found this library.

    Let me google that for you

    http://oracle.ittoolbox.com/groups/t...t-odbc-1007839

    BTW - This thread's title is not correct.
    HR is a schema within the Oracle (XE) database.

    >A single page is probably enough for each major Linux distribution. And of course Ubuntu needs to be covered.
    Nothing is impossible for the person who does not have to do it.
    Will YOU be producing such a document to make it easier for others in the future?
    Last edited by anacedent; 05-15-09 at 15:10.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  11. #11
    Join Date
    May 2009
    Posts
    7
    Thanks for letting me know about IT Toolbox. Very useful.

    I did not ignore your suggestion to get a Windows PC. It is good, but I haven't got a spare PC anymore, the ex-Windows PC is running Ubuntu now.

    I am not sure if getting another Windows PC would help, because I don't think there is a problem with the values put into the /etc/odbc ini files. They are probably correct. In fact, they are the same as in the IT Toolbox post by madunix except for the Servername property. madunix had it set to Linux and I had it set to XE (there is a comment in my copy that says the Servername is TNS_alias from tnsnames.ora). I changed Servername to Linux, but it did not make any difference, so put it back to XE again.

    This appears to be an installation issue for Oracle on Linux/Ubuntu caused by missing libraries, or at least that is the first stumbling block.

    If it is not too much like the blind leading the blind, I will be happy to write a document about the steps and settings needed for Ubuntu. If I can get it to work.

  12. #12
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I do not do XE. I am running EE on Ubuntu V9.0.4.
    From what I have observed, there are Oracle library difference between XE & EE; which surprises me.

    I got to IT TOOLBOX from researching /u01/app/oracle/odbc/demo/cdemo/cdemo_odbc.mk

    I am not sure if you have an error of commission or error of omission in odbc configuration.
    I suspect error of omission.

    If I were in your position I would make continuous use of strace to gain visibility into what happens or not happens while trying to make odbc connection.

    Please keep us posted on your efforts.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  13. #13
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1

    metalink.oracle.com

    Subject: How to Setup and Verify Setup of Oracle ODBC Driver on Linux
    Doc ID: 404041.1 Type: BULLETIN
    Modified Date : 03-FEB-2009 Status: PUBLISHED
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  14. #14
    Join Date
    May 2009
    Posts
    7
    There are missing libraries.

    The important thing now is to establish if they are missing on Ubuntu and should have been there, or if they are missing in the XE install, or maybe a bit of both.

    Have googled on /tls/i686/sse2 and permutations and the sse2-part seems to refer to very low-level software/hardware that speeds up mathematical calculations. This kind optimisation is very useful for decoding MP3/4 video formats, audio and other such computer-intensive tasks. Dbs are notoriously disk-bound, so I don't understand what/why the the sse2 stuff is doing here.

    Here are the important events from the strace log:

    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/sse2/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/sse2/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/librt.so.1", O_RDONLY) = 3 <<< on my Ubuntu PC, maybe OK because I have downloaded
    loads and loads of video/audio codecs.

    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/cmov/libselinux.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/sse2/cmov/libselinux.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/sse2/libselinux.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)



    There is NO /lib/tls/i686/sse2 on my Ubuntu 8.10. Is it present on Ubuntu 9.04? If so, this may be an Ubuntu bug fix and I will upgrade from 8.10 to 9.04 to see what will happen.

    There is however a /lib/tls/i686/cmov on my 8.10, but I don't know how it got there. I think probably via myself downloading video codecs and video apis software like ffmpeg.

    Is there any sse2 in the library paths of Oracle EE or in XE (for XE maybe I have made some mistake?).

    The

    open("/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/tls/i686/sse2/cmov/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

    is executed by the Oracle driver. The sse2 sticks out like a sore thumb. The Oracle driver assumes it is there and yet it is not. Is that because the Oracle XE install should have installed it, but didn't?

    Folks, I need your help.

  15. #15
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    oracle@bcm-laptop:/u01/app/oracle/dbs$ grep libselinux.so /tmp/master.lis
    /lib/libselinux.so.1
    oracle@bcm-laptop:/u01/app/oracle/dbs$ grep sse2 /tmp/master.lis
    /usr/lib/sse2
    /usr/lib/sse2/libspeexdsp.so.1
    /usr/lib/sse2/libspeex.so.1
    /usr/lib/sse2/libspeexdsp.so.1.5.0
    /usr/lib/sse2/libspeex.so.1.5.0
    oracle@bcm-laptop:/u01/app/oracle/dbs$ grep librt.so /tmp/master.lis
    /lib/tls/i686/cmov/librt.so.1
    /lib/librt.so.1
    /usr/lib/librt.so
    /u01/app/oracle/lib/stubs/librt.so
    /u01/app/oracle/lib/stubs/librt.so.1
    oracle@bcm-laptop:/u01/app/oracle/dbs$ grep "/tls/" /tmp/master.lis
    /lib/tls/i686
    /lib/tls/i686/cmov
    /lib/tls/i686/cmov/libc.so.6
    /lib/tls/i686/cmov/libm.so.6
    /lib/tls/i686/cmov/libthread_db-1.0.so
    /lib/tls/i686/cmov/libnsl-2.9.so
    /lib/tls/i686/cmov/libthread_db.so.1
    /lib/tls/i686/cmov/libnss_nisplus-2.9.so
    /lib/tls/i686/cmov/libresolv.so.2
    /lib/tls/i686/cmov/libnsl.so.1
    /lib/tls/i686/cmov/libBrokenLocale-2.9.so
    /lib/tls/i686/cmov/libcrypt.so.1
    /lib/tls/i686/cmov/libutil.so.1
    /lib/tls/i686/cmov/libnss_hesiod.so.2
    /lib/tls/i686/cmov/libc-2.9.so
    /lib/tls/i686/cmov/libcrypt-2.9.so
    /lib/tls/i686/cmov/libnss_dns.so.2
    /lib/tls/i686/cmov/libmemusage.so
    /lib/tls/i686/cmov/libnss_compat-2.9.so
    /lib/tls/i686/cmov/libcidn-2.9.so
    /lib/tls/i686/cmov/libutil-2.9.so
    /lib/tls/i686/cmov/libBrokenLocale.so.1
    /lib/tls/i686/cmov/libnss_hesiod-2.9.so
    /lib/tls/i686/cmov/libpcprofile.so
    /lib/tls/i686/cmov/libpthread-2.9.so
    /lib/tls/i686/cmov/libresolv-2.9.so
    /lib/tls/i686/cmov/libnss_nis-2.9.so
    /lib/tls/i686/cmov/libanl.so.1
    /lib/tls/i686/cmov/libnss_compat.so.2
    /lib/tls/i686/cmov/ld-2.9.so
    /lib/tls/i686/cmov/libnss_nis.so.2
    /lib/tls/i686/cmov/libnss_files-2.9.so
    /lib/tls/i686/cmov/libpthread.so.0
    /lib/tls/i686/cmov/libSegFault.so
    /lib/tls/i686/cmov/libm-2.9.so
    /lib/tls/i686/cmov/libdl.so.2
    /lib/tls/i686/cmov/libnss_dns-2.9.so
    /lib/tls/i686/cmov/libcidn.so.1
    /lib/tls/i686/cmov/ld-linux.so.2
    /lib/tls/i686/cmov/librt.so.1
    /lib/tls/i686/cmov/libnss_nisplus.so.2
    /lib/tls/i686/cmov/libdl-2.9.so
    /lib/tls/i686/cmov/librt-2.9.so
    /lib/tls/i686/cmov/libnss_files.so.2
    /lib/tls/i686/cmov/libanl-2.9.so

    /tmp/master.lis is a file which contains all filenames on system

    HTH!
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •