Linked server "LK_SERVER_NAME" was unable to begin a distributed transactio
Hi,
I have two DBs namely MS SQL 2008 and ORACLE 11g. I need to transfer data from MS SQL to ORACLE using the linked server. I did the following,
I have a stored procedure in ORACLE as call_linked_oracle_procedure which needs to be called from the MS SQL server to transfer the data.
So the steps I did to achieve this is provided as a sample as follows,
/* Creating a sample table */
create table source_tab3
id numeric,
name varchar(MAX)
GO
/* Creating a insert trigger for the sample table which calls the oracle through the linked server*/
IF OBJECT_ID ('dbo.source_tab3Trigger','TR') IS NOT NULL
DROP TRIGGER dbo.source_tab3Trigger;
GO
CREATE TRIGGER source_tab3Trigger ON source_tab3
AFTER INSERT
AS
DECLARE @output varchar(600)
EXEC [dbo].[call_linked_oracle_procedure] @parameter1 =N'value1', @parameter2 =N'value2'
select @output
GO
/* Insert a sample data */
insert into source_tab3 (id,name) (1,'vijai');
GO
Now when I insert the data, It give the following error
OLE DB provider "OraOLEDB.Oracle" for linked server "LK_SERVER_NAME" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
Msg 7391, Level 16, State 2, Procedure source_tab3Trigger, Line 11
The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "LK_ORACLE" was unable to begin a distributed transaction.
The things I did to solve this were,
1. Enabled the MSDTC services (Distributed Transaction Coordinator is started ).
2. Enabled the Network DTC access from the control panel, component services to 'Allow InBound' etc.
3. My 'OracleMTSRecoveryService' is running in my services list.
Also, I have done all these where my machine where MS SQL 2008 is installed. Dono what needs to be done in the ORACLE server.
Also to note, that I am able to query the tables/procedure via linked server individually, but not able to do that within the triggers.
Any tip is much appreciated.
regards,
Vijai
Hi,
I made few changes in the SQL trigger code, and it seems to work. But not sure if its the right code. Any way I will leave my findings here, so others might get a tip for their tries,
If anyone know who my code is working, please leave a comment,
IF OBJECT_ID ('dbo.source_tab3Trigger','TR') IS NOT NULL
DROP TRIGGER dbo.source_tab3Trigger;
GO
CREATE TRIGGER source_tab3Trigger ON source_tab3
AFTER INSERT, UPDATE
AS
commit transaction;
set implicit_transactions on
DECLARE @output varchar(600)
DECLARE @p_1 varchar(600) = 'EASYLINK51_EBS_MECH'
DECLARE @p_2 varchar(600) = 'standard'
DECLARE @p_3 varchar(600) = 'EBS'
EXEC [dbo].[call_linked_sys_param] @p_1 =N'EASYLINK51_EBS_MECH', @p_2 =N'standard', @p_3 =N'EBS', @output = @output OUTPUT
select @output
set implicit_transactions off
begin transaction;
GO
regards,
Vijai
Similar Messages
-
Hi,
We are getting below error wile run open query to execute the procedure.
example:-
SELECT * FROM openquery ([PSNSQLN04],'SET FMTONLY OFF;exec [PSNSQLN04]. AltDataHub.dbo
.Report_Attendance_FullTimer_YUM 107,264593,1909,''2015-02-24'',''2015-02-24''')
error:-
Msg 7357, Level 16, State 1, Line 4
Cannot process the object "SET FMTONLY OFF;exec [PSNSQLN04]. AltDataHub.dbo
.Report_Attendance_FullTimer_YUM 107,264593,1909,'2015-02-24','2015-02-24'". The OLE DB provider
"SQLNCLI10" for linked server "PSNSQLN04" indicates that either the object has no columns or the current user
does not have permissions on that object.
SQL detail:-
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1617.0 (X64)
Apr 22 2011 19:23:43
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
I had tried with re-install MSDTC services and Local DTC Properties , security changes but getting the still same error.
Please help if some can help.
Thanks
SubhashHi Subhash,
According to your description, you fail to use OpenQuery function to execute the procedure, and permission is not the cause. Based on my research, the issue could be due to that your procedure Report_Attendance_FullTimer_YUM is used to update,
delete or insert records and the OpenQuery requires a result set to be returned, but UPDATE, delete and INSERT statements that are used with OpenQuery do not return a result set.
You could work around this issue in the following ways:
1. Change the code to the following: execute ('exec AltDataHub.dbo.Report_Attendance_FullTimer_YUM 107,264593,1909,''2015-02-24'',''2015-02-24''') AT PSNSQLN04;
2. Instead of using the procedure Report_Attendance_FullTimer_YUM, you could reference the OpenQuery function as the target table of an INSERT, delete, or UPDATE and use 'update openquery', 'insert openquery', or delete openquery to achieve your goal. For
more information about the process, please refer to the article:
https://msdn.microsoft.com/en-us/library/ms188427.aspx?f=255&MSPPError=-2147217396
Regards,
Michelle Li
Lydia Zhang
TechNet Community Support -
OLE DB provider 'MSDAORA' was unable to begin a distributed transaction
Hello!
I have following problem:
When I create a linked Server in MSSQL-Server 2000 with "Microsoft OLE DB Provider for Oracle" (MSDAORA) to Oracle 9.2i and try to create a transaction, i get following error message:
The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].
I also tried to use the "Oracle Provider for OLE DB", but with this provider i could even not get a connection to the Oracle Server. Error Message:
Error 7302: Could not create an instance of OLE DB provider 'OraOLEDB.Oracle'. OLE DB error trace [Non-interface error: CoCreate of DSO for OraOLEDB.Oracle returned 0x80040154].
Can anybody help me?
(sorry for my bad english)I don't know if this is much help, but I came across this on the MS site:
http://support.microsoft.com/kb/280106
Message 9
Error 7391: The operation could not be performed because the OLE DB provider 'MSDAORA' does not support distributed transactions. OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b]
Verify that the OCI versions are registered correctly as described earlier in this article.
Note If the registry entries are all correct, the MtxOCI.dll file is loaded. If the MtxOCI.dll file is not loaded, you cannot perform distributed transactions against Oracle by using Microsoft OLE DB Provider for Oracle or by using Microsoft ODBC Driver for Oracle. If you are using a third-party provider and you receive Error 7391, verify that the OLE DB provider that you are using supports distributed transactions. If the OLE DB provider does support distributed transactions, verify that the Microsoft Distributed Transaction Coordinator (MSDTC) is running. -
Hi all,
If any one has worked around this error and can help ?
Msg 8522, Level 16, State 3, Line 1
Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction.
I am trying to connect from sql 2012 to 2000 server. Established linked server using native client 10. I am able to see catalogs and database and table. Just when I am trying to query i am getting above error.
any help is really appreciated.
Thanks
Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to TeachHi Logicinisde,
What the new error message do you get after using the workarounds in this
blog? Please post it for analysis.
Besides, as SQL Server 2012 has stopped connecting to SQL Server 2000 via linked servers, personally I recommend you upgrade SQL Server 2000 to a higher version to make your queries or ETLs efficient.
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support -
ORA-00603 by using transactions. Unable to enlist in distributed transactio
I have a test application built with odp.net which does batches of inserts. The program might call a method that inserts 1000 rows ten times. I want all of these to be in one transaction so if I want to rollback I can restart the whole procedure. So I started a transaction and enlisted each connection to use it.
This seems to work OK for a while, but maybe after 5-10 calls to my batch-insert method I receive an ORA-00603 exception. In some rare cases I also get "Unable to enlist connection in distributed transaction."
Can someone help me or shed some light in how to get this to work?
From alert.log:
Incident details in: d:\app\exkatr\diag\rdbms\testdb\testdb\incident\incdir_63768\testdb_ora_8848_i63768.trc
Errors in file d:\app\exkatr\diag\rdbms\testdb\testdb\incident\incdir_63768\testdb_ora_8848_i63768.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [ktcirs:hds], [0x01AF68078], [0x006F10BF0], [0x021728078], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [ktcirs:hds], [0x01AF68078], [0x006F10BF0], [0x021728078], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [ktcirs:hds], [0x01AF68078], [0x006F10BF0], [0x021728078], [], [], [], [], [], [], [], []I tried running tkprof on the trc file but it didn't do anything. The generated file only looks like this:
TKPROF: Release 11.1.0.7.0 - Production on On Jul 21 11:40:37 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: d:\app\exkatr\diag\rdbms\testdb\testdb\incident\incdir_63768\testdb_ora_8848_i63768.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
Trace file: d:\app\exkatr\diag\rdbms\testdb\testdb\incident\incdir_63768\testdb_ora_8848_i63768.trc
Trace file compatibility: 10.01.00
Sort options: default
0 session in tracefile.
0 user SQL statements in trace file.
0 internal SQL statements in trace file.
0 SQL statements in trace file.
0 unique SQL statements in trace file.
7741 lines in trace file.
0 elapsed seconds in trace file.Have a look at Bug 8539335 (or 7510712)
-
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. -
Distributed transaction using linked server not working in SQL Server 2008 64 bit
Hi. I have had an issue trying to get distributed transactions to work in SQL Server 2008 using a linked server. The error message I get is
OLE DB provider "SQLNCLI10" for linked server "pod1" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 3
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "pod1" was unable to begin a distributed transaction.
My Environment:
Windows Server 2008 Enterprise 64 bit, SQL Server 2008 Enterprise 64 bit
Problem occurs with multiple different builds of SQL Server 2008 - I have been able to reproduce the problem with 10.0.1600.0, 10.0.1779.0 (CU 2), as well as 10.0.2531 (SP1)
I am aware that other people have had this issue and have reviewed all existing posts. I have verified that the MSDTC is configured correctly on both machines. I have also used DTCTester to verify that DTC is working correctly on all machines in question.
None of the mentioned resolutions has solved this problem for me.
I am not seeing this problem occur on my 32 bit test machines - it is only occurring if at least one of the two machines is 64 bit.Hi All,
I realise that this topic may be a little bit out-of-date but if someone gets here from some search engine trying to find a solution for DTC problems, this MAY be useful.
So... I recently had the same issue, tried all the approaches described in KB and other articles, but it didn't help. Because my task to solve this was not of the highest priority I forgot about it for some time.
Today I was troubleshooting some other issue and, by accident discovered source of that first problem:
In the EventViewer I found Error entry logged by MSDTC saying:
"The local MS DTC detected that the MS DTC on vm-server1 (other machine name that also runs DTC - my comment) has the same unique identity as the local MS DTC. This means that the two MS DTC will not be able to communicate
with each other. This problem typically occurs if one of the systems were cloned using unsupported cloning tools. MS DTC requires that the systems be cloned using supported cloning tools such as SYSPREP. Running 'msdtc -uninstall' and then 'msdtc -install'
from the command prompt will fix the problem. Note: Running 'msdtc -uninstall' will result in the system losing all MS DTC configuration information."
So I followed suggestion and run:
msdtc -uninstall
msdtc -install
This solved my problems with DTC. Hope it will help someone.
Piotr -
Error in SP while inserting to Linked Server
Hi all
I am trying to execute a SP in transaction notification to insert values from OHEM(Employee Master Data) table to a table at Linked server. while doing so it works when executed at SQL Sever but it triggers the following error inside SAP.
"[Microsoft][SQL Server Native Client 10.0][SQL Server]The operation could not be performed because OLE DB
provider "MSDASQL" for linked server "LINKED SERVER NAME" was unable to begin a distributed transaction. (CINF)"
please help me to solve this issue..
Regards
Naresh KumarHI
INSERT INTO OPENQUERY (TER, 'SELECT emp_code,emp_firstname,emp_lastname,
emp_department,emp_designation,emp_category
emp_mobilenumber,emp_emailid,emp_reportingto,emp_status
FROM expense_report.site_employee_master')
Select employeecode,firstname,lastname,Department,Designation,mobile,EmailID,ReportingTO,Status
from SBO_BATPL.dbo.EMR_EMPLOYEEMASTER E0 where EmployeeCode='@empcode'
this is my query and i use SAP 8.81 Pl:8
regards
Naresh.K
Edited by: nareshcse09 on Dec 26, 2011 12:36 PM -
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. -
Hi,
I have 3 SQL servers, A, B, and C.
i am able to establish a linked server from A to C and C to A
i am able to establish a linked server from B to C and C to B.
but when i try to establish a linked server from A to B, i have been getting this error, i am goin nuts because if there is any problem with A, then even C shud not ne able to connect but its connecting, if theres any problem with B , C shud not connect but its connecting.
C is connecting to both A and B without errors.
Also A is connecting to C and B is connecting to C.
But the problem is between A and B Servers.
when i test the connection from B to A i get this message,
A is SQl 2000, B is 2008, c is 2008.
Pls suggest wat do i do.
Y is there a problem of connection between only A to B and B to A.
While making a linked Server from B to A without using Security, i get the error
The OLE DB provider "SQLNCLI10" for linked server "A" reported an error. Authentication failed.
Cannot initialize the data source object of OLE DB provider "SQLNCLI10" for linked server "A".
OLE DB provider "SQLNCLI10" for linked server "A" returned message "Invalid authorization specification". (.Net SqlClient Data Provider)
when i connect using the sa account i get the folowing error,
VIA Provider: The specified module could not be found.
OLE DB provider "SQLNCLI10" for linked server "A" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "A" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". (.Net SqlClient Data Provider)
Thanks a Ton for any kind a helpMuchas gracias por la ayuda con el problema:
The OLE DB provider "SQLNCLI10" for linked server "A" reported an error. Authentication failed.
Cannot initialize the data source object of OLE DB provider "SQLNCLI10" for linked server "A".
OLE DB provider "SQLNCLI10" for linked server "A" returned message "Invalid authorization specification".
Esto me ayudo a resolverlo:
https://sites.google.com/site/greateindiaclub/software-zones/database-community/sql-server/cannotinitializethedatasourceobjectofoledbprovidersqlncli10forlinkedserver
Pero despues me apareció el siguiente problema:
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "B" was unable to begin a distributed transaction.
OLE DB provider "SQLNCLI10" for linked server "B" returned message "El administrador de transacción ha deshabilitado su soporte para transacciones de red o remotas.".
Y lo resolví con esto:
EXEC sp_serveroption @server = 'ServerB',@optname = 'remote
proc transaction promotion', @optvalue = 'false' ;
Fuente: http://www.sqlservercentral.com/Forums/Topic1102122-146-1.aspx#bm1102224
Saludos...
Desarrollador en .NET -
Inserting data into table through linked server
Hi
I am trying to insert data from a remote database into my database using linked server.
Below is the syntax that I am using
set XACT_ABORT on
INSERT INTO MyTable
EXEC [172.xx.xx.xxx].MyDatabase.dbo.[MyStoredProc] '2014-10-20','2014-10-26'
When I execute the SP (EXEC [172.xx.xx.xxx].MyDatabase.dbo.[MyStoredProc] '2014-10-20','2014-10-26' ) I get the result.
but when I try inserting the data into a table using the above code I get the following error
OLE DB provider "SQLNCLI11" for linked server "172.xx.xx.xxx" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 59
The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "172.xx.xx.xxx" was unable to begin a distributed transaction.
I tried solutions given on
http://stackoverflow.com/questions/7473508/unable-to-begin-a-distributed-transaction
but still i get the issue... I don't know whats wrong.I think you may need to set the remote proc transaction promotion for linked server option to
false.
Please read the articles in below links for more info:
How to Share Data between Stored Procedures - The Challenges of Linked Servers (Erland)
How to insert in table from remote stored procedure without creating a distributed transaction?
Krishnakumar S -
We have created a linked server.We are getting below error when a trigger is executed from the source server.
1)OLE DB provider "SQLNCLI" for linked server "Destination server" returned message "The partner transaction manager has disabled its support for remote/network transactions."
2)Msg 7391, Level 16, State 2, Procedure trgScandetails, Line 21
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "Destination server" was unable to begin a distributed transaction.
3)OLE DB provider "SQLNCLI" for linked server "Destination server" returned message "No transaction is active."
Please help me on this.
Thanks in advance.Using triggers are bad, things like this make it more worse.
I would say that using triggers in general is not bad, but it is a good way to implement validation of business rules which cannot be encoded in constraints, as well various forms of cascading updates. In short, any thing which is needed to uphold database
integrity.
But from this follows that as soon you stray outside the database you are doing something more. Maybe you have distributed your data over more than one database for some reason, and it is still a matter of referential integrity. If the databases are different
applications, it is probably not the correct solution.
And maybe you distributed your databases over several servers for load balancing or whatever. But then at the same time you also increase the complexity of your solution considerably. For instance, what happens if you have a disaster and must restore one
of the databases?
As for the actual question, getting MSDTC to work can be a breeze - and it can be a nightmare. My experience is that if you have a domain and there are no trust or double-hop issues, it works. But if you don't have a domain, but only a workgroup it can
be very difficult. It may work if the service accounts on the machines have the same name and password.
But you should also ask yourself: if the other server is down, what do you want to happen?
Erland Sommarskog, SQL Server MVP, [email protected] -
Linked Server problem on Transaction Usage???
Hi,
I am using SQL Server 2008 R2 and we have a linked server connection to Oracle 11g. We have a table on Oracle thats why we need to do some CRUD operations on both servers. I got this error while trying to update/insert in both servers in a transaction as follows. How can I fix this???
Best Regards.
The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "***" was unable to begin a distributed transaction.
OLE DB provider "OraOLEDB.Oracle" for linked server "***" returned message "New transaction cannot enlist in the specified transaction coordinator. ".
Sample code:
conn.Open()
myTransaction = conn.BeginTransaction()
'This is ORACLE
Dim comm As New Data.SqlClient.SqlCommand("UPDATE [***]..[**].[***] SET ApprovedBy=@approvedBy,ApproveDate=@approvalDate,Approved=@approved, StatusId=@StatusId where RequestID=@requestID", conn)
'Add to Transaction
comm.Transaction = myTransaction
comm.Parameters.AddWithValue("@approvedBy", appBy)
comm.Parameters.AddWithValue("@approvalDate", appDate)
comm.Parameters.AddWithValue("@approved", app)
comm.Parameters.AddWithValue("@StatusId", status)
comm.Parameters.AddWithValue("@requestID", reqId)
comm.ExecuteNonQuery()
'This is SQL Server
Dim comm1 As New Data.SqlClient.SqlCommand("INSERT INTO Table1 (DeliveryNo,VendorId) VALUES(@DeliveryNo,@VendorId)", conn)
'Add to Transaction
comm1.Transaction = myTransaction
comm1.Parameters.AddWithValue("@DeliveryNo", deliveryID)
comm1.Parameters.AddWithValue("@ID", ID)
comm1.ExecuteNonQuery()
'Commit Transactions & Close
myTransaction.Commit()
conn.Close()Open the OUI, click the Installed products button.
You can also infer the info by checking to see if you have "OracleMTSRecoveryService" running in Services, and whether you have oramts.dll in your OH\BIN directory.
Greg -
Hi All,
I am getting below error while inserting into Linked Server (sql2012) thru trigger from sql2008 ....However if i insert the same thru Store Procedure it is inserting successfully....MSDTC service is started on both sql server machines....also both machines
rebooted....but still i am facing this error.
OLE DB provider "SQLNCLI" for linked server "XXX.XXX.XXX.XX" returned message "The partner transaction manager has disabled its support for remote/network transactions.".
Msg 7391, Level 16, State 2, Procedure ins_test, Line 11
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "XXX.XXX.XXX.XX" was unable to begin a distributed transaction.
Could assist to resolve.
Regards
ShehzadHi SHzKhan,
According to your error message, we need to verify if you configure the MSDTC correctly, When you have more than one SQL Server involved in a Distributed Transaction, you need to make some changes to the default configuration of MSDTC for these distributed
transactions to succeed. There is a detail about recommending MSDTC settings for using Distributed Transactions in SQL Server, you can review the following article.
http://support.microsoft.com/kb/2027550/en-us
There is a similar issue about error 7391, you can refer to the following link.
http://dba.stackexchange.com/questions/30235/msg-7391-distributed-transactions-dtc-on-sql-server
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Hello
I have 2 window dedicated server, both are window 2008 R2 with SQL Server.
I created linkserver on both server but when I run delete query than I get this error
OLE DB provider "SQLNCLI10" for linked server "XXX.XX.XXX.XXX" returned message "No transaction is active.".
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "XXX.XX.XXX.XXX" was unable to begin a distributed transaction.
Select Query is working.
FYI :
- Distributed service are run on both server
- I add Distributed Transaction Coordinator in firewall
- I change the setting of Distributed Transaction Coordinator : local DTC : properties on both server
- Change the Server option of Link server (RPC : True , Distributor coordinator : true)
Please solve my problem.Hi Deepshika,
I have followed almost all the the steps below but still error "No transaction is active" appears:
- Distributed service are run on both server
- I add Distributed Transaction Coordinator in firewall
- I change the setting of Distributed Transaction Coordinator : local DTC : properties on both server
- Change the Server option of Link server (RPC : True , Distributor coordinator : true)
Could you let me know what step i am missing.
Regards
Shehzad
Maybe you are looking for
-
DW CS5.5 Keyboard Layout BUG?! Help pls
When I startup DW, and switch keyboard layout in CODE VIEW from eng to rus or from rus to eng all ok, window focus stay on CODE VIEW and I may write code perfectly, but after uses some any Snippet or simply open Snippet panel (SHIFT+F9) and then clos
-
Multiple ipods on a windows xp machine
We have 3 different users on our pc, with 3 different itunes libraries and 3 different ipods (2 nano's & 1 viedo). Every thing has been working fine. My wife was charging her viedo ipod and ejected the unit. I think she then connected my daughters na
-
OS X won't boot but the Windows 7 partition works perfectly?
About two days ago, I switched on my iMac only to find it was creating a very loud fan noise and both the windows partion and OS X Snow leopard were not working, they were both freezing on load up and just generally having prolems. After a couple of
-
Unable to get create_SDA.bat file for custom adapter development.
Hi , I am working on custom adapters development following the PDF(SOA361-how to develop an adapter in SAP Netweaver PI) about using Sample Adapter . In section where we will create the SDA file and deploy it to the J2EE server. The create_SDA.bat f
-
I use a MAC desktop and Thunderbird with latest update. Recently, when I've tried to open an e-mail that I saved earlier as a file with the .eml suffix, what opens is always the same unrelated e-mail that I saved earlier to an unrelated file. It seem