Oracle ODBC Connection: TNS Problem?

Hello!
I'm trying to connect to a Oracle Database from a 64bit Linux machine.
I'm using instantclient 10.2.0.4 64bit and oracle odbc driver.
Here are all files and env variables, i created:
ODBCINST.INI
[Oracle]
Description = Oracle Driver
Driver = /usr/lib/libsqora.so.10.1
UsageCount = 2
ODBC.INI
[DS1]
Description = DS1
Driver = Oracle
Trace = Yes
TraceFile = sql.log
Database = //111.11.11.111:1111/db1
User = user
Password = pass
LD_LIBRARY_PATH = :/usr/lib/oracle/10.2.0.4/client64/lib
SQLPATH = /usr/lib/oracle/10.2.0.4/client64/bin
I also had edited the SQLConnect.c and isql.c: http://sourceforge.net/tracker/?func=detail&aid=2260937&group_id=1544&atid=351544
If i'm tring to connect to the database ( isql -v DS1 user pass ), i'm getting this error message:
[S1000][unixODBC][Oracle][ODBC][Ora]ORA-12162: TNS:net service name is incorrectly specified
I found a nice work-around for this problem:
export TWO_TASK=//111.11.11.111:1111/db1
After this change, i can connect to the database...
But this means, all oracle connections are trying to connect to THIS server, right? But i need more then one server possibility...
Any ideas?
Thanks, mdo.

Hello
I have found the resolution to the problem , and below is the details if required by any one .
Thanks
Harshad
1. Using MS Access, follow the process to link tables from the Oracle
database using the user account you wish to restrict, until the list of
attachable objects is shown.
2. Note the tables that appear in the list. You should see a long list of
tables owned by multiple schema owners.
3. Without linking any tables, close the Link Tables dialog box.
4. Create an ALL_OBJECTS view and ALL_SYNONYMS view in the user's schema in
which you used to log into the database.
For example:
CREATE OR REPLACE VIEW SCOTT.ALL_OBJECTS AS
SELECT * FROM SYS.ALL_OBJECTS
WHERE OWNER IN ('SCOTT');
CREATE OR REPLACE VIEW SCOTT.ALL_SYNONYMS AS
SELECT * FROM SYS.ALL_SYNONYMS
WHERE OWNER IN ('SCOTT');
5. Using MS Access, again follow the process to link tables from the Oracle
database using the user account from above to log in.
6. Note the tables that show up in the list. The only tables listed should
be those owned by the schema owner specified by the views, if the example
statement above is used.
--NOTE that this technique has the limitation that only objects actually
owned by the view user will be viewable. For example, if the user has
a synonym that points to an object in another user's schema, it will not
be visible

