Friday, March 23, 2012
Microsoft JDBC Driver XA Problem
I have applied XA support via the dll and script...but now I got the
following error. Anyone can point me a direction to fix this?
Thanks,
j-
20:44:06 [tyrex.resource.n3-db] [main] [transaction server is recovering] []
[] ERROR - Failed to create connection for default user
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]xa_open (0) returns -3
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sErrorToken(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReplyToken(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.pro cessReplyToken(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReply(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.getNextResultType(Unknown
Source)
at
com.microsoft.jdbc.base.BaseStatement.commonTransi tionToState(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.postImplExec ute(Unknown
Source)
at
com.microsoft.jdbc.base.BasePreparedStatement.post ImplExecute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown
Source)
at
com.microsoft.jdbc.base.BaseStatement.executeUpdat eInternal(Unknown Source)
at
com.microsoft.jdbc.base.BasePreparedStatement.exec uteUpdate(Unknown Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerImplXAResou rce.executeXaRpc(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerImplXAResou rce.executeXaRpc(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerImplXAResou rce.open(Unknown Source)
at com.microsoft.jdbcx.base.BaseXAConnection.<init>(U nknown Source)
at com.microsoft.jdbcx.base.BaseXADataSource.getXACon nection(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerDataSource. getXAConnection(Unknown
Source)
at
tyrex.resource.jdbc.ConnectionPool.createPooledCon nection(ConnectionPool.java:841)
at
tyrex.resource.jdbc.ConnectionPool.completeInit(Co nnectionPool.java:256)
at
tyrex.resource.jdbc.ConnectionPool.<init>(Connecti onPool.java:222)
at
tyrex.resource.jdbc.DataSourceConfig.createResourc e_(DataSourceConfig.java:237)
at
tyrex.resource.ResourceConfig.createResource(Resou rceConfig.java:390)
at tyrex.resource.Resources.getResource(Resources.jav a:235)
at
tyrex.tm.impl.TransactionServerImpl.recover(Transa ctionServerImpl.java:582)
at
com.intalio.n3.common.tyrex.TyrexModule.initialize (TyrexModule.java:130)
at
com.intalio.n3.common.module.ModulesManager.initia lizeModule(ModulesManager.java:373)
at
com.intalio.n3.common.module.ModulesManager.initia lizeAllModules(ModulesManager.java:263)
at com.intalio.n3.Main.start(Main.java:454)
at com.intalio.n3.Main.main(Main.java:239)
20:44:09 [tyrex.resource.n3-db] [main] [null] [] [] ERROR - Failed to create
connection for default user java.sql.SQLException: [Microsoft][SQLServer
2000 Driver for JDBC][SQLServer]xa_open (0) returns -3
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sErrorToken(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReplyToken(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.pro cessReplyToken(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReply(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.getNextResultType(Unknown
Source)
at
com.microsoft.jdbc.base.BaseStatement.commonTransi tionToState(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.postImplExec ute(Unknown
Source)
at
com.microsoft.jdbc.base.BasePreparedStatement.post ImplExecute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown
Source)
at
com.microsoft.jdbc.base.BaseStatement.executeUpdat eInternal(Unknown Source)
at
com.microsoft.jdbc.base.BasePreparedStatement.exec uteUpdate(Unknown Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerImplXAResou rce.executeXaRpc(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerImplXAResou rce.executeXaRpc(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerImplXAResou rce.open(Unknown Source)
at com.microsoft.jdbcx.base.BaseXAConnection.<init>(U nknown Source)
at com.microsoft.jdbcx.base.BaseXADataSource.getXACon nection(Unknown
Source)
at
com.microsoft.jdbcx.sqlserver.SQLServerDataSource. getXAConnection(Unknown
Source)
at
tyrex.resource.jdbc.ConnectionPool.createPooledCon nection(ConnectionPool.java:841)
at
tyrex.resource.jdbc.ConnectionPool.completeInit(Co nnectionPool.java:256)
at
tyrex.resource.jdbc.ConnectionPool.<init>(Connecti onPool.java:222)
at
tyrex.resource.jdbc.DataSourceConfig.createResourc e_(DataSourceConfig.java:237)
at
tyrex.resource.ResourceConfig.createResource(Resou rceConfig.java:390)
at tyrex.resource.Resources.getResource(Resources.jav a:235)
at
tyrex.tm.impl.TransactionServerImpl.recover(Transa ctionServerImpl.java:626)
at
com.intalio.n3.common.tyrex.TyrexModule.initialize (TyrexModule.java:130)
at
com.intalio.n3.common.module.ModulesManager.initia lizeModule(ModulesManager.java:373)
at
com.intalio.n3.common.module.ModulesManager.initia lizeAllModules(ModulesManager.java:263)
at com.intalio.n3.Main.start(Main.java:454)
at com.intalio.n3.Main.main(Main.java:239)
20:44:10 [n3.common.module] [main] [null] [] [] WARN - Failed the initialize
module 'TransactionManager'
20:44:10 [n3.common.module] [main] [null] [] [] FATAL - ModulesManager
tyrex.resource.ResourceException: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]xa_open (0) returns -3
at
tyrex.resource.jdbc.ConnectionPool.<init>(Connecti onPool.java:225)
at
tyrex.resource.jdbc.DataSourceConfig.createResourc e_(DataSourceConfig.java:237)
at
tyrex.resource.ResourceConfig.createResource(Resou rceConfig.java:390)
at tyrex.resource.Resources.getResource(Resources.jav a:235)
at
tyrex.tm.impl.TransactionServerImpl.recover(Transa ctionServerImpl.java:582)
at
com.intalio.n3.common.tyrex.TyrexModule.initialize (TyrexModule.java:130)
at
com.intalio.n3.common.module.ModulesManager.initia lizeModule(ModulesManager.java:373)
at
com.intalio.n3.common.module.ModulesManager.initia lizeAllModules(ModulesManager.java:263)
at com.intalio.n3.Main.start(Main.java:454)
at com.intalio.n3.Main.main(Main.java:239)
Jay Shen wrote:
> Hi,
> I have applied XA support via the dll and script...but now I got the
> following error. Anyone can point me a direction to fix this?
> Thanks,
> j-
> 20:44:06 [tyrex.resource.n3-db] [main] [transaction server is recovering] []
> [] ERROR - Failed to create connection for default user
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC][SQLServer]xa_open (0) returns -3
> at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Hi Jay,
Seems, that you haven't started the DTC (Distributed Transaction
Coordinator) service. This service is installed during the
MS SQL Server 2000 installation but with start type 'manual'.
BTW: which user do you use to connetc to the database ? If you don't
use sa (which would be a good idea) have in mind, that XA recovery is
only allowed for a system administrator. To allow all users to perform
XA recovery, you have to add the EXEC permission to PUBLIC for the
stored procedure xp_jdbc_recover (part of extended stored procedures) in
the master database.
Best,
Manfred
|||Thanks a lot, Manfred.
I did apply the suggestion to grant the rights. But for some reason, I am
still getting the same errors...weird...
"Manfred Rosenboom" <marochess@.gmx.de> wrote in message
news:d3dpcu$d6c$1@.nntp.fujitsu-siemens.com...
> Jay Shen wrote:
> Hi Jay,
> Seems, that you haven't started the DTC (Distributed Transaction
> Coordinator) service. This service is installed during the
> MS SQL Server 2000 installation but with start type 'manual'.
> BTW: which user do you use to connetc to the database ? If you don't
> use sa (which would be a good idea) have in mind, that XA recovery is
> only allowed for a system administrator. To allow all users to perform
> XA recovery, you have to add the EXEC permission to PUBLIC for the stored
> procedure xp_jdbc_recover (part of extended stored procedures) in the
> master database.
> Best,
> Manfred
|||| From: "Jay Shen" <jay_shen@.msn.com>
| References: <eGLZClkPFHA.248@.TK2MSFTNGP15.phx.gbl>
<d3dpcu$d6c$1@.nntp.fujitsu-siemens.com>
| Subject: Re: Microsoft JDBC Driver XA Problem
| Date: Mon, 11 Apr 2005 14:13:59 -0700
| Lines: 38
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Response
| Message-ID: <eTZJittPFHA.4004@.TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| NNTP-Posting-Host: adsl-67-113-30-33.snfc21.pacbell.net 67.113.30.33
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.jdbcdriver:1029
| X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
|
| Thanks a lot, Manfred.
|
| I did apply the suggestion to grant the rights. But for some reason, I am
| still getting the same errors...weird...
|
| "Manfred Rosenboom" <marochess@.gmx.de> wrote in message
| news:d3dpcu$d6c$1@.nntp.fujitsu-siemens.com...
| > Jay Shen wrote:
| >> Hi,
| >>
| >> I have applied XA support via the dll and script...but now I got the
| >> following error. Anyone can point me a direction to fix this?
| >> Thanks,
| >>
| >> j-
| >>
| >> 20:44:06 [tyrex.resource.n3-db] [main] [transaction server is
recovering]
| >> [] [] ERROR - Failed to create connection for default user
| >> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
| >> JDBC][SQLServer]xa_open (0) returns -3
| >> at
com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
| > Hi Jay,
| >
| > Seems, that you haven't started the DTC (Distributed Transaction
| > Coordinator) service. This service is installed during the
| > MS SQL Server 2000 installation but with start type 'manual'.
| >
| > BTW: which user do you use to connetc to the database ? If you don't
| > use sa (which would be a good idea) have in mind, that XA recovery is
| > only allowed for a system administrator. To allow all users to perform
| > XA recovery, you have to add the EXEC permission to PUBLIC for the
stored
| > procedure xp_jdbc_recover (part of extended stored procedures) in the
| > master database.
| >
| > Best,
| > Manfred
|
|
|
Are you using the sqljdbc.dll and driver .jar files that come with JDBC
SP3? Did you test with the actual SA account and see the same problem?
You can capture a SQL Profiler trace (with all Errors and Warnings events
and all data columns) and see if you are truly getting a permissions issue
on the execution of the extended stored procedures.
Aside from that, ensure that MSDTC is started and that XA is enabled.
Check the registry key HKLM\Software\Microsoft\MSDTC\Security. The Value
name is XATransactions, and it is a REG_DWORD value. A value of 0 means XA
transactions are disabled. A non-zero value means they are enabled. If
you have to change this from 0 to 1, restart the SQL Server service and
MSDTC service.
If the above information does not resolve the issue, post the Java code and
table definition that you use to reproduce the problem.
Carb Simien, MCSE MCDBA MCAD
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Wednesday, March 21, 2012
Microsoft Data Link Error
A test installation script I ran on my dev rig seems to have broken the OLE DB Provider for Sql Server. The uninstall must have deleted a DLL or unregistered a lib. When I try to connect to a SQL database from this machine now get the following error:
==
Microsoft Data Link Error
Test connection failed because of an error in initializing provider. Unspecified error.
==
It is not the connection string because this was working fine prior to me running the test installation script.
Can you give advice on how to repair the SQL Server data provider for WinXP SP2?
I have tried to re-install MDAC 2.8 with no success due SP2 diallowing this. I uninstalled SP2 and re-installed MDAC 2.8 but the problem remains.
I'm all out of ideas, so any help would be appreciated.
Thanks!
Can you explain further how you are getting this error?|||May take help of KBA http://support.microsoft.com/kb/275118 in this case.Monday, March 12, 2012
Mgmt Studio: Script Table as...
Hi,
I'm using SQL Server 2005 Express SP1 & Mgmt Studio express.
I'm trying to use the script output to track my db changes in source code mgmt, but when I output a table to a script the first two bytes of the "text" file are 0xFF and 0xFE which sends my SCM into storingthe file in binary defeating the purpose of storing text files I can "diff" to see the changes.
Does anyone know why the mgmt studio is doing this and is there a way to stop it?
thanks!
Management Studio creates UNICODE files so characters from all alphabets can be represented in the same file. Your SCM system is probably interpretting the UNICODE signature at the top of the file as being "binary."
If you are scripting to a Query Editor Window, you can save the script as an ASCII file by clicking File | Save As... and clicking the little pull-down arrow on the right side of the save button to select the file type. US-ASCII is toward the bottom of the list.
Hope this helps,
Steve
Thanks! This was helpful and it explains the situation.
I'm working around it by the copy & paste method you mention while I deal with the SCM issue.
It's interesting that SQL Server Mgmt Studio uses unicode BOM and Visual Studio uses utf-8 for it's configuration files, so the SCM has to deal with the many "standards" of unicode...
life was not mean't to be easy...