OLEDB provider issue

Hi all,
I'm setting up linked server from sql server to oracle. I installed Oracle client 10.2.0.1 on the server, configured ODBC to the Oracle database using OraOLEDB.Oracle provider. Created linked server on sql server, but getting the below error:
SELECT * FROM
testlink..user.table
OLE DB provider "ORAOLEDB.ORACLE" for linked server "TestLink" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".
Msg 7303, Level 16, State 1, Line 2
Cannot initialize the data source object of OLE DB provider "ORAOLEDB.ORACLE" for linked server "TestLink".
tnsping to the oracle database works from the server and the ODBC connection testlink to the oracle database is successful. I tried checking Allow inprocess in the provider option by right clicking linked server properties on the management studio also.. Nothing seemed to work..
Please help.. thanks

Hi,
TNS_ADMIN used in command prompt is somehow ignored (added comment afterwards: mapped drive used in TNS_ADMIN may not be accessable, use UNC path in TNS_ADMIN instead).
Create TNSNAMES entry through Oracle Net Configuration Assistant.
Test Connection on Linked server must work before any SELECT can work.
To use insert from linked server data change provider options:
Allow inprocess = checked
Restart SQL server windows service and try again.
Best regards,
Alex
Edited by: user4580124 on Dec 15, 2010 1:40 PM
Edited by: user4580124 on Nov 15, 2011 2:56 AM