Similar Messages

  • Oracle ODBC Connectivity with db2

    I want to connect forms/reports with
    IBM DB2 Database installed on the
    same machine.But while connecting
    through odbc driver it gives "Invalid
    session id,access denied"and does not
    get connected.Same message comes when
    one gets connected to sql but it runs fine.
    I have tried in two ways to configure ODBC.
    1. Using Client Configuration Assistant
    of DB2.
    2. Usgin OCA and Intersolv odbc
    driver coming along with the cd.
    Forms and reports are 6i and
    db2 version is 5.
    Thanks in advance.
    Milind

    Dear Ajay,
    I used heterogenous connectivity to connect to DB2 but it is very very slow. And checked about Oracle gateway to Db2 and came to know that it is also very slow. The next solution was using ODBC to db2 using Forms 6i Patch 13. The connectivity is very good otherwise u can use DB2 Information Integrator software (cost about $20-50 K). If you need any more information please let me know.

  • Memory leak using Oracle ODBC connection. Works perfect with MSSQL.

    Hello,
    what could cause memory leaks which is not persistent. Sometimes in different OS and sometimes in different hardware. the common player to my issue is only with oracle.

    A memory leak that is not persistent is not a memory leak.
    You'll have to be way more specific for a more meaningful answer.
    Have you tried memory profiling tools for your operating system to locate the "leak"?
    Yours,
    Laurenz Albe

  • Leave out specified columns when making source ODBC connection to Access?

    Hello,
    I have question. I am making Non Oracle ODBC connection to Access file and then of course the Import of the tables from the Access file in OWB 10.2.0.1. Is it possible to choose and leave out (omit) some columns from the tables during this process? You may suggest that I should make connection to the whole table as it is and then leave out the unnecessary columns during mapping to the target table. But the problem is that these columns I would like to leave out are represented as LONG datatype which is not supported by Oracle (ORA-00997 problem). The result is that the tables with this datatype are "somehow imported" but it is not possibe to open them in Data Viewer (ORA-00997 message) and it is not possible to use them in Mapping editor (API8014 message). So, is it possible to choose only several columns from the Access table when making the ODBC connection to it and the Import of the tables to Non Oracle / ODBC / "eg. My Access" / Tables ?
    Thanks a lot!
    Jan

    OK,
    the first reply will be from me :)
    Now I found a solution which is not so elegant but works for me.
    My task was to make the connection and loading the data from Access to Oracle without any modification to the original source file (which is of course normal DW condition...).
    I created another Access file linked to the original one (no copy, only linkage, it means every change to the original file are immediately seen in the second one). It was not still possible to make changes to the attributes in this link file, so i created views (in Access called queries) of all the tables and here I left out unnecessary columns.
    Then I changed my ODBC connection link to the second file instead of first and tried to do it all the tasks in OWB... it works, I can see the data and I can use the views in mappings and so on...
    but if any one knows the solution just for OWB as I asked before, please let me know!!!
    Jan

  • Oracle ODBC and DAO extremely slow

    Hi
    I'm using Microsoft DAO 3.6 with an Oracle ODBC connection (version 9.2) in an VB6 application.
    Opening an updateable dynaset is extremely slow, I have measured the performance with Oracle ODBC, Microsoft Oracle ODBC and Microsoft SQL-Server ODBC as follows:
    Oracle ODBC: 1952 ms
    MS Oracle ODBC: 360 ms
    MS SQL-Server ODBC: 40 ms (connection to a MS SQL-Server)
    If I use the SQLpassthrough option the result is about 10 ms in all 3 cases, but the dynaset is readonly !
    The testing program is as follows:
    Option Explicit
    Private Declare Function timeGetTime Lib "winmm.dll" () As Long
    Private Sub Form_Load()
    Dim wsdata As DAO.Workspace
    Dim db As DAO.Database
    Dim dbconn As String
    Dim rs As DAO.Recordset
    Dim start As Long
    dbconn = "ODBC;DSN=AdhocitORA;UID=adhocit;PWD=adhocit;"
    Set wsdata = DBEngine.Workspaces(0)
    Set db = wsdata.OpenDatabase("", False, False, dbconn)
    start = timeGetTime
    Set rs = db.OpenRecordset("Select * from Afdeling", dbOpenDynaset)
    rs.MoveLast
    rs.MoveFirst
    rs.Close
    Set rs = Nothing
    MsgBox "Time " & timeGetTime - start
    End Sub
    Is there any setting in the Oracle ODBC, that need to be adjusted ??
    Erling

    Why are you doing a moveLast followed by a moveFirst? That's going to force Oracle to retrieve all the records in the recordset. If there are a lot of records, you'll probably see a benefit if you increase the prefetch in the Oracle ODBC DSN configuration.
    Justin

  • 08004:[oracle][odbc][ora]ora-12154: TNS: could not resolve the connect ....

    This error has just recently started happening, and i cannot figure out why, i have not changed anything in tnsnames.ora file.
    i am always able to "test connection" in ODBC. even when i get the error in crystal.
    so i restart Crystal, and i am able to connect to db.
    strange thing is that always when i do a tnsping to db i always get the message :-
    TNS-12541: TNS:no listener
    Any ideas ?

    Re: 08004:[oracle][odbc][ora]ora-12154: TNS: could not resolve the connect ....  
    Posted: Aug 22, 2011 5:56 PM     in response to: John Fleming          
         Edit                          Reply
    I am receiving a similar error.
    Failed to open the connection.
    Details: 08004:[Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified [Database Vendor Code: 12154]
    I've seen all sorts of discussion on the intertubes about possible fixes however, none stated are practical or they do not address my error specifically. I've exhausted resources on the net as well as those available to me.
    I'm currently running SAP Crystal Reports 2011 on WIN7 64bit and using Oracle in OraClient 10g_home1.
    Please let me know what insight you have. I cannot roll back to previous versions of Windows nor less encryption.
    Thank you for your time.

  • Can I make Oracle/Microsoft Odbc connection without TNS service???

    Hi All,
    I want to make ADODB connection to oracle 10g database. For this currently I am using odbc connection, which requires TNS service setup in my pc. Hence I need to install Oracle client on my pc as well. Which requires license.
    So is there any alternative, with which I can make my ADODB connection without TNS service implementation. Or any inputs on this will do for me. Only the thing is i need some freeware with which i can do this.
    Thnx,
    kc

    Hi,
    Well I think you might have landed in the wrong forum.
    This forum is for the Oracle Call Interface (OCI) which is a C programming interface to Oracle.
    Your question doesn't look to be about that unless I am misreading it.
    Perhaps you are looking for the Oracle Data Access Components (ODAC) downloads?
    These include client software in addition to the various data access components on Windows.
    ODAC is located here:
    http://www.oracle.com/technetwork/developer-tools/visual-studio/downloads/index.html
    Regards,
    Mark

  • Oracle 9i DB ODBC Connectivity Problem

    i have oracle 9i release 9.0.1.0.1 and i want to use the oracle 9i DB in my VB Appplication how can i connect to the DB and what driver should i use.

    You will need to install the Oracle client on whatever machine(s) your application will be running on. The Oracle client will include a version of the Oracle ODBC driver. You can download an updated version from OTN, you just need to make sure that you match the version of the driver and the version of the Oracle client, i.e. the 9.2.0.x Oracle ODBC driver should be used on a 9.2 Oracle client, the 9.0.1.x Oracle ODBC driver should be used on a 9.0.1 Oracle client.
    Realistically, it doesn't matter much which version of the Oracle client you use. All else being equal, I would probably install the 9.2 Oracle client, but if other versions of the client are already installed, I wouldn't sweat it too much.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Excel-2007 cannot connect to Oracle ODBC data source, Control Panel can.

    <p>
    I cannot make an ODBC connection from Exce-2007 to Oracle work. I am an expert Excel and VBA user (since 1994) and I have frequently used Excel to access ODBC databases, including Oracle (I have done this with Excel-2003 both with worksheet queries and have written VBA ADO-connection routines). And even though in Excel-2007 a worksheet ODBC query is supposed to be easier to create than in previous version of Excel, my connection fails. Any suggestions and all help are welcome and much appreciated.
    DETAILS
    </p>
    <p>
    1) <strong>What is my system?</strong> I am using Excel-2007 on Windows Vista x64 and Oracle server v.11g on my computer (all this is on my computer, no network issues).
    2)<strong> Why use Excel with Oracle at all?</strong> I use Excel-2007 to access Oracle rather than Access-2007 (or any other application like TOAD, etc.) because I do engineering calculations with the data stored in Oracle. These calculations are easier done in Excel (I suppose that one alternative to this could be to use some sql or Access to get the data from the database, then store it as plain vanilla CSV file, then open this file in Excel, then do the math (the math involves complex optimisation algorithms), then save the results as CSV, then use some sql or Access to put the data back into the database. Howwever this does not strike me as a quick or neat solution. And after all Excel has been designed to access ODBC databases, so why not use it?)
    3) <strong>What do I do in Excel-2007 that won't work?</strong> I create an ODBC link to Oracle that does not work. In Excel-2007 this is straightforward:
    </p>
    <ul>
         <li>define an ODBC connection (Data tab --&gt; From other sources --&gt; From data connection wizard);</li>
         <li>define a query on the worksheet -- that's it, this is all!</li>
    </ul>
    <p>
    I start with creating an ODBC connection:
    a) I choose an ODBC data source type: <strong><em>ODBC DSN</em></strong>
    b) Excel-2007 displays the list of the available ODBC data sources. I see in it <strong><em>my Oracle database name</em></strong> and I select it.
    c) Excel-2007 displays the Data Link Properties:
    - the "Provider" has a list of the OLE DB drivers with preselected "<strong><em>Microsoft OLE DB Provider for ODBC Drivers</em></strong>". I keep this default selection.
    - the "Connection" tab has a connection string "<strong><em>DSN=&lt;my database name&gt;</em></strong>" which I keep, it also has fields for the <strong><em>user name</em></strong> and the <strong><em>password</em></strong>, which I fill with the correct credentials.
    - Finally there is a button "Test Connection", which when I click produces the following error message:
    <strong><font color="#ff0000">"Test connection failed because of an error in initializing provider.</font></strong><strong><br />
    </strong><strong><font color="#ff0000">Unespecified error"</font></strong><strong>
    </strong>
    4) <strong>Additional food for thought:</strong>
    a) In the above walk-through the only data, which I type, are the user name and password, everything else is selected from lists offered by Excel-2007, hence any possibility of typos being the cause of the problem can safely be discarded.
    b) I can test the ODBC driver in the Control Panel and it shows that it can connect to the Oracle database:
    - in <strong><em>Control Panel --&gt; Admin Tools --&gt; Data Sources (ODBC)</em></strong> on the "User DSN" tab I can see the list of the available ODBC data sources (same list as in Excel-2007, point 3b above) with the name of my database in it;
    - selecting the name of my database from the list of the sources and clicking "Configure" button opens a tab with <strong><em>Data Source Name</em></strong> (same as in Excel-2007), TNS Service Name and User ID. I enter <strong><em>&lt;user name&gt;/&lt;password&gt;</em></strong> and click "Test Connection" button. A message "<strong><em>Connection successful</em></strong>" appears (just for a test I enter <u>incorrect user credentials</u> and "<strong><em>Unable to connect</em></strong>" message appears)
    BOTTOM LINE
    </p>
    <p>
    The procedure for using an ODBC connection from Excel is very simple, in the past I have created and used such connections numerous times with Excel-2003 and earlier on Win-XP and earlier. But now on Excel-2007 and Vista-x64 I cannot make it work.
    Also, testing an ODBC connection driver is really easy and simple to be done in the Control Panel. There testing the same ODBC connection, which fails in Excel-2007, results in success.
    I am frustrated by the simplicity of the problem and yet the persistant error. I have lost now two full days in failed attempts to make the simple procedure work and in searching the internet for answers.
    All help is highly appreciated <img class="emoticon" src="images/emoticons/happy.gif" border="0" alt="" width="16" height="16" />,
    Plamen
    </p>

    Did you find the solution to your problem?
    If not, I think I may know.
    Excel 2007 is a 32-bit application.
    When installing 32-bit applications in a 64-bit environment, the "default" location is:
    C:\Program files (x86)\...
    Excel then launches from this location.
    However, when it connects to Oracle and passes the name of the calling program, Oracle attempts to "interpret" the value of (x86) as if
    the value within the parenthesis are being passed as a reference. Of course, iOracle doesn't find anything, so the result is (),
    and then it cannot return the connection info back to the calling application.
    I corrected it by installing Excel in C:\Program Files\, and once launched from that location, it works the same as on the 32-bit machines.
    However, at my location, they are FORCING Excel to be installed in the(x86) location.
    What I'm trying to discover now is:
    Is it possible to flag Oracle to NOT process the embedded variables?
    Or, is it possible to assign a variable in Oracle such that x86 = "(x86)", so that the end result is viable?
    Have you had any luck with your installation?
    thanks,
    Paul

  • Problem with Oracle ODBC Driver on Windows 7

    Hi,
    Please help with this problem I have with a Windows 7 machine. I have installed Oracle Client 11g on my Windows 7 machine but when I want to create an ODBC Data Source, I cant find any driver for oracle. How can I resolve this issue? I need the data source for an application to work and I cant figure out what is happening. Someone please help!

    There's a dedicated Oracle ODBC forum:
    ODBC
    As this forum deals with connections from Oracle to foreign data stores it would be better to close this thread and post it again in the ODBC forum.

  • Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170:

    Hi all,
    I have an Windows XP OS with SP3.
    I have installed the Oracle 11g server.
    On trying to connect to the ODBC connection, i get the following error message:
    Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170: TNS: Connect timeout occured
    On trying the tnsping,
    TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 09-OCT-2
    011 13:11:05
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    Used parameter files:
    E:\app\Gautam\product\11.1.0\db_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.
    5.207)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))
    TNS-12535: TNS:operation timed out
    On trying to connect with SQL Developer, i get the following error:
    Status: Failure - Test failed: Io Exception: The Network Adapter could not establish the connection
    However i am able to connect to the same using SQL Plus
    Another issue that occurs is that the Oracle Enterprise Manager shows the following error after a while:
    Agent Connection to Instance
    Status Failed
    Details ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)
    The following services are all up during this point of time:
    OracleDBConsoleorcl
    OracleOraDb11g_home1TNSListener
    OracleServiceORCL
    Any help in this regard will be very useful as this is hindering the progress of my work.
    Thanks in advance for the help.
    - Gautam

    841683 wrote:
    Hi,
    I did try and delete my listener.ora and then create a new one..
    That did not solve my issue..
    What are the steps for configuring the listener again.
    Thanks for the response..
    - Gautamno listener.ora file is required.
    just do as below
    lsnrctl start

  • ODBC connection to Oracle 7 will not reset

    We are using Oracle JDBC drivers for all but one of our
    datasources which is an old Oracle 7 database. The ODBC connection
    to this database will not reset when the database is bounced or the
    database server is rebooted. We have to restart the ODBC service to
    reset the connection. Is there another way to do this automatically
    or perhaps another driver out there we can use? We are running
    ColdFusion MX 6.1 Enterprise.

    Wow, I can't believe that you are still using Oracle 7. In
    fact, unless you are on 7.3.4 you aren’t even Y2K compliant.
    Of course, I'm not even sure if there is an upgrade path from 7.x
    to 10g, but I would consider migrating off of 7 to anything else.
    Otherwise, you are going to have more and more compatibility
    problems. In fact, you can no longer even get ODBC drivers from
    Oracle for versions older than 9i.
    Good luck.
    Phil

  • Can't Create the ODBC connection for Oracle 10g

    Hi,
         I am working with Oracle 10g Database Release 2 in windows XP professional. I am trying to create an ODBC connection for oracle but become failure because its generating the following errors:
    system error code 998
    could not locate the setup or translator library
    Please help me how can I solve this problem and create the ODBC connection for oracle 10g database.
    Best Regards,

    mwz wrote:
    I am trying to create an ODBC connection for oracle but become failure because its generating the following errors:
    system error code 998
    could not locate the setup or translator libraryThe symptom described is typical of an incorrect system env PATH setting (used by the data source admin tool), compared to that of the Oracle Home (specifically, path $OH/bin). The odbc driver config routine will search directories listed in PATH variable for necessary libraries (Client dll's). If some library fails to load (from e.g. oraoci*.dll or oraclient10.dll) it will probably error out, as in your case.
    Are you creating the odbc dsn on the databse server host or on some other machine? I.e. are you using the db host as a client or not?

  • Unable to connect SQLState=08004 Oracle ODBC Ora-12154

    Hi Sir/Madam,
    I am Wayne, I need your help to resolve my issue in oracle database 11g.
    1. I installed Oracle 11g Personal Edition, Release 11.2.0.10, 64bits,
    2. Test connection(oracle in oradb11g_home1) is successed in data source, odbc,
    2. Then, I tried to connect this with Visual Basic(Visual Studio 2010), data connections, add connections, .net framework data provider for oracle,
    3. but I received an error message as "Attempt to load Oracle client libraries threw BadImageFormatException."
    4. Then, I download the ODAC(11.2.0.3.0) for 64bits, and installed,
    5. I tried to test the connection, but failed with error message as stated above,
    "Unable to connect SQLState=08004 Oracle ODBC Ora-12154: TNS:could not resolve the connect identifier specified"
    Could you please give me a help on this, do I need to install ODAC for 11g Personal Edition ? Please advice accordingly, thanks.

    Hi;
    Please review:
    https://kr.forums.oracle.com/forums/thread.jspa?threadID=2309520
    http://stackoverflow.com/questions/206055/oracle-ora-12154-tns-could-not-resolve-service-name-error
    Regard
    Helios

  • How to use ODBC connection specified on Linux containing Oracle BI EE 11g on BI Administration?

    I have Oracle BI server (OBIEE 11g) installed on a Linux machine. I want to use a MySQL database running on same machine for reporting. I need to create Subject Area from the MySQL database.
    However, I am having problem creating connection pool from the MySQL database. BI Administration runs only on Windows and I can't see ODBC connections on Linux even when I opened BI from Linux in online mode in BI Administration. I have created ODBC on Windows, but it's giving me a "Failed to perform requested action" when trying to import metadata.
    For the record, everything works fine when everything is installed on Windows.

    check this Setting Up Data Sources on Linux and UNIX

Maybe you are looking for