TSQL to retrieve Oracle linked server records

We're porting an Oracle system to SQL server and it's not going well...
Our system is a data warehouse that extracts data from an Oracle operational system. In the Oracle version we use database links to access Oracle. On SQL Server we've created a linked server. All OK so far.
When we try to access the linked server in TSQL we have problems:
- select on a four part name does not pass filters to Oracle and our tables are huge
- OPENQUERY works fine but won't let us pass parameters
We therefore seem to be stuck when we want to update SQL server using a single keyed access to Oracle (SQL retrieves the whole table and then filters; we're processing 20,000 records and this is not acceptable!)
I would appreciate any help you can give; I've spent most of the day searching the web for examples where people have this working, but got nowhere... help!
Thanks in advance

tnsping search for an alias in tnsnames.ora. under alias definition it takes HOST and PORT values from ADDRESS.
I'm almost sure the problem is with an alias. Your config means that in your clients' network there is and oracle cluster with at least 2 nodes (127.1.2.3 and 127.1.2.4) configured to balance workload or smth.
Do you have network communications set up only to one node or to both? I think the following steps works in both cases, but it won't balance workload nor failover if you have access to both nodes.
Copy your tnsnames.ora somewhere for backup, then clear its content, copy-paste there a template
YourAlias =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = 172.1.2.3)
      (PORT = 1545)
    (CONNECT_DATA =
      (SERVICE_NAME = ServiceNameHere)
and fill it with your alias name, IP address and port (already checked via telnet) and SERVICE_NAME parameter.
If two nodes have different service names, and you don't know each node you connect, try first one, then the second one.
To connect to failover environment you surely need network access to both nodes, but I don't know if its enough - i haven't seen configurations like that.
I did as you instructed and still get TNS-03505: Failed to resolve name.  Does it matter that my TNS Ping is version 12.1.0.1.0, and they are on Oracle 11?  I wouldn't think so but figured I should ask.  Also, is there a way that they could have
disabled tnsping?  They are extremely secure, and lock everything down so maybe that's the problem here.
André

Similar Messages

  • Facing problem in distributed queries over Oracle linked server

    Hi,
    I have a SQL Server 2005 x64 Standard Edition SP3 instance. On the instance, we had distributed (4 part) queries over an Oracle linked server running fine just a few hours back but now they have starting taking too long. They seem to work fine when OPENQUERY
    is used. Now I have a huge number of queries using the same mechanism and is not feasible for me to convert all queries to OPENQUERY, please help in getting this resolved.
    Thanks in advance.

    Hi Ashutosh,
    According to your description, you face performance issues with distributed queries and
    it is not feasible for you to convert all queries to
    OPENQUERY. To improve the performance, you could follow the solutions below:
    1. Make sure that you have a high-speed network between the local server and the linked server.
    2. Use driving_site hint. The driving site hint forces query execution to be done at a different site than the initiating instance. 
    This is done when the remote table is much larger than the local table and you want the work (join, sorting) done remotely to save the back-and-forth network traffic. In the following example, we use the driving_site hint to force the "work"
    to be done on the site where the huge table resides:
    select /*+DRIVING_SITE(h)*/
    ename
    from
    tiny_table t,
    huge_table@remote h
    where
    t.deptno = h.deptno;
    3. Use views. For instance, you could create a view on the remote site referencing the tables and call the remote view via the local view as the following example.
    create view local_cust as select * from cust@remote;
    4. Use procedural code. In some rare occasions it can be more efficient to replace a distributed query by procedural code, such as a PL/SQL procedure or a precompiler program.
    For more information about the process, please refer to the article:
    http://www.dba-oracle.com/t_sql_dblink_performance.htm
    Regards,
    Michelle Li

  • What is oracle Linked Server

    What is Oracle Linked server? is it a part of oracle database administration?please give some brief introduction of Oracle Linked server.
    Edited by: 933618 on 18/05/2012 01:51

    SQL Server Linked Servers feature lets you access Oracle data and data from other OLE DB/ODBc compatible data sources from SQL Server. Here are the basic steps for setting up an Oracle linked server.
    1. Install and Configure the Oracle Client Software
    Oracle client software provides the network libraries required to establish connectivity to an Oracle database system.Download the software from http://www.oracle.com/technology/software/products/database/oracle10g/index.html. Install the software on your SQL Server system and configure it by using Oracle Net Configuration Assistant.
    2. Create the Linked Server
    Create a linked server by using the T-SQL command
    EXEC sp_addlinkedserver
    'OracleLinkedServer', 'Oracle',
    'MSDAORA', 'OracleServer'
    The name of the linked server is Oracle-LinkedServer.The second parameter, product name (Oracle),is optional.The third parameter specifies the OLE DB provider. MSDAORA is the name of the Microsoft OLE DB Provider for Oracle.The final required parameter is the data source name, Oracle Server.
    3. Add Logins for the Linked Server
    Next, provide the SQL Server system with an Oracle login to access the Oracle database by using the sp_addlinkedsrvlogin command
    EXEC sp_addlinkedsrvlogin '
    OracleLinkedServer ', false,
    'SQLuser', 'OracleUser',
    'OraclePwd'

  • Oracle Linked Server problem in SQL Server

    I'm using the MS OLE DB Provider for Oracle in my SQL Server linking an Oracle 9i server to the SQL Server 2000 server. I get the following error when I try to execute a query thru the SQL Server Query Analyzer:
    [OLE/DB Provider 'MSDAORA' IOpenRowset::OpenRowset returned 0x80004005:   ]
    I can however define an ODBC connection and use DTS to get to the Oracle database just fine from the SQL Server machine. I need the linked server query to work though since I'll need it for a new application.
    Any help is very much appreciated.
    Thanks.
    Anja

    I guess I'll answer my own question. I found that the setting SQL Query Analyzer was set to "Implicit Transactions" in the current connection properties. When I turned that off the query ran fine

  • SQL to Oracle Linked Server

    I am trying to create a linked server from SQL2000 to Oracle9i.
    i have done followings:
    Install Oracle9i client on sql server machine.
    Create a tnsname entry for my oracle database.
    Created a linked server using following query:
    exec sp_addlinkedserver 'ORA_HIPPOCRT',
    'Oracle', 'MSDAORA', 'HIPPOCRT'
    exec sp_addlinkedsrvlogin 'ORA_HIPPOCRT',
    false, NULL, 'HR', 'password'
    But when I query the data as follows:
    SELECT * FROM ORA_HIPPOCRT..HR.EMPLOYEES
    I get following errors:
    Server: Msg 7399, Level 16, State 1, Line 1
    OLE DB provider 'MSDAORA' reported an error.
    [OLE/DB provider returned message: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
    Provider is unable to function until these components are installed.]
    OLE DB error trace [OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize returned 0x80004005:   ].
    What I am doing wrong?

    I can get this to work using OPENQUERY() i.e.
    select * from OPENQUERY(andyh, 'select * from TRAINDB.LINKEDSERVERDATATYPETEST')
    To me though this has bodge written all over it.
    Anyone out there with advise for me?
    thanks.

  • Cannot get data of the row from OLE DB provider "OraOLEDB.Oracle" for linked server

    I have created a stored procedure in SQL Server for a report that uses parameters.  In the report I am linking an Oracle table.  I use a subquery like this to query the Oracle table:  (select * from openquery(oracle_linked_server, 'select
    partno, description from oracletable')).  If I run the subquery it works fine every time.  The linked server uses an oracle account which has access to the oracle table.  When I first created the Stored Procedure it worked fine for me.  When
    I test the report, it worked fine.  Then I asked another user to test it and it broke with the below error message.  
    OLE DB provider "OraOLEDB.Oracle" for linked server "XXXX_ORACLE" returned message "ORA-01403: no data found".
    Msg 7346, Level 16, State 2, Procedure usp_report_XXXXXX, Line 15
    Cannot get the data of the row from the OLE DB provider "OraOLEDB.Oracle" for linked server "XXXX_ORACLE".
    Now when I try the report or the stored procedure, I get the same error.  I tested the oracle subquery in the stored procedure and it still works.  The report uses a service account to execute the stored procedure.
    I am using SQL Server 2012 Developer Edition 64 bit (11.0.5058) Management Studio to develop the stored procedure.  The SQL Server I am accessing and running the stored procedure is SQL Server 2008R2 Developer Edition 64bit (10.50.2550).  The user
    that tested the report for me has SQL Server 2008R2 but that shouldn't matter since he is running the report in Internet Explorer.
    What is changing that it works for a while and then stops?
    Fred
    Fred Schmid

    I found the answer.  It was in the query.  I put the TRIM statement on the part# field in the Oracle subquery and took the LTRIM function out of the ON clause that joined my SQL Server table with the Oracle linked server table.  Now everything
    works.  The query looks like this:
    SQL_Server_Table sst
    LEFT OUTER JOIN
    (SELECT * FROM OPENQUERY(OracleLinkedServer, 'SELECT TRIM(partNo) AS partNo, partDesc FROM OracleTable')) ols
    ON sst.partNo = ols.partNo
    Thanks for pointing me in the right direction.
    Fred Schmid

  • Linked Server :: OLE DB provider "OraOLEDB.Oracle" for linked server "ABC" returned message "New transaction cannot enlist in the specified transaction coordinator. ".

    Hello All,
    As mentioned in title, i am stuck up with that articular error from last three days,
    i have following scenario, my SQL server 2008, my oracle 10g are on both same machine with OS Windows Server 2008.
    the following error generated on my management studio when i execute my procedure written in my SQL server. Following is original source code snippet after error massage.
    OLE DB provider "OraOLEDB.Oracle" for linked server "ORCL" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
    Msg 50000, Level 16, State 2, Procedure PROC_MIGRATE_MST_FRM_ORA_SQLSERVER, Line 43
    The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "ORCL" was unable to begin a distributed transaction.
    BEGIN TRY
    -- MIGRATION OF PR_COMPANY_MH START
    BEGIN TRANSACTION T1
    PRINT 'mILAN NNNNNNNNN 11'
    INSERT INTO PROD.PR_COMPANY_MH
    SELECT * FROM OPENQUERY(ORCL, 'SELECT * FROM PR_COMPANY_MH WHERE SQL_FLG = ''N'' ')
    PRINT 'mILAN NNNNNNNNN 12'
    UPDATE OPENQUERY(ORCL, 'SELECT SQL_FLG FROM PR_COMPANY_MH WHERE SQL_FLG = ''N''')
    SET SQL_FLG = 'Y'
    --EXECUTE ('UPDATE PROD.PR_COMPANY_MH SET SQL_FLG = ''Y'' ') AT [ORCL]
    PRINT 'mILAN NNNNNNNNN 13'
    COMMIT TRANSACTION T1
    -- MIGRATION OF PR_COMPANY_MH END
    END TRY
    BEGIN CATCH
    PRINT 'mILAN NNNNNNNNN 14'
    ROLLBACK TRANSACTION T1
    PRINT 'mILAN NNNNNNNNN 15'
    SELECT
    @ErrorNumber = ERROR_NUMBER(),
    @ErrorSeverity = ERROR_SEVERITY(),
    @ErrorState = ERROR_STATE(),
    @ErrorLine = ERROR_LINE(),
    @ErrorProcedure = ISNULL(ERROR_PROCEDURE(), '-');
    PRINT 'mILAN NNNNNNNNN 16'
    SELECT @ErrorMessage = ERROR_MESSAGE();
    RAISERROR (@ErrorMessage, @ErrorSeverity, @ErrorState, @ErrorNumber, @ErrorProcedure)
    PRINT 'mILAN NNNNNNNNN 17'
    END CATCH
    this perticular part is raising that error, and i had tried every configuartion on my local machine related to MS DTC.
    When i remove my transaction code, its work just fine no exception raise, but when i use then i.e. BEGIN TRAN, COMMITE TRAN, AND ROLLBACK TRAN. its giving me error, other wise its fine.
    Please Help or disscus or suggest why my transaction base code is not woking????
    thanks in advance.
    Regards,
    Milan

    Sorry again, I am new on any kind of forum, so i am learning now, following is the error massage generated by SQL Server. and its not
    an architecture problem, i had just included my complete architecture to be more informative while asking for the solution or suggestion. My real problem is T-SQL, i think and its related to Distributed queries raise in SQL Server in Oracle Link Server.
    OLE DB provider "OraOLEDB.Oracle"
    for linked server "ORCL" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
    Msg 50000, Level 16, State 2, Procedure PROC_MIGRATE_MST_FRM_ORA_SQLSERVER,
    Line 43
    The operation could not be performed because OLE
    DB provider "OraOLEDB.Oracle" for linked server "ORCL" was unable to begin a distributed transaction.

  • Execute Oracle procedure via Linked server takes very long

    Exec ('Begin [procedurename]; End;') at OracleLinkedServer
    I used this statement to execute store procedure on Oracle database via linked server. It keeps running and never ends.
    However, if I run this procedure Begin [procedurename]; End; in TOAD, it completes in 10s. 
    This procedure is just simply to merge data between two tables.
    Is there any bug or limit on SQL Server Oracle linked server? I am using SQL SERVER 2012 and Oracle 11g client.

    See if this link helps you
    http://markmal.blogspot.co.il/2008/01/it-is-really-pain-if-you-need-to-call.html
    select * from openquery(MYORADB, '{CALL SCOTT.PROC4MS({resultset 25, OUTPUT})}');
    SELECT * FROM OPENQUERY(<linked server name>, '{CALL <oracle sp>}')
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Error with Linked Server

    I am trying to configure a linked server to connect from MS Sqlserver2000 to Oracle.
    I am using an Oracle 8i client. Following notes on this website and from microsoft I changed
    my registery enteries as follows:
    OracleOciLib oci.dll
    OracleSqllib orasql8.dll
    OracleXalib oraclient.dll
    My odbc connection works when tested thru Oracle Network administation but when I try to look at any tables of the linked server (using MS Enterprise Manager) I get the following error:
    "Error 7399: OLE DB provider 'OraOleDB.Orcle' reported an error"
    This occurs when I use the oracle odbc
    When I use the microsoft odbc connector I get:
    "Error 7399: OLE DB provider 'ContextProvider.MSDAORA.1' reported an error"
    Any ideas.
    Thanks in advance.
    Patrick

    To view tables on an Oracle linked server in Enterprise manager you need to add a security context to use when there is no SQL Server user
    It's on the bottom of the "security" tab on the server properties page.

  • TSQL Retrieve from linked Oracle server

    We're porting an Oracle system to SQL server and it's not going well...
    Our system is a data warehouse that extracts data from an Oracle operational system. In the Oracle version we use database links to access Oracle. On SQL Server we've created a linked server. All OK so far.
    When we try to access the linked server in TSQL we have problems:
    - select on a four part name does not pass filters to Oracle and our tables are huge
    - OPENQUERY works fine but won't let us pass parameters
    We therefore seem to be stuck when we want to update SQL server using a single keyed access to Oracle (SQL retrieves the whole table and then filters; we're processing 20,000 records and this is not acceptable!)
    I would appreciate any help you can give; I've spent most of the day searching the web for examples where people have this working, but got nowhere... help!
    Thanks in advance

    Have you tried configuring Oracle Heterogenous Services/ Transparent Gateway? This would let you link Oracle to SQL Server via a database link which should solve your problem.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com

  • How to create a linked server to SQL in Oracle?

    I am able to create a linked server to Oracle in SQL.. But I do not know the steps to create a linked server too SQL in Oracle.
    How to create a linked server to SQL in Oracle? After creating the linked server to SQL, I would like to create triggers in Oracle DB to insert records into SQL DB.

    There are 2 products in Oracle you can use to link to a MS SQl Server. The first one is for free and it is called Database Gateway for ODBC. With a suitable 3rd party ODBC driver you can connect to any foreign database. The second gateway is our commercial gateway and it is called Oracle Database Gateway for MS SQL Server. It is designed for MS SQl Server connections and more powerful then Dg4ODBC. It know how to map a lot of Oracle functions to SQL Server equivalents and you can also use it to directly call SQL Server procedures or functions. This dedicated SQL server gateway is also able to participate in distributed transactions.
    But again, this is a commercial gateway and you have to purchase a license for that second gateway, the Database Gateway for MS SQl Server.
    - Klaus

  • The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server ...

    Our setup is that we have two databases; a SQL Server 2008 database and an Oracle database (11g). I've got the oracle MTS stuff installed and the Oracle MTS Recovery Service is running. I have DTC configured to allow distributed transactions. All access to the Oracle tables takes place via views in the SQL Server database that go against Oracle tables in the linked server.
    (With regard to DTC config: Checked-> Network DTC Access, Allow Remote Clients, Allow Inbound, Allow Outbound, Mutual Authentication (tried all 3 options), Enable XA Transactions and Enable SNA LU 6.2 Transactions. DTC logs in as NT AUTHORITY\NetworkService)
    Our app is an ASP.NET MVC 4.0 app that calls into a number of WCF services to perform database work. Currently the web app and the WCF service share the same app pool (not sure if it's relevant, but just in case...)
    Some of our services are transactional, others are not.
    Each WCF service that is transactional has the following attribute on its interface:
    [ServiceContract(SessionMode=SessionMode.Required)]
    and the following attribute on the method signatures in the interface:
    [TransactionFlow(TransactionFlowOption.Allowed)]
    and the following attribute on every method implementations:
    [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)]
    In my data access layer, all the transactional methods are set up as follows:
    using (IDbConnection conn = DbTools.GetConnection(_configStr, _connStr))
    using (IDbCommand cmd = DbTools.GetCommand(conn, "SET XACT_ABORT ON"))
    cmd.ExecuteNonQuery();
    using (IDbCommand cmd = DbTools.GetCommand(conn, sql))
    ... Perform actual database work ...
    Services that are transactional call transactional DAL code. The idea was to keep the stuff that needs to be transactional (a few cases) separate from the stuff that doesn't need to be transactional (~95% of the cases).
    There ought not be cases where transactional and non-transactional WCF methods are called from within a transaction (though I haven't verified this and this may be the cause of my problems. I'm not sure, which is part of why I'm asking here.)
    As I mentioned before, in most cases, this all works fine.
    Periodically, and I cannot identify what initiates it, I start getting errors. And once they start, pretty much everything starts failing for a while. Eventually things start working again. Not sure why... This is all in a test environment with a single user.
    Sometimes the error is:
    Unable to start a nested transaction for OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLSERVERNAME". A nested transaction was required because the XACT_ABORT option was set to OFF.
    This message, I'm guessing is happening when I have non-transactional stuff within transactions, as I'm not setting XACT_ABORT in the non-transactional code (that's totally doable, if that will fix my issue).
    Most often, however, the error is this:
    System.Data.SqlClient.SqlException (0x80131904): The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLSERVERNAME" was unable to begin a distributed transaction.
    Now, originally we only had transactions on SQL Server tables and that all worked fine. It wasn't until we added transaction support for some of the Oracle tables that things started failing. I know the Oracle transactions work. And as I said, most of the time, everything is just hunky dorey and then sometimes it starts failing and keeps failing for a while until it decides to stop failing and then it all works again.
    I noticed that our transactions didn't seem to have a DistributedIdentifier set, so I added the EnsureDistributed() method from this blog post: http://www.make-awesome.com/2010/04/forcibly-creating-a-distributed-net-transaction/
    Instead of a hardcoded Guid (which seemed to cause a lot of problems), I have it generating a new Guid for each transaction and that seems to work, but it has not fixed my problem. I'm wondering if the lack of a DistribuedIdentifier is indicative of some other underlying problem. I've never dealt with an environment quite like this before, so I'm not sure what is "normal".
    I've also noticed that the DistributedIdentifier doesn't get passed to WCF. From the client, I have a DistributedIdentifier and a LocalIdentifier in Transaction.Current.TransactionInformation. In the WCF server, however there is only a LocalIdentifier set and it is a different Guid from the client side (which makes sense, but I would have expected the DistributedIdentifier to go across).
    So I changed the wait the code above works and instead, on the WCF side, I call a method that calls Transaction.Current.EnlistDurable() with the DummyEnlistmentNotification class from the link above (though with a unique Guid for each transaction instead of the hardcoded guid in the link). I now havea  DistributedIdentifier on the server-side, but it still doesn't fix the problem.
    It appears that when I'm in the midst of transactions failing, even after I shut down IIS, I'm unable to get the DTC service to shutdown and restart. If I go into Component Services and change the security settings, for example, and hit Apply or OK, after a bit of a wait I get a dialgo that says, "Failed ot restart the MS DTC serivce. Please examine the eventlog for further details."
    In the eventlog I get a series of events:
    1 (from MSDTC): "The MS DTC service is stopping"
    2 (From MSSQL$SQLEXPRESS): "The connection has been lost with Microsoft Distributed Transaction Coordinator (MS DTC). Recovery of any in-doubt distributed transactions
    involving Microsoft Distributed Transaction Coordinator (MS DTC) will begin once the connection is re-established. This is an informational
    message only. No user action is required."
    -- Folowed by these 3 identical messages
    3 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
    4 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
    5 (from MSDTC Client 2): 'MSDTC encountered an error (HR=0x80000171) while attempting to establish a secure connection with system GCOVA38.'
    6 (From MSDTC 2): MSDTC started with the following settings: Security Configuration (OFF = 0 and ON = 1):
    Allow Remote Administrator = 0,
    Network Clients = 1,
    Trasaction Manager Communication:
    Allow Inbound Transactions = 1,
    Allow Outbound Transactions = 1,
    Transaction Internet Protocol (TIP) = 0,
    Enable XA Transactions = 1,
    Enable SNA LU 6.2 Transactions = 1,
    MSDTC Communications Security = Mutual Authentication Required, Account = NT AUTHORITY\NetworkService,
    Firewall Exclusion Detected = 0
    Transaction Bridge Installed = 0
    Filtering Duplicate Events = 1
    This makes me wonder if there's something maybe holding a transaction open somewhere?

    The statement executed from the sql server. (Installed version sql server 2008 64 bit standard edition SP1 and oracle 11g 64 bit client), DTS enabled
    Below is the actual sql statement issued
    SET XACT_ABORT ON
    BEGIN TRAN
    insert into XXX..EUINTGR.UPLOAD_LWP ([ALTID]
              ,[GRANT_FROM],[GRANT_TO],[NO_OF_DAYS],[LEAVENAME],[LEAVEREASON],[FROMHALFTAG]
              ,[TOHALFTAG] ,[UNIT_USER],[UPLOAD_REF_NO],[STATUS],[LOGINID],[AVAILTYPE],[LV_REV_ENTRY])
              values('IS2755','2010-06-01',
    '2010-06-01','.5',     'LWOP'     ,'PERSONAL'     ,'F',     'F',     'EUINTGR',
    '20101',1,1,0,'ENTRY')
    rollback TRAN
    OLE DB provider "ORAOLEDB.ORACLE" for linked server "XXX" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
    Msg 7391, Level 16, State 2, Line 3
    The operation could not be performed because OLE DB provider "ORAOLEDB.ORACLE" for linked server "XXX" was unable to begin a distributed transaction.
    Able to execute the above statement successfully without using transaction.We need to run the statement with transaction.

  • Memory leak issue with link server between SQL Server 2012 and Oracle

    Hi,
    We are trying to use the linked server feature with SQL Server 2012 to connect SQL server and Oracle database. We are concerned about the existing memory leak issue.  For more context please refer to the link.
    http://blogs.msdn.com/b/psssql/archive/2009/09/22/if-you-use-linked-server-queries-you-need-to-read-this.aspx
    The above link talks about the issues with SQL Server versions 2005 and 2008, not sure if this is still the case in 2012.  I could not find any article that talks about if this issue was fixed by Microsoft in later version.
    We know that SQL Server process crashes because of the third-party linked server provider which is loaded inside SQL Server process. If the third-party linked server provider is enabled together with the
    Allow inprocess option, the SQL Server process crashes when this third-party linked server experiences internal problems.
    We wanted to know if this fixed in SQL Server 2012 ?

    So your question is more of a information type or are you really facing OOM issue.
    There can be two things for OOM
    1. There is bug in SQL Server which is causing the issue which might be fixed in 2012
    2. The Linked server provider used to connect to Oracle is not upto date and some patch is missing or more recent version is to be used.  Did you made sure that you are using latest version.
    What is Oracle version you are trying to connect(9i,10g, R2...)
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • SQL 2008 Problem Calling an SP on an Oracle 10G Linked Server

    Hi everyone
    I've read through a number of posts on many sites about this issue but haven't found anything that has helped me so far. The machine I'm using is running Microsoft SQL Server 2008 64bit and the linked server I've created to Oracle 10G is using OraOLEDB.Oracle. If I test the connection in SQL Management Studio it succeeds and for any queries I have using OpenQuery to select from the Oracle DB I have no problem getting results.
    The Oracle 32bit client and 64bit client versions are installed on the machine.
    My problem is that I need to exec an Oracle SP which in turn inserts into various Oracle tables. I previously had this all working fine on 32bit SQL Server 2000 installation connected to Oracle 10G. Using the same code in SQL Server 2008 I get the following error:
    Msg 7357, Level 16, State 2, Line 1
    Cannot process the object "{CALL INTF.INTF_TW_PO_REQ_INTERFACE.MAIN(NULL, 15.000000, 0.000000, 'BLPO0099998', 'BLPO0099998', '', '', 39804, 21883, 'BLPO0099998', 249, 1, 950, 'Main', 190506, 37336, '1', TO_DATE( '20090706','YYYYMMDD' ), TO_DATE( '20090706','YYYYMMDD' ), 'INCOMPLETE',37336, {RESULTSET 1, P_Success})}". The OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE" indicates that either the object has no columns or the current user does not have permissions on that object
    The call is made by the following piece of code in SQL:
    SET @execCmd = N'SELECT
    P_Success
    FROM
    OPENQUERY( ORACLE, '''+ @oracleCmd + ''')';
    EXECUTE (@execCmd);
    Where @oracleCmd = {CALL INTF.INTF_TW_PO_REQ_INTERFACE.MAIN(NULL, 15.000000, 0.000000, ''BLPO0099998'', ''BLPO0099998'', '''', '''', 39804, 21883, ''BLPO0099998'', 249, 1, 950, ''Main'', 190506, 37336, ''1'', TO_DATE( ''20090706'',''YYYYMMDD'' ), TO_DATE( ''20090706'',''YYYYMMDD'' ), ''INCOMPLETE'',37336, {RESULTSET 1, P_Success})}
    I also tried using the below snippet from another post I found and got no joy either.
    declare @result varchar(255)
    exec ('BEGIN
    ?:= your_SP_Name(''arg1'', ''arg2'', etc);
    END;
    ',@result OUTPUT) at your_LinkedServerName;
    select @result;
    OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLE" returned message "ORA-06550: line 3, column 7:
    PLS-00222: no function with name 'INTF_TW_PO_REQ_INTERFACE' exists in this scope
    ORA-06550: line 3, column 1:
    PL/SQL: Statement ignored".
    I can't figure out why it doesn't work in SQL 2008 when it worked fine in SQL 2000 - PLEASE HELP!
    Thank you
    Alida Hope

    Why development on 10g and production on 8i? Either both should be 8i or both should be 10g.
    If you will keep production on 8i and development on 10g then you cannot stop such errors as there are features that are enabled by default in 10g and both the versions have very big differences.
    Just go ahead and install 8i.

  • LINKED SERVER ISSUE on ORACLE DATABASE

    Hi everyone
    I have SQL 2008 R2 Running on Windows server 2003 R2 OS.
    I have created a linked server to ORACLE 11
    I have may jobs running process against this linked server and thy work fine
    But soddenly I receive this error :
    Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "WMS". [SQLSTATE 42000] (Error 7303).  The step failed
    In this scenario the SQL SERVER AGENT Account is the Domain administrator.
    When I restart the Server it begin to work fine again but from time to time I receive again the error mentioned above.
    Have any one pass through this issue?

    Is the network connection to Oracle box stable? Is it inside a firewall?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • Updation not happening once after the material has been extened

    Dear Guru's,                    I want to extend materials from one plant to another plant. I am using BAPI_MATERIAL_SAVEDATA. every thing is doing good but the material was updated in the destination plant. I have used BAPI_TRANSACTION_COMMIT' also.

  • How do i get the screen for pages and numbers to become bigger on my screen

    How do I get the Screen for pages, numbers and quickbooks to become bigger on my screen. The Font is fine for pringing

  • How to Connect Database Using Script?

    Hi all,                 Am using Adobe InDesign CS3. Is there any way to connect database from Adobe InDesign CS3 Scripting (Javascript)? Thanks in advance. Regards, Mohan

  • Tree view in Oracle forms

    Hello experts,                      I am new in oracle forms and i am using oracle forms 11g with weblogic server 10.3.5 at windows7.I have a problem to make a tree item in oracle forms based on two tables. I have 2 tables as: TBL_ARTICAL_MSTR ARTICL

  • Duplicate records returned by db adapter

    Hi, We have a DB Adapter design as following. From a J2EE application, an invoking procedure at the adapter is triggered. This invokes the DB adapter which inturn invokes the implemetned procedure which returns a VARRAY. J2EE application is deployed