Similar Messages

  • Oracle.Oledb provider returning improper out-put

    Dear All,
    Need your help in below issue.
    I have SSIS package which pull data from Oracle to SQL Server.
    Currently I have used Oracle.Oledb provider for the same, but it is giving me improper result.
    I check on oracle end count for that table was 26000 and when I run the same query through SSIS it shows 0 rows.
    The preview of the query is showing 0 as output.
    but when I tried the same using Microsoft OLEDB provider for Oracle it giving me proper out-put

    Hi Sushant,
    UseSessionFormat - specifies whether to use the default NLS session formats or let OraOLEDB override some of these formats for the duration of the session. Valid values are 0 (FALSE) and 1 (TRUE). The default is FALSE which lets OraOLEDB override some of
    the default NLS session formats. If the value is TRUE, OraOLEDB uses the default NLS session formats.
    Setting UseSessionFormat=true in the connection string will result in the provider using the session format specified by the client install, which should resolve this issue. The following connection string for the connection like below:
    Data Source=DataSourceNameHere;User ID=UserIDHere;Password=PasswordHere;Provider=OraOLEDB.Oracle.1;Persist Security Info=True;UseSessionFormat=True;
    Reference:
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2012/01/20/every-bug-is-a-microsoft-bug-until-proven-otherwise.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Oracle OleDB Provider VS MS OleDB Provider

    I am using Stored Procedures in Oracle Packages and Microsoft ADO for data access.
    My Stored Procedure use a Ref Cursor output parameter to make data available to ADO's recordsets.
    A big difference in network traffic is found between "Microsoft OLEDB Provider for Oracle" and "Oracle OLEDB Provider" (the native driver provided by Oracle).
    The main issue :
    <<Oracle OLEDB Provider>>
    1) A stored procedure is put into an empty package for testing and returning no row, the result is 4KB downstream traffic.
    2) When the SAME stored procedure is put into a large package (a package that already contained 30 other stored procedures, > 1000 lines codes), the result is 70KB downstream traffic for same call that return no row.
    <<Microsoft OLEDB Provider>>
    1) and 2) both use approximately 4KB downstream traffic.
    However, for a query that return large number of rows (~2000 rows), Oracle OLEDB Provider used 143KB but MS OLEDB Provider used 400KB downstream.
    The behaviours for upstream are similar.
    My application is required utilize limited bandwidth, the the strange behaviour of the Oracle OLEDB Provider make my development of "Packaged" Stored Procedures a big problem.
    Does anyone know if there are any tricky on the Oracle OLEDB Provider? Please advice, thanks in advance.
    Regards,
    Jeff

    Sounds like the bug 2597418 that was fixed and released in 9.2.0.2 of Oracle OLEDB Provider

  • Cant connect to Ora8.1.6 db using OLEDB provider for Ora8.1.7 cant find 8.1.6 OLEDB

    Hello,
    I need to connect to an Oracle 8.1.6 Database using OLEDB. Currently, we have one workstation with an ODBC connection and has an OLEDB Provider for Oracle 8.1.6. I can connect to Oracle using OLEDB on this machine (Winnt4 SP4) and see data from the tables. But I need to connect to the same Oracle DB from another workstation (Winnt4 SP6).
    I dowloaded the OLEDB Provider for Oracle8i from the Oracle Website, and on install I observed that this one was for Oracle 8.1.7. I keep getting an error message that it can't resovle the Service Name. I have played with the Net8 Configuration assistant for Oracle8i and the other selection for Oracle8.0 or 7.0. But I keep getting the same error on the NT SP6 machine. I have looked at the tnsnames.ora file on the SP6 machine and the SP4 machine. They are different, and I tried to make the .ora file on the SP6 machine match the .ora file on the SP4 machine but still can't resolve the Service Name. I would be very grateful if someone could help me out - either finding an earlier OLEDB Provider or some configuration trick.
    Many thanks,
    Rich Protzel

    Did you ever get this issue resolved? Do you know where I can get the Oracle Provider for OLE DB for 8.1.6?
    Aaron

  • Can I use the 10402 oledb provider to  connect to an 8i database?

    I have a win2008 x64 server with the oracle 92 client installed, and I installed the 10402 client and oledb provider.
    I need to connect to an 8i database.
    Is this possible? If so, how do I setup my environment to make this work?
    Thanks,
    OracleNewb

    880676 wrote:
    Is it possible that the "ALTER SESSION" error (just when the application try to connect to the database) is due to change of the client? in this case 11?Possible? Sure. We'd need to see the actual error and the actual SQL statement that is being issued, however. It could be any number of things.
    If I have not other option that to use the client Oracle 9.2.0.4 or higher, can I set something in the Oracle 11 instance configuration in order to accept the "ALTER SESSION" sent by the application?
    By the way, there are any "ALTER SESSION" option that was deprecated in Oracle 11 vs Oracle 8?Oracle 8 could mean a bunch of different versions. If you mean, for example, Oracle 8.0.5, there were eleven major releases between Oracle 8.0.5 and Oracle 11.2. You could look through the New Features guides of each major release to look for parameters that were deprecated. But it probably makes more sense to tell us the actual SQL statement that is failing so we can let you know what options you have.
    Justin

  • 10g R2 OLEDB provider

    Hi,
    we have a client side application, on Windows and Oracle 10g R2.
    We use OLEDB templates from MFC (CDynamicParameterAccessor).
    There is a long query (4610 char) what provider return E_UNEXPECTED HRESULT (from execute, before the bind).
    No detailed info from provider (GetErrorRecords() return E_FAIL).
    If I copy this query into SQL* Plus, it run without error.
    There is an almost the same query run successfull, the difference is only in two added order by and alias column.
    recordset properties was:
    stPropSet.AddProperty(DBPROP_BOOKMARKS, true);
    stPropSet.AddProperty(DBPROP_CANSCROLLBACKWARDS, true);
    stPropSet.AddProperty(DBPROP_CANFETCHBACKWARDS, true);
    stPropSet.AddProperty(DBPROP_QUICKRESTART, true);
    stPropSet.AddProperty(DBPROP_ISequentialStream, true);
         stPropSet.AddProperty(DBPROP_IRowsetScroll, true); // IsEmpty uses this interface
    stPropSet.AddProperty(DBPROP_COMMITPRESERVE, true);
    stPropSet.AddProperty(DBPROP_ABORTPRESERVE, true);
    connection string is:
    "Provider=OraOLEDB.Oracle;User ID=user;Password=pw;Data Source=foto1;ChunkSize=4000"
    What can I do for found the problem?
    Regards,
    Imre

    Without knowing whether you're out of memory due to some sort of leak or not it's hard to make a good suggestion. I'd certainly recommend trying the latest 11203 oledb provider/client to rule out any sort of known issue provider leak/malfunction.
    Short of that, if you're really just trying to stuff too much into memory, you might look into the lowering the fetchsize or changing the CacheType setting..
    http://docs.oracle.com/cd/A84870_01/doc/nt.816/a75235/using.htm#1004599
    Hope it helps,
    Greg

  • Udl test not possible to test Oracle OLEDB provider

    Hi,
    I have some issue to connect to my Oracle database.
    My environment is Windows Server 2008 R2, with Oracle server 11G.
    To test my Oracle OLEDB provider, I setup a udl test as described follow:
    1- Creation a file text document on server desktop : test.txt
    2- File extension change to .udl : test.udl
    3- launch of test.udl
    When I launched the test.udl, The Data Link Properties dialog box is not opened. A windows explorer is opened.
    Anybody knows why I am not able to launch the data link properties dialog box in my environment ?
    Thank you for your help
    Regards,
    Sandrine

    Error found... issue resolved.
    Basically got the sld connections tested. This error resulted because the default abap client in CTC was wrongly set.
    Regards.
    Mohamamd

  • Installing OLEDB Provider (10.2.0.3) for use in creating SQL Linked Servers

    I've installed the Oracle OLEDB Provider (version 10.2.0.3) on my SQL Server 2005 box (Windows 2008 64-bit). However, when I reboot the server after install I do not see the OraOLEDB.Oracle provider in my list of providers available to use to create a linked server to the Oracle database.
    Could someone help steer me in the right direction?
    Thanks!!

    Hi,
    This forum is for links from Oracle to non-Oracle databases. For issues with connectivity to Oracle using ODBC/OLEDB it would be better to ask the question in the ODBC forum -
    ODBC
    They have the experience of connections to Oracle and the software involved.
    Regards,
    Mike

  • Append hint + ADO + Oracle OleDB Provider

    Hi everybody!
    This is my first post here in this great forum! ;-)
    I have a problem using Append hint with Oracle OleDB Provider and I've been searching internet for an answer without any luck.
    I'm trying to use Append hint with ADO + Oracle OleDB Provider (OraOLEDB.Oracle.1), like in the SQL below:
    INSERT /*+APPEND*/
    INTO my_table(field1, field2, field3)
    SELECT 0 field1, v.field2, v.field3)
    FROM my_second_table v
    The problem: Oracle is still creting log for this INSERT (It is working like there was no Append hint).
    If I use the same SQL statement with Microsoft Ole DB Provider for Oracle, the Append hint works as expected (log is not created), but doesn't work at all with Oracle DB Provider.
    Trace shows me that the SQL sentence is ok (the append hint is there!).
    I've tried Oracle servers 9.2 and/or 10g, and the problem is the same.
    Question: Does Append hint work with Oracle OleDB Provider? If yes, why it is not working? Something related with connection properties?
    Any help will be much appreciated!
    Thanks in advance.
    Alexandre Machado

    user8010279 wrote:
    Hi Solomon, thanks for you answer.
    Is the same SQL against the same database, with the same program, using ADO + OleDB Provider.
    The table is in NOLOGGING mode.
    When I use Microsoft OleDB Provider for Oracle there is no log creation. Then I disconnect and reconnect to the same server/database, using Oracle OleDB Provider. Then I execute the same SQL and.... there IS log creation, meaning that in that scenario, append hint is being ignored. I can't figure out WHY!!! :-(
    Alexandre,
    I'm not sure what you mean by "there is log creation". In general you need to distinguish between UNDO and REDO generation. A direct-path insert (APPEND hint) doesn't generate undo but still can generate redo, depending on the ARCHIVELOG / FORCE LOGGING mode of the tablespace resp. database and the LOGGING/NOLOGGING attribute of the table.
    Note that in case indexes exist on the table there will always be undo and therefore redo generation for the index maintenance as part of the direct-path insert.
    You should check V$SESSION (SQL_ID in 10g, SQL_ADDRESS + SQL_HASH_VALUE in pre-10g) and V$SQL in the database to double check if the SQL passed by the Oracle OLEDB Provider actually contains the APPEND hint in case the INSERT actually generates UNDO (which is the indicator that shows you if the direct-path insert is used or not). Whether it generates REDO is - as already mentioned - depending on other factors.
    So the question is how have you determined if the direct-path insert mode has been used or not?
    The simplest approach to test if direct-path insert mode is used or not is to issue a query on the object inserted into after the insert before committing the transaction. If it fails with "ORA-12838: cannot read/modify an object after modifying it in parallel" then you successfully inserted using direct-path insert.
    Note that there a number of restrictions that prevent the direct-path insert from happening, in those cases the APPEND hint will be silently ignored, e.g. enabled triggers, foreign keys on the table. A quite comprehensive list of restrictions is listed in the manuals here:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/usingpe.htm#CACEJACE
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to read XML SpreadSheet using OleDb Provider

    Hi All,
    I have generated an xml spreadsheet (*.xls) using XSL. I have another program that reads this spreasheet and processes it.
    Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filnavn + ";" + "Extended Properties=Excel 8.0;"
    Dim objCon As OleDbConnection = New OleDbConnection(sConnectionString)
    objCon.Open()
    Dim objCmdSelect As OleDbCommand = New OleDbCommand("SELECT * FROM [General$]", objCon)
    Dim objAdapater As OleDbDataAdapter = New OleDbDataAdapter()
    objAdapater.SelectCommand = objCmdSelect
    Dim _DSGen As DataSet = New DataSet()
    objAdapater.Fill(_DSGen)
    I m facing an issue while opening a connection to the generated spreadsheet. It says "{"External table is not in the expected format."}".
    My Connection string is
    "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + filnavn + ";" + "Extended Properties=Excel 8.0;"
    Do i need to change anything to this string ? I tried using a dataset and calling dataSet.ReadXml(excelFileName); But the dataset doesnt contain my table. Any inputs on how to read an xml spreadsheet ?
    How to read XML SpreadSheet in OleDb? How to Convert XML SpreadSheet to Microsoft Office Excel Sheet?
    Many Thanks

    Hi,
    You'lll most likely have better luck posting this in a Microsoft forum. This forum deals with issues specific to querying the Oracle database via the Oracle OLEDB provider.
    Cheers,
    Greg

  • SAP BW Multidimensional OLEDB Provider and NOPROMPT option

    Hello
    I'm trying to connect to a SAP system using the SAP BW oleDB provider with this kind of connection string:
    Provider=MDrmSap.2;Data Source=SAP VPN;Password=PASSWORD;User ID=USERID;Location="";Integrated Security=False;Persist Security Info=True;Impersonation Level=Anonymous;Mode=Read;Protection Level=None;Extended Properties="SFC_CLIENT=001;SFC_LANGUAGE=EN";Initial Catalog=$INFOCUBE;Prompt=4
    I use the "Prompt=4" parameter in order to prevent the driver from displaying any window.
    => I get this error:
    Authorization failed.
    I'am sure of the login.
    Moreover, if I remove the Prompt=4 parameter, a login box is displayed, then I just click OK, and the connection succeeds...
    code (C#):
    var conn = new OleDbConnection(theConnectionString);
    conn.Open();
    The currently installed version of SAP gui is
    SAP GUI for Windows 7.20 (Compilation 1)
    the version of mrdrmsap.dll (the "SAP BW DRM OLE DB for OLAP Provider") is 3.8.0.4
    Has anyone already encountered this behaviour please?
    I know this used to work with a previous version of the SAP Client.
    Is it a known problem with this specific version of the SAP client ?
    Thanks in advance for any information,
    Mary.

    Hi Nikee,
    can you make sure the OLAP BAPI component from the SAP Integration Kit is installed on the BusinessObjects server ?
    thanks
    ingo

  • Differences between Oracle OLEDB Provider & Microsoft version

    I am trying to connect to an Oracle database from a SQL Server SSIS package. When I use the Microsoft OLEDB Provider for Oracle (MSDAORA) the connection manager in the package sees a full list of the tables in the Oracle database but when I use Oracle's own OLEDB provider (Oracle.OLEDB.1) I see a much smaller list. I cannot see anything different about the tables that Oracle's Oracle provider fails to see. Has anyone come across this phenomenon before ? Are there some table name characters or data types that the Oracle provider objects to ?

    Not very likely.
    One possible explanation is they query different levels of the datadictionary.
    Sometimes the ALL_ level is queried, sometimes the DBA_ level, sometimes the USER_ level.
    At least you need to ascertain whether you are using the same Oracle account in both drivers. This can also make a difference.
    Anyhow: usually the Oracle driver implements way more functionality compared to the Microsoft driver, so the Oracle driver is to be preferred anyway.
    And probably the Oracle drivers results are correct (one really should use the ALL_ level instead of the DBA_ level).
    Sybrand Bakker
    Senior Oracle DBA

  • Upgrade OLEDB provider

    Hi,
    We found a bug in Oracle OLEDB Provider what released with 11g (R1 or R2) client.
    It give size of text type columns (e.g. nvarchar2) wrongly (double size as it is in character).
    I found that 11.2.0.3 version of it was repaired and free of this bug.
    It is part of ODAC 11.2.0.3, but I can not install it to remain the oracle client properly working.
    Net Manager disappear (freeze with close) when I push 'test' button during create a new net service.
    So my question is:
    how can I upgrade OLEDB provider (e.g. with new ODAC installation) and the client tools (net manager, SQL* Plus)
    remain working?
    In previous versions (as I remember 9i, 10g) it was not problem to install ODAC into the same oracle home.
    I had try to install it into new oracle home, but it result to the same.
    Regards,
    Imre

    You may want to back up your packages, then use a simple text editor to search and replace in your DTSX packages...
    Talk to me now on

  • Oracle OLEDB PRovider with ASP

    hi,
    Can anyone provide me a piece of code which demonstrates how to call an Oracle sp from asp using the Oracle OLEDB provider.
    I would also appreciate if the Oracle package code could be provided too, since with the Provider we have to have a different code for the stored procedure (Ref cursor..??)
    I have been successfully connecting using the Microsoft ODBC Driver, but looks like it has some big time bugs in it which causes our server to hang and a dllhost.exe to consume large amounts of database memory.
    Anybody can help me with that?
    Many Thanks,
    Harshad.

    Harshad,
    Oracle OLEDB samples are available at
    http://otn.oracle.com/sample_code/tech/windows/ole_db/content.html
    URL.
    "Returning multiple recordsets from a stored procedure" sample demonstrates
    how REF cursors are returned from a Stored Procedure (contained in a DB package).
    This sample is a stand alone application and not an ASP program, but the same code
    can be helpful for ASP too.
    Regards
    Jagriti

  • Oracle OLEDB Provider

    Good Afternoon:
    I am having trouble running sql thru VB with the
    Oracle OLEDB provider. The sql runs fine with the
    MSDAORA provider. My error is 'missing right parenthesis'.
    Here is the sql:
    SELECT b.DIVISION_ID KEY, b.PLAN_TYPE PLAN, 900000 FS_CODE,
    SUM (CASE WHEN NOT (d.PHARMACY_NETWORK_CODE IN ('9003','9004','9012') and b.CORPORATION_ID NOT IN ('U120','U180'))
    then a.NET_CHECK_DUE_AMT/c.COMPLETION_FACTOR else 0 end) IN_PAY,
    TRUNC (a.SERVICE_DATE,'YEAR') INCURRED_YEAR, SYSDATE
    From PHARMACY_FACT a, PLAN b, COMPLETION_FACTOR c, PHARMACY_CLAIM_GROUPING d
    Where a.PLAN_KEY = b.PLAN_KEY
    AND a.PHARMACY_CLAIM_GROUPING_KEY = d.PHARMACY_CLAIM_GROUPING_KEY
    AND c.FINANCIAL_SERVICE_SUBGROUP = 900000
    AND c.MONTH_INTERVAL = MONTHS_BETWEEN(TRUNC(TO_DATE('09/30/2003','MM/DD/YYYY'),'month'), TRUNC(a.SERVICE_DATE,'MONTH'))
    AND a.SERVICE_DATE BETWEEN TO_DATE('01/01/2000','MM/DD/YYYY') AND TO_DATE('07/31/2003','MM/DD/YYYY')
    AND a.PAYMENT_DATE BETWEEN TO_DATE('01/01/2000','MM/DD/YYYY') AND TO_DATE('09/20/2003','MM/DD/YYYY')
    AND b.PLAN_NBR NOT IN('R1','V1','V2') AND b.CORPORATION_ID IN('F275', 'P475')
    GROUP BY b.DIVISION_ID, b.PLAN_TYPE, TRUNC(SERVICE_DATE,'YEAR')
    When I comment out the case statement, sql runs.
    I tried putting parens around other parts of the
    statement but to no avail.
    Any help would be greatly appreciated.
    Thanks,
    Mike

    Sounds like the bug 2597418 that was fixed and released in 9.2.0.2 of Oracle OLEDB Provider

Maybe you are looking for