OraOLEDB.Oracle versus msdaora provider for adParamInputOutput
I'm currently using Microsoft OLE DB for Oracle provided with MDAC2.8 to execute stored procedures in an ASP page. My vbscript procedure contains an adParamInputOutput parameter (see code below - prm pio_session_id). Everything works fine. I pass a value to my SP and get a new value in return. The parameter is declared as in out in my oracle stored procedure
But as soon as I want to use Oracle Provider for OLE DB (9.2.0.4), I get the following error:
OraOLEDB error '80040e14'
ORA-06502: PL/SQL: numeric or value error ORA-06512: at line 1.
When I set the prm direction to adParamOutput, everything goes well !!.
Any idea why this behaviour ?
My environment is: Windows server 2003 with IIS6.0 and Oracle 9.2.0.4.
Code:
dim objConnection
dim objCommand
dim connectstring
'Microsoft driver
connectstring = "Provider=msdaora;Persist Security Info=true;User ID=userid;Password=pwd;Data Source=mydatasource"
'Oracle driver
connectstring = "Provider=OraOLEDB.Oracle;Persist Security Info=true;User ID=userid;Password=pwd;Data Source=mydatasource"
set ObjConnection = Server.CreateObject("ADODB.Connection")
ObjConnection.ConnectionString = connectstring
ObjConnection.CursorLocation = adUseClient
ObjConnection.ConnectionTimeout = 30
ObjConnection.Errors.Clear
ObjConnection.Open
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandType = adCmdStoredProc
objCommand.CommandText = "outage$reporting.processReporting"
objCommand.Parameters.Append objCommand.CreateParameter ("RETURN_VALUE", adInteger, adParamReturnValue)
objCommand.Parameters.Append objCommand.CreateParameter ("@user", adVarChar, adParamInput, 6, p_user)
objCommand.Parameters.Append objCommand.CreateParameter ("@report_type", adInteger, adParamInput, , p_report_type)
objCommand.Parameters.Append objCommand.CreateParameter ("@week_start", adVarChar, adParamInput, 10, p_week_start)
objCommand.Parameters.Append objCommand.CreateParameter ("@week_end", adVarChar, adParamInput, 10, p_week_end)
objCommand.Parameters.Append objCommand.CreateParameter ("@lvl", adInteger, adParamInput, , p_lvl)
objCommand.Parameters.Append objCommand.CreateParameter ("@loc", adInteger, adParamInput, , p_loc)
objCommand.Parameters.Append objCommand.CreateParameter ("@agree_type", adInteger, adParamInput, , p_agree_type)
objCommand.Parameters.Append objCommand.CreateParameter ("@edit_seq", adInteger, adParamInput, , p_edit_seq)
objCommand.Parameters.Append objCommand.CreateParameter ("@session_id", adInteger, adParamInputOutput, , pio_session_id)
objCommand.Parameters.Append objCommand.CreateParameter ("@reviewed_data", adInteger, adParamOutput, , po_reviewed_data)
objCommand.Parameters.Append objCommand.CreateParameter ("@err_msg", adVarChar, adParamOutput, 4000)
objCommand.Execute, , adExecuteNoRecords
did you get the solution for the above. If yes plz. let me know the problem what it is? As i am facing the same problem.
Similar Messages
-
Error initializing the Oracle JMS Resource provider for Topics
Getting this error when starting OC4J 9.0.3 standlone on Windows2000.
Resource provider config'd as
<resource-provider class="oracle.jms.OjmsContext" name="ojms">
<description> OJMS/AQ </description>
<property name="datasource" value="jdbc/ProlianceDS"></property>
</resource-provider>
Datasource config'd as
<data-source
class="com.evermind.sql.OrionCMTDataSource"
name="ProlianceDS"
location="jdbc/ProlianceDS"
xa-location="jdbc/xa/ProlianceDS"
ejb-location="jdbc/ProlianceDS"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="proliance"
password="******"
url="jdbc:oracle:thin:@aps67.ere.com:1538:ifstst"
inactivity-timeout="30"
/>
ejb-jar config'd as
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<message-driven>
<description>Proliance Message Driven Bean</description>
<display-name>ProlianceMDB</display-name>
<ejb-name>ProlianceMDB</ejb-name>
<ejb-class>com.lendlease.bll.ProlianceMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-selector>
<method>
<ejb-name>ProlianceMDB</ejb-name>
<method-name>onMessage</method-name>
</method>
</message-selector>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<subscription-durability>Durable</subscription-durability>
</message-driven-destination>
<resource-ref>
<res-ref-name>java:comp/resource/ojms/Topics/PROLIANCE.OUT_AQ</res-ref-name>
<res-type>javax.jms.Topic</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>java:comp/resource/ojms/TopicConnectionFactories/aqTcf</resource-env-ref-name>
<resource-env-ref-type>javax.jms.TopicConnectionFactory</resource-env-ref-type>
</resource-env-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>ProlianceMDB</ejb-name>
<method-name>onMessage</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
orion-ejb-jar config'd as:
<?xml version = '1.0'?>
<!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
<orion-ejb-jar deployment-time="e7f1ce76f6" deployment-version="1.0.2.2">
<enterprise-beans>
<message-driven-deployment
name="ProlianceMDB"
connection-factory-location="java:comp/resource/ojms/TopicConnectionFactories/aqTcf"
destination-location="java:comp/resource/ojms/Topics/PROLIANCE.OUT_AQ"
subscription-name="PROLIANCE_SUBSCRIBER">
</message-driven-deployment>
</enterprise-beans>
</orion-ejb-jar>
Full startup trace is:
C:\ora\oc4j_9.0.3\j2ee\home>java -Djdbc.connection.debug=true -jar oc4j.jar
Node started with id=-2143203582
Auto-unpacking C:\ora\oc4j_9.0.3\j2ee\home\applications\ProlianceMDB.ear... done.
Auto-unpacking C:\ora\oc4j_9.0.3\j2ee\home\applications\ProlianceMDB\ProlianceMDB.war... done.
Auto-deploying ProlianceMDB (New server version detected)...
Copying default deployment descriptor from archive at C:\ora\oc4j_9.0.3\j2ee\home\applications\ProlianceMDB/ProlianceMDB
.jar/META-INF/orion-ejb-jar.xml to deployment directory C:\ora\oc4j_9.0.3\j2ee\home\application-deployments\ProlianceMDB
\ProlianceMDB.jar...
Auto-deploying ProlianceMDB.jar (New server version detected)... done.
Error initializing the Oracle JMS Resource provider for Topics: Not an OracleConnection
Error deploying file:/C:/ora/oc4j_9.0.3/j2ee/home/applications/ProlianceMDB/ProlianceMDB.jar homes: No javax.jms.Destina
tion found at the specified destination-location (java:comp/resource/ojms/Topics/PROLIANCE.OUT_AQ) for MessageDrivenBean
ProlianceMDB
OrionCMTConnection not closed, check your code!
Logical connection not closed, check your code!
Created at:
java.lang.Throwable: OrionCMTConnection created
at com.evermind.sql.OrionCMTConnection.<init>(OrionCMTConnection.java:42)
at com.evermind.sql.OrionCMTDataSource.getConnection(OrionCMTDataSource.java:82)
at oracle.jms.AQjmsConnection.newDBConnection(AQjmsConnection.java:1681)
at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:537)
at oracle.jms.AQjmsTopicConnectionFactory.createTopicConnection(AQjmsTopicConnectionFactory.java:232)
at oracle.jms.OjmsResource.initT(OjmsResource.java:512)
at oracle.jms.OjmsResource.initAQ(OjmsResource.java:411)
at oracle.jms.OjmsResource.init(OjmsResource.java:214)
at oracle.jms.OjmsContextFactory.getObjectInstance(OjmsContextFactory.java:103)
at oracle.jms.OjmsContext.getResource(OjmsContext.java:328)
at com.evermind.server.Application.lookupResource(Application.java:2548)
at com.evermind.server.Application.lookupResource(Application.java:2563)
at com.evermind.server.ApplicationContext.handleResourceLookup(ApplicationContext.java:639)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:162)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:66)
at com.evermind.server.ejb.MessageDrivenHome.<init>(MessageDrivenHome.java:236)
at com.evermind.server.ejb.EJBPackageDeployment.bindHomes(EJBPackageDeployment.java:304)
at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:595)
at com.evermind.server.Application.postInit(Application.java:431)
at com.evermind.server.Application.setConfig(Application.java:136)
at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1635)
at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1585)
at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1240)
at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
at java.lang.Thread.run(Thread.java:484)
Auto-deploying ProlianceMDB Poster (New server version detected)...
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
Using native aqapi.jar with OC4J -didn't copy from 9.2.0.2 DB. 9.2.0.2 patchset ran fully, completed fine. What's going wrong?
BrianShouldn't I be getting a com.evermind.sql.OrclCMTConnection created instead of a com.evermind.sql.OrionCMTConnection (per the stack trace)? OJMS is complaining that it doesn't have an OracleCOnnection but how do I tell it to use the "OrclCMTConnection" class instead?
Brian -
How to install the Oracle Applications Framework Provider for Portal10g?
I am trying to intergrate Portal10g 10.4.1 with EBS 11i.5.10 and all the step required list in metalink document was done.
However,the Oracle Applications Framework Provider is not show if i view the Portlet Repostiory after refreshing it.
I guess that this problem is caused by missing something to install.
Can anyone give me any suggestion about how to solve that?
Very appreciate for any comments.Hi Tim
I Meant to say say that doing of inbound interface for apps with xml related data
raghu -
Oracle Application Server Provider for Microsoft Exchange 2003 Error
Hi, i´m trying to install Exchange portlet in my portal. I passed each step of this manual (http://www.oracle.com/technology/products/ias/portal/point/exchange2003/installation.html), but I get an error in the following step:
6. Test the ASP page access to the sample Exchange 2003 mailbox
When I try to access the .asp through the internet explorer I get this error:
Tipo de error:
Objeto Server, ASP 0177 (0x800401F3)
Cadena clase no válida
/exchange/test.asp, línea 13
The asp code is:
<%
Option Explicit
Dim objLogon
Dim objSession
Dim sUser
Dim sDomain
Dim sPassword
Dim sMailBox
Dim sExchangeServer
Dim lngToken
Dim msgCount
'RETRIEVE EXCHANGE CREDENTIALS FROM REQUEST
sMailBox = Request.QueryString("MBox")
sExchangeServer = Request.QueryString("ExServer")
sUser = Request.QueryString("UName")
sDomain = Request.QueryString("UDomain")
sPassword = Request.QueryString("UPwd")
If Len(Trim(sPassword)) = 0 Or Len(Trim(sMailBox)) = 0 Or _
Len(Trim(sExchangeServer)) = 0 Or Len(Trim(sUser)) = 0 Or _
Len(Trim(sDomain)) = 0 Then
Response.write "ERROR"
Else
Set objLogon = Server.CreateObject("LoginAdmin.ImpersonateUser")
lngToken = objLogon.ImpersonateToken(sUser, sPassword, sDomain)
If lngToken = 0 Then
Response.write "ERROR"
Else
Set objSession = server.CreateObject("MAPI.Session")
objSession.Logon ,,,,,,sExchangeServer & vblf & sMailBox
msgCount = objSession.Inbox.Messages.Count
'SUCCESSFUL AUTHENTICATION
Response.write "VALID"
objSession.Logoff
Set objSession = Nothing
End If
objLogon.Logoff
Set objLogon = Nothing
End If
%>
Thanks for your help,
Regards.Hello Chino,
Have a look here
Collaboration Portlets: calendar, task, email, contact
Thanks
Neeraj Sidhaye -
Oracle OLE DB Provider for 8.0.5
Does anyone know where I can find Oracle's OLE DB Provider that is compatible with 8.0.5 ?
We are converting the front-end of an application to ASP, and the Microsoft driver doesn't allow PL/SQL functions to be executed directly, which will cause a major headache as this is how most of the back-end is written!
Any help much appreciated,
GKey here is multiple Oracle homes. You can install different Oracle versions in different Oracle homes and use a particular Oracle home based on your application requirement. You should not install 8i client in a 8.0.x Oracle home. Please refer to Oracle documentation on multiple Oracle homes feature.
-
Access Oracle from SQL Server using Oracle Provider for OLE DB
Using
- SQL Server 2000 SP4
- Oracle 10g
- Oracle10g Provider for OLE DB Version 10.1.0.4.0
- Oracle 10g client
Able to create linked server in SQL server to Oracle 10g and display list of tables in Oracle. However, when execute query, it gives
Server: Msg 7320, Level 16, State 2, Line 1
Could not execute query against OLE DB provider 'OraOLEDB.Oracle'.
OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' ICommandText::Execute returned 0x80040155].
Any idea what is the problem ?I'm having the same error message...But I'm connecting to a Oracle 8i DB......
I think this has to do with SP4 for SQL....I will test this tonight.... -
OraOLEDB.Oracle.1 provider
I am using OraOLEDB.Oracle.1 data provider with the oledb .net objects. I am able to connect and select/save data. However, I'm having problems retrieving metadata from the table...specifically the primary key. Here's the code I am using:
OleDbDataAdapter obj_Adapter = new OleDbDataAdapter();
obj_Adapter.SelectCommand = new OleDbCommand("SELECT * FROM TABLE");
obj_Adapter.SelectCommand.Connection = pvtobj_DC;
obj_Adapter.Fill(obj_Dataset);
obj_Adapter.FillSchema( obj_Dataset.Tables[0], SchemaType.Source );
DataColumn[] pkey = obj_Dataset.Tables[0].PrimaryKey;
I was able to retrieve the primary key definition using this provider with Borland C++. Is this a .NET problem? I need to use the oledb objects for .net because the application must connect to other kinds of databases. Should I be using a different provider?
Thank you in advance!
PaulaThis issue still exists with Oracle Data Access Components (ODAC) for Windows Release 10.2.0.2.21; May 2007.
Anyone there that can help?
My exact error message is "Dynamic SQL generation is not supported against a
SelectCommand that does not return any base table information" -
Unable to download ORACLE OLE DB provider 8.1.7.3
I can not connect to web18-115.us.oracle.com to download the oracle ole db provider for 8.1.7.3.
Is this down?
I need this ASAP.oh ... I forgot to say ..
when I run query under Enterprise Manager as
select * from Openquery (db, 'select * from table')
then it will show me a pop-up message
"Query Designer encountered a MS Design Tools error:
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'OraOLEDB.Oracle' reported an error.
[Microsoft][ODBC SQL server Driver][SQL Server][OLE/DB provider returned message: ORA-12545: Connect failed because target host or object does not exist]
And I follow support.microsoft.com/support/complus/mtsandoracle.asp?SD=GN&LN=EN-US&gssnb=1,setting as follow
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI]
"OracleXaLib"="oraclient8.dll"
"OracleSqlLib"="orasql8.dll"
"OracleOciLib"="oci.dll" -
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. -
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 SchmidI 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 -
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,
MilanSorry 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. -
Msdaora.1 microsoft provider for oracle
I have on my PC Personal Oracle 8.1.6 on Win2000 Pro with SP2.
On my apllication in Visual Basic 6.0 i make an ADO connection using Microsoft Provider for Oracle but the connection Fail.
If i use Oracle provider for OLEDB is Ok!.
My application must use MSDAORA.1, why it not work correctly???
Anyone can help me????
All software oracle work correctly, SQL Plus, ODBC Test, Schema Manager, etc.
byeIn the first case, maybe I'm missing something, but what is "the above error" thrown by the Oracle driver?
in the second case, are you saying that the third column of the resultset is NULL? That there is no third column? Or something else?
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
OLE DB provider 'OraOLEDB.Oracle' reported an error The provider did not gi
Hi, I've setup oracle client tools on a windows server that runs sql server 7
tnsping works as well as the client tool test feature on my sid.
However, I can't seem to use it from SQL Server. I've installed and uninstalled the client tools many times, I'm beginning to think perhaps I installed the wrong package. Weird thing is there is no Listener listed in Windows Services, yet the listener I setup is working.
I enabled the allow in process property of both the MSADAORA and Oracle OLE drivers from SQL Server, help!!
SELECT * FROM OPENQUERY(ORACLE_MIRROR, 'select count(1) from dual')
RESULTS IN:
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: ].
THIS IS AFTER I HAVE INSTALLED THE ORACLE 10.2 CLIENT TOOLS AND SETUP A LISTENER AND TESTED SIDS OK.
UTILIZING THE ORACLE OLE DRIVER IN THE LINKED SERVER I GET THIS ERROR:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'OraOLEDB.Oracle' reported an error. The provider did not give any information about the error.
OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the eThe MS OLEDB for Oracle was built some time ago and requires an older SQL*Net version:
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.
=> see Oracle Version V7.3.3 ... but you have installed V10; so the OLEDB driver from MS tries to locate old SQL*Net client library files which are not available in your installation anymore.
So best would be to use the Oracle OLEDB driver coming with the SQL*Net client you have installed.
As you mentioned this causes a different error:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'OraOLEDB.Oracle' reported an error. The provider did not give any information about the error.
OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the e
This error is related to the OLEDB process running by default in "out-of-process" mode which doesn't work with Oracle OLEDB driver. By setting a key in the registry under SQL Server this can be changed to run in-process (the default) the provider will work:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers\ORAOLEDB.ORACLE
Change the value of the key "AllowInProcess" under the "OraOLEDB.Oracle" folder
to a hexadeciaml value of 1.
If the key does not exist create it as a new DWORD value.
See also:
Article-ID: Note 260775.1
Title: ORA-12560 Attempting to Query the Oracle Database from
Microsoft SQL Server's SQL Query Analyzer Using the Oracle
Provider for OLE DB -
How to create a DSN for Oracle Provider for OLE DB in a web server
Dear Guys,
I am a Excel VBA developer.
My requirement is from the Excel I have to call a Stored Procedure with REF CURSOR.
Normally I am using Microsoft ODBC for Oracle Driver for connecting Oracle DB, which is in the Server .
We have users using the Excel reports across the globe.
Sending Excel report is enough, the clients can connect DB from Excel via the DSN created in a web server.
But, I came to know that we can't access the REF CURSOR using Microsoft ODBC for Oracle Driver and it is possible to access by using ORA OLE DB Provider.
I have installed Oracle Client in my machine and tried using ORA OLE DB Provider like below
+con.ConnectionString = "Provider=OraOLEDB.Oracle.1;User ID=user_name;" & _+
+"Password=pwd;Data Source=Oracle;"+
The Excel worked fine in my machine but when I run the same Excel in my user machine in a different country I couldn't connect to DB.
Because the user machine doesn't have Oracle Client installed. We have n number of users across the world and we can't install Oracle client individually.
So, I have the plan of creating a DSN in a web sever as I used for Microsoft ODBC for Oracle Driver.
But, my doubt is how can I create a DSN for accessing ORA OLE DB provider? Is there any driver for ORA OLE DB provider? or is there any alternate solution for my issue?
Can anybody help me on this ASAP?
Thanks & Regards,
SatzI have created a DSN in a web server (a Public IP machine) that is mapped to a Oracle DB.
In my Excel using VBA coding, with the help of RDO object I will call the DSN in the Web server using the connection string like "DSN=ORS;UID=SDATA;PWD=SDATA;"
This is working fine and in this case the client machine doesn't need Oracle client to be installed or any TNS entry.
The user can run the Excel report by clicking a button and the click event connects the DSN in the web server (through its URL) and routes to the mapped DB and fetches the quried data.
Please note that the above DSN is created based on Microsoft ODBC for Oracle driver.
But the issue is using the Microsoft ODBC for Oracle driver I couldnt call the SP with Ref Cursor.
When I searched in Internet I came to know using the provider oraoledb.oracle we can call SP that uses REF CURSOR.
Now my question is what is the driver name that I can use to create a DSN to make use of the provider oraoledb.oracle for calling the SP with REF CURSOR from Excel VBA coding ?
Appreciate your prompt reply.
Thanks & Regards,
Sathish -
Ms sql server linked server with OraOLEDB.Oracle provider session handling
Hi everyone!!
Here's my situation:
I have a MS SQL Server 2008 R2 with a linked server to Oracle via OraOLEDB.Oracle provider.
I use a .net application to open a connection to my sql-server, execute a select that collects data through the linked-server-connection from the oracle database and after that I close to connection to the sql.
It does work so far,
but when I start my application, exit it proberly and start it again it seems that i get the same session as before (which is for some reasons very bad).
Is that the right/normal behavior?
Is there any way to avoid that?!
How does the OraOLEDB.Oracle provider handle the sessions if used in/as a linked server?
thanks and greetings,
exoc
Edited by: 944414 on Jul 4, 2012 5:43 AMHii Rouann,
Does the error occur when you call the stored procedure from SSIS package and map SSIS variables to the parameters in the stored procedure? Can you run the store procedure from SSMS properly? If you can run the stored procedure from SSMS, the issue seems
to occur due to the date format mismatch between the SSIS variables and the parameters in the stored procedure.
If you cannot run the stored procedure from SSMS as well, the issue should occur due to the incorrect data conversion within the store procedure itself as Tom mentioned.
Regards,
Mike Yin
TechNet Community Support
Maybe you are looking for
-
Javascript that ran in 2.0 no longer works in 2.1
There is some javascript that ran in safari 2.0 (412) that no longers works in 2.1 (419.3). Essentially, it should be a text field that has all of the text inside selected. Below is a simple code example (note: this javascript was generated with VBSc
-
Would like to talk with a live person to help with my reader problems
How do get a phone number for live help? wgn
-
Change Document category of preceding SD document in VBFA
Hi all, is there a fm to change the Document category of preceding SD document in the table VBFA? And also in table VBAP? regards
-
Hi, I am exporting a quicktime file H.264 at 720p but cant seem to render the video. I have read through heaps of forums and have tried the following: -Added black video (from premiere) to the video track 1 for entire length of work bar. - ticked us
-
Adobe CS4 Design Premium Set Up Error
When I try to set up adobe design premium on my mac I get a set up error. I already repaired permissions and clean uninstall everything adobe told me to do, but Its still giving me an error message. I have a screen shot also. Im thinking my hard driv