Showing posts with label jdbc. Show all posts
Showing posts with label jdbc. Show all posts

Friday, March 30, 2012

Microsoft SQL Server 2005 JDBC Driver 1.1 on Solaris

hi,

Does MS2005 JDBC Driver 1.1 support integrated security on Solaris and if so
how?

Thanks,
MarcMOn Apr 24, 10:44 am, "Marc Melancon" <mmela...@.bmc.comwrote:

Quote:

Originally Posted by

hi,
>
Does MS2005 JDBC Driver 1.1 support integrated security on Solaris and if so
how?
>
Thanks,
MarcM


There's no such thing as integrated security between Solaris and MS.

Microsoft SQL Server 2005 JDBC Driver

Hi, will there be a Windows Mobile edition of this driver, so that is possible to connect to SQL Everywhere on a Pocket PC from Java ME apps?

Best regards.

Luca

Luca:

There are currently no plans for a Java ME JDBC driver for SQL Everywhere but we evaluate customer demand on a regular basis. If you have a particular scenario that you think is especially compelling feel free to reply to this forum or mail me directly (shelbyg at microsoft dot com).

-shelby

Shelby Goerlitz

Microsoft SQL Server Data Programmability

Microsoft SQL Server 2005 JDBC Driver

Hi, will there be a Windows Mobile edition of this driver, so that is possible to connect to SQL Everywhere on a Pocket PC from Java ME apps?

Best regards.

Luca

Luca:

There are currently no plans for a Java ME JDBC driver for SQL Everywhere but we evaluate customer demand on a regular basis. If you have a particular scenario that you think is especially compelling feel free to reply to this forum or mail me directly (shelbyg at microsoft dot com).

-shelby

Shelby Goerlitz

Microsoft SQL Server Data Programmability

Microsoft SQL Server 2005 JDBC Driver

I'm getting the following exception when attempting to connect to SQL Server 2005 using Microsoft's new JDBC driver:

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect

The help docs suggest checking connectivity using telnet. So attempting to connect via telnet to 127.0.0.1:1433 generates:

Could not open connection to the host, on port 23: Connect failed.

So I try to start telnet:

net start telnet

I get the following error message:

The service cannot be started either because it is disabled or because it has no enables devices associated with it.

Can anyone help?

Thanks

It seems that the TCP protocols is not enabled on your SQL Server.

You may need to enable TCP and *restart* SQL Server.

An article on how to do it for SQL Express is at http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx. The steps are similar for any other edition of SQL Server 2005.

|||

Thanks Peter; TCP/IP was enabled,I must have broken something else during my experimentation with Telnet. I reinstalled the OS and it worked OK.

Duncan

sql

Wednesday, March 28, 2012

Microsoft SQL Server 2000 JDBC Driver issue

I was wondering if anybody has run into the following problem with ms's
jdbc driver. We're using cursors in our app - when we create a
java.sql.Statement object in the app, we're indicating that we want the
corresponding ResultSet object to have a TYPE_FORWARD_ONLY cursor.
We've noticed when we do this that if the app executes a query with
'UNION's in it, it never gets a ResultSet back from the server (I've
noticed on the SQL server profiler that it stays stuck doing the 'exec
sp_cursoropen' call). If we change the resultSetType to
TYPE_SCROLL_INSENSITIVE then the query returns in no time.
Any ideas?
Thanks.
--Yogesh
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
joe wrote:

> I was wondering if anybody has run into the following problem with ms's
> jdbc driver. We're using cursors in our app - when we create a
> java.sql.Statement object in the app, we're indicating that we want the
> corresponding ResultSet object to have a TYPE_FORWARD_ONLY cursor.
> We've noticed when we do this that if the app executes a query with
> 'UNION's in it, it never gets a ResultSet back from the server (I've
> noticed on the SQL server profiler that it stays stuck doing the 'exec
> sp_cursoropen' call). If we change the resultSetType to
> TYPE_SCROLL_INSENSITIVE then the query returns in no time.
If you can show an example of your code, it'll help.
If you do a trivial query like "select * from sysdatabases UNION select * from sysdatabases"
that hangs?
thanks
Joe

> Any ideas?
> Thanks.
> --Yogesh
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
sql

Friday, March 23, 2012

Microsoft JDBC Driver XA Problem

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
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 JDBC driver support connection pooling out of the box

Hi,
I'm pretty new to JDBC so bare with me.
If using Jdbc outside of an application/J2ee server with the Microsoft
Jdbc driver what is teh correct procedure/code for ensuring
connections are pooled.
I've seen quite a few posts about this but to be honest mostly of
little use.
A code snippet would be great.
Some of my colleagues have saud you don't get pooling without a
application/J2ee server , is this correct?
Regards
John Harkin wrote:

> Hi,
> I'm pretty new to JDBC so bare with me.
> If using Jdbc outside of an application/J2ee server with the Microsoft
> Jdbc driver what is teh correct procedure/code for ensuring
> connections are pooled.
> I've seen quite a few posts about this but to be honest mostly of
> little use.
> A code snippet would be great.
> Some of my colleagues have saud you don't get pooling without a
> application/J2ee server , is this correct?
> Regards
Some drivers will offer an internal poooing feature, which can be
useful for long-running applications that use lots of connections,
opening and closing them frequently. If the app is short-lived,
or just opens connections and keeps them until it exits, then
pooling won't help.
In any case, the free MS driver has no internal connection pooling.
Joe Weinstein at BEA

Microsoft JDBC Driver Performance Degradation

We have been using Microsoft SQL Server JDBC Driver 2.2.0040 in our products
to connect to SQL Server 2000 Standard Edition SP3 (8.00.760). Our
functional testing went fine but we have run into serious performance
degradation under simulated heavy loads.
Our server crashed with OutOfMemory errors due to the inability to create
new native threads for the BaseQueryTimeoutEnforcer class in the JDBC driver
library. Right before crashing, we saw high thread counts went from 150 to as
high as 490. Thread counts were variable, so the thread count would decrease
and increase over time, until the last thread count reported 489 just before
crashing.
Total GC time was much higher as well due mostly to incremental GC times
that were almost 3x that of the benchmarked WebLogic's jDriver.
Correspondingly, response times were much higher.
I wonder if anyone else has experienced such problems.
Thanks,
Brian Luo
You better post this in microsoft.public.sqlserver.jdbcdriver
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"Brian Luo" <Brian Luo@.discussions.microsoft.com> wrote in message
news:4652D65A-5666-41E3-9245-A572FEF907B8@.microsoft.com...
> We have been using Microsoft SQL Server JDBC Driver 2.2.0040 in our
> products
> to connect to SQL Server 2000 Standard Edition SP3 (8.00.760). Our
> functional testing went fine but we have run into serious performance
> degradation under simulated heavy loads.
> Our server crashed with OutOfMemory errors due to the inability to create
> new native threads for the BaseQueryTimeoutEnforcer class in the JDBC
> driver
> library. Right before crashing, we saw high thread counts went from 150 to
> as
> high as 490. Thread counts were variable, so the thread count would
> decrease
> and increase over time, until the last thread count reported 489 just
> before
> crashing.
> Total GC time was much higher as well due mostly to incremental GC times
> that were almost 3x that of the benchmarked WebLogic's jDriver.
> Correspondingly, response times were much higher.
> I wonder if anyone else has experienced such problems.
> Thanks,
> Brian Luo
|||Thanks for the info. Unfortunately, microsoft.public.sqlserver.jdbcdriver is
not listed as a managed newsgroup.
"Gert E.R. Drapers" wrote:

> You better post this in microsoft.public.sqlserver.jdbcdriver
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2004 All rights reserved.
> "Brian Luo" <Brian Luo@.discussions.microsoft.com> wrote in message
> news:4652D65A-5666-41E3-9245-A572FEF907B8@.microsoft.com...
>
>
|||Yes it is a managed newsgroup, see:
http://www.microsoft.com/sql/communi...r.jdbcdri ver
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"Brian Luo" <BrianLuo@.discussions.microsoft.com> wrote in message
news:134481F8-0146-443F-9D38-1C84E84BFE8D@.microsoft.com...[vbcol=seagreen]
> Thanks for the info. Unfortunately, microsoft.public.sqlserver.jdbcdriver
> is
> not listed as a managed newsgroup.
> "Gert E.R. Drapers" wrote:
|||True, but please note that only "managed" customers (i.e. MSDN subscribers
posting using a registered alias) are guaranteed a response and you're not
posting from a registered alias. Even then, this is not the proper newsgroup
for this topic so even if somebody from the MSDN team does respond, which
isn't likely, they'll simply tell you that this is an off-topic post and
needs to be posted to the proper newsgroup even though it's not a managed
newsgroup and you won't get a response to your post. In short, if you
require a response from Microsoft on this topic, I think you're going to
have to open up a case with Product Support. Sorry!
Sincerely,
Stephen Dybing
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to the newsgroups only, thanks.
"Brian Luo" <BrianLuo@.discussions.microsoft.com> wrote in message
news:134481F8-0146-443F-9D38-1C84E84BFE8D@.microsoft.com...[vbcol=seagreen]
> Thanks for the info. Unfortunately, microsoft.public.sqlserver.jdbcdriver
> is
> not listed as a managed newsgroup.
> "Gert E.R. Drapers" wrote:
|||Correction, not managed as in the MSDN sense, sorry my bad. Anyhow the
jdbcdriver newsgroup is the best place to post this.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"Gert E.R. Drapers" <GertD@.SQLDev.Net> wrote in message
news:%23WTUBI38EHA.1692@.TK2MSFTNGP10.phx.gbl...
> Yes it is a managed newsgroup, see:
> http://www.microsoft.com/sql/communi...r.jdbcdri ver
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> You assume all risk for your use.
> Copyright SQLDev.Net 1991-2004 All rights reserved.
> "Brian Luo" <BrianLuo@.discussions.microsoft.com> wrote in message
> news:134481F8-0146-443F-9D38-1C84E84BFE8D@.microsoft.com...
>

Microsoft JDBC Driver Performance Degradation

We have been using Microsoft SQL Server JDBC Driver 2.2.0040 in our products
to connect to SQL Server 2000 Standard Edition SP3 (8.00.760). Our
functional testing went fine but we have run into serious performance
degradation under simulated heavy loads.
Our server crashed with OutOfMemory errors due to the inability to create
new native threads for the BaseQueryTimeoutEnforcer class in the JDBC driver
library. Right before crashing, we saw high thread counts went from 150 to as
high as 490. Thread counts were variable, so the thread count would decrease
and increase over time, until the last thread count reported 489 just before
crashing.
Total GC time was much higher as well due mostly to incremental GC times
that were almost 3x that of the benchmarked WebLogic's jDriver.
Correspondingly, response times were much higher.
I wonder if anyone else has experienced such problems.
Thanks,
Brian Luo
Brian Luo wrote:

> We have been using Microsoft SQL Server JDBC Driver 2.2.0040 in our products
> to connect to SQL Server 2000 Standard Edition SP3 (8.00.760). Our
> functional testing went fine but we have run into serious performance
> degradation under simulated heavy loads.
> Our server crashed with OutOfMemory errors due to the inability to create
> new native threads for the BaseQueryTimeoutEnforcer class in the JDBC driver
> library. Right before crashing, we saw high thread counts went from 150 to as
> high as 490. Thread counts were variable, so the thread count would decrease
> and increase over time, until the last thread count reported 489 just before
> crashing.
> Total GC time was much higher as well due mostly to incremental GC times
> that were almost 3x that of the benchmarked WebLogic's jDriver.
> Correspondingly, response times were much higher.
> I wonder if anyone else has experienced such problems.
> Thanks,
> Brian Luo
Hi. For the MS driver, you should avoid using setQueryTimeout() in middleware
because it will spawn a separate thread to enforce that for every statement.
This will play havoc with a JVM that is trying to multiplex a fixed number
of system threads to do enterprise-level loads and work.
It is certainly possible that MS's next driver version will fix this issue
but it doesn't hurt to ask MS to verify that...
For a WebLogic environment, is there any reason not to use WebLogic's
drivers? Particularly for our 8.1 versions, you will get a thoroughly superior
driver for MS SQLServer. I do understand that in our older WebLogic versions,
our jDriver is efficient, but frozen at the JDBC 1.0 level. If you cannot upgrade
to 8.1, the easiest fix is to use a third-party driver. I would recommend
DataDirect.
Joe Weinstein at BEA
|||Thanks. It seems a rather inefficient way to implement query timeout
mechanism at per statement level. It could be done either at per connection
level or even better, only one timeout thread per JVM.
Ironically, the 3.0 DataDirect driver had a similar problem . Not a surprise
because MS and DataDirect drivers are of the same origin. We worked with BEA
to get the problem fixed in the 3.3.0047 version.
The primary reason for us not using DataDirect (or other third party driver)
is business reason. Also, using drivers embedded in WebLogic/WebSphere impose
various restrictions for our product.
Your suggestion is a good one though. We should avoid to setQueryTimeout()
whenever possible. For example, if it is already 0 (default), we should avoid
setting it.
Thanks,
Brian
"Joe Weinstein" wrote:

> Brian Luo wrote:
>
> Hi. For the MS driver, you should avoid using setQueryTimeout() in middleware
> because it will spawn a separate thread to enforce that for every statement.
> This will play havoc with a JVM that is trying to multiplex a fixed number
> of system threads to do enterprise-level loads and work.
> It is certainly possible that MS's next driver version will fix this issue
> but it doesn't hurt to ask MS to verify that...
> For a WebLogic environment, is there any reason not to use WebLogic's
> drivers? Particularly for our 8.1 versions, you will get a thoroughly superior
> driver for MS SQLServer. I do understand that in our older WebLogic versions,
> our jDriver is efficient, but frozen at the JDBC 1.0 level. If you cannot upgrade
> to 8.1, the easiest fix is to use a third-party driver. I would recommend
> DataDirect.
> Joe Weinstein at BEA
>
>
|||Brian Luo wrote:

> Thanks. It seems a rather inefficient way to implement query timeout
> mechanism at per statement level. It could be done either at per connection
> level or even better, only one timeout thread per JVM.
> Ironically, the 3.0 DataDirect driver had a similar problem . Not a surprise
> because MS and DataDirect drivers are of the same origin. We worked with BEA
> to get the problem fixed in the 3.3.0047 version.
> The primary reason for us not using DataDirect (or other third party driver)
> is business reason. Also, using drivers embedded in WebLogic/WebSphere impose
> various restrictions for our product.
> Your suggestion is a good one though. We should avoid to setQueryTimeout()
> whenever possible. For example, if it is already 0 (default), we should avoid
> setting it.
Glad to help. By JDBC spec, it *is* zero by default.
Joe Weinstein at BEA
[vbcol=seagreen]
> Thanks,
> Brian
> "Joe Weinstein" wrote:
>
|||You are absolutely correct. And that's why I said we should avoid setting it
if the value is 0 (in our product).
Thanks,
Brian
"Joe Weinstein" wrote:

>
> Brian Luo wrote:
>
> Glad to help. By JDBC spec, it *is* zero by default.
> Joe Weinstein at BEA
>
>
|||Brian Luo wrote:

> You are absolutely correct. And that's why I said we should avoid setting it
> if the value is 0 (in our product).
Ok, but I can't imagine that the driver is so broken as to spawn a thread if
setQueryTimeout() is called with a zero value. I believe the problem only occurs
when there is a selected query timeout, and my only hope is that you can
limit any of your customers from causing it to be called with any non-zero
value until MS provides a free driver that has the same sort of fix as the
one you got through BEA.
Joe
[vbcol=seagreen]
> Thanks,
> Brian
> "Joe Weinstein" wrote:
>
|||I didn't really believe it but it is true, unfortunately. We have a parameter
in our product to set query timeout value. In our performance tests, we
always set it to 0. With WebLogic's jDriver, we never had any problem. But
with MS or older version of DataDirect, we always ran into OOM errors with
BaseQueryTimeoutEnforcer.
Thanks,
Brian
"Joe Weinstein" wrote:

>
> Brian Luo wrote:
>
> Ok, but I can't imagine that the driver is so broken as to spawn a thread if
> setQueryTimeout() is called with a zero value. I believe the problem only occurs
> when there is a selected query timeout, and my only hope is that you can
> limit any of your customers from causing it to be called with any non-zero
> value until MS provides a free driver that has the same sort of fix as the
> one you got through BEA.
> Joe
>
>
|||Brian Luo wrote:

> I didn't really believe it but it is true, unfortunately. We have a parameter
> in our product to set query timeout value. In our performance tests, we
> always set it to 0. With WebLogic's jDriver, we never had any problem. But
> with MS or older version of DataDirect, we always ran into OOM errors with
> BaseQueryTimeoutEnforcer.
> Thanks,
> Brian
Yow! Well, ok then. The bug is even worse, but we at least have a partial workaround...
thanks for the heads-up.
Joe
[vbcol=seagreen]
> "Joe Weinstein" wrote:
>
|||The Microsoft SQL Server 2000 JDBC driver doesn't spawn a new thread if
the query timeout is left at its default value (zero). However, if
setQueryTimeout is set -- even to explicitly set the value to zero --
then a thread will be spawned.
We will make the fix to have the driver never spawn a new thread in the
zero case -- default or explicit.
-shelby
Shelby Goerlitz
Microsoft SQL Server
"Joe Weinstein" <joeNOSPAM@.bea.com> wrote in message
news:joeNOSPAM@.bea.com:[vbcol=seagreen]
> Brian Luo wrote:
>
>
> Yow! Well, ok then. The bug is even worse, but we at least have a partial
> workaround...
> thanks for the heads-up.
> Joe
>
>
>
>
>
>
>
|||The timer threads are not necessary. TCP/IP timeouts could be used just
as well. Other JDBC drivers do it. At the least, what could be done is
have a single timeout thread throughout the app. That thread could then
interrupt any of the working threads.
Alin,
The jTDS Project.

Microsoft JDBC Driver Performance Degradation

We have been using Microsoft SQL Server JDBC Driver 2.2.0040 in our products
to connect to SQL Server 2000 Standard Edition SP3 (8.00.760). Our
functional testing went fine but we have run into serious performance
degradation under simulated heavy loads.
Our server crashed with OutOfMemory errors due to the inability to create
new native threads for the BaseQueryTimeoutEnforcer class in the JDBC driver
library. Right before crashing, we saw high thread counts went from 150 to a
s
high as 490. Thread counts were variable, so the thread count would decrease
and increase over time, until the last thread count reported 489 just before
crashing.
Total GC time was much higher as well due mostly to incremental GC times
that were almost 3x that of the benchmarked WebLogic's jDriver.
Correspondingly, response times were much higher.
I wonder if anyone else has experienced such problems.
Thanks,
Brian LuoYou better post this in microsoft.public.sqlserver.jdbcdriver
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"Brian Luo" <Brian Luo@.discussions.microsoft.com> wrote in message
news:4652D65A-5666-41E3-9245-A572FEF907B8@.microsoft.com...
> We have been using Microsoft SQL Server JDBC Driver 2.2.0040 in our
> products
> to connect to SQL Server 2000 Standard Edition SP3 (8.00.760). Our
> functional testing went fine but we have run into serious performance
> degradation under simulated heavy loads.
> Our server crashed with OutOfMemory errors due to the inability to create
> new native threads for the BaseQueryTimeoutEnforcer class in the JDBC
> driver
> library. Right before crashing, we saw high thread counts went from 150 to
> as
> high as 490. Thread counts were variable, so the thread count would
> decrease
> and increase over time, until the last thread count reported 489 just
> before
> crashing.
> Total GC time was much higher as well due mostly to incremental GC times
> that were almost 3x that of the benchmarked WebLogic's jDriver.
> Correspondingly, response times were much higher.
> I wonder if anyone else has experienced such problems.
> Thanks,
> Brian Luo|||Thanks for the info. Unfortunately, microsoft.public.sqlserver.jdbcdriver i
s
not listed as a managed newsgroup.
"Gert E.R. Drapers" wrote:

> You better post this in microsoft.public.sqlserver.jdbcdriver
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2004 All rights reserved.
> "Brian Luo" <Brian Luo@.discussions.microsoft.com> wrote in message
> news:4652D65A-5666-41E3-9245-A572FEF907B8@.microsoft.com...
>
>|||Yes it is a managed newsgroup, see:
http://www.microsoft.com/sql/commun...rver.jdbcdriver
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"Brian Luo" <BrianLuo@.discussions.microsoft.com> wrote in message
news:134481F8-0146-443F-9D38-1C84E84BFE8D@.microsoft.com...[vbcol=seagreen]
> Thanks for the info. Unfortunately, microsoft.public.sqlserver.jdbcdriver
> is
> not listed as a managed newsgroup.
> "Gert E.R. Drapers" wrote:
>|||True, but please note that only "managed" customers (i.e. MSDN subscribers
posting using a registered alias) are guaranteed a response and you're not
posting from a registered alias. Even then, this is not the proper newsgroup
for this topic so even if somebody from the MSDN team does respond, which
isn't likely, they'll simply tell you that this is an off-topic post and
needs to be posted to the proper newsgroup even though it's not a managed
newsgroup and you won't get a response to your post. In short, if you
require a response from Microsoft on this topic, I think you're going to
have to open up a case with Product Support. Sorry!
Sincerely,
Stephen Dybing
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to the newsgroups only, thanks.
"Brian Luo" <BrianLuo@.discussions.microsoft.com> wrote in message
news:134481F8-0146-443F-9D38-1C84E84BFE8D@.microsoft.com...[vbcol=seagreen]
> Thanks for the info. Unfortunately, microsoft.public.sqlserver.jdbcdriver
> is
> not listed as a managed newsgroup.
> "Gert E.R. Drapers" wrote:
>|||Correction, not managed as in the MSDN sense, sorry my bad. Anyhow the
jdbcdriver newsgroup is the best place to post this.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"Gert E.R. Drapers" <GertD@.SQLDev.Net> wrote in message
news:%23WTUBI38EHA.1692@.TK2MSFTNGP10.phx.gbl...
> Yes it is a managed newsgroup, see:
> http://www.microsoft.com/sql/commun...rver.jdbcdriver
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> You assume all risk for your use.
> Copyright SQLDev.Net 1991-2004 All rights reserved.
> "Brian Luo" <BrianLuo@.discussions.microsoft.com> wrote in message
> news:134481F8-0146-443F-9D38-1C84E84BFE8D@.microsoft.com...
>sql

microsoft jdbc driver for SQL Server 7.0

Hi,
I need a Microsft jdbc driver to connect Microsoft SQL
Server 7.0 . I can find a driver Microsoft 2000 jdbc
driver through which I can access Microsoft SQL Server
2000 but not 7.0.
I do not like to go for a third party driver..
Thank you in advance,
Hanson.
Third party solution is what you will likely have to get. You can pay for one
or just get a free one that works really well:
http://jtds.sourceforge.net/
Good luck.
Yuval
"Hanson" wrote:

> Hi,
> I need a Microsft jdbc driver to connect Microsoft SQL
> Server 7.0 . I can find a driver Microsoft 2000 jdbc
> driver through which I can access Microsoft SQL Server
> 2000 but not 7.0.
> I do not like to go for a third party driver..
> Thank you in advance,
> Hanson.
>
|||"Hanson" <rarockia@.chn.cognizant.com> wrote in message
news:4d7001c4804e$40294f30$a601280a@.phx.gbl...
> Hi,
> I need a Microsft jdbc driver to connect Microsoft SQL
> Server 7.0 . I can find a driver Microsoft 2000 jdbc
> driver through which I can access Microsoft SQL Server
> 2000 but not 7.0.
> I do not like to go for a third party driver..
> Thank you in advance,
> Hanson
The Microsoft JDBC driver was designed specifically for SQL Server 2000. As
was mentioned before, you will have to consider an alternative solution if
you wish to connect to SQL Server 7.0.
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..

Microsoft JDBC and SSL Support

What is Microsoft's plan for adding SSL support into their JDBC driver?
From what limited information I could find on the web, it appears
Microsoft has no plans to ever support it! If they are not going to
support it is there any way I can get the protocol definition so I can
begin developing a solution myself?
Am I even in the right place to ask such a question? Any Microsoft
employees here or is everyone here just a user and at the complete mercy
of Microsoft like I am?
Brett:
There are no plans to add SSL support to the current MS SQL Server 2000
Driver for JDBC. However, we do plan to have new driver for SQL Server 2005
and SSL on the feature list.
Shelby Goerlitz
Microsoft SQL Server
"Brett Prucha" <brett.prucha.bah@.scrb.navy.mil> wrote in message
news:MPG.1b8aba1c5bcc1515989680@.msnews.microsoft.c om...
> What is Microsoft's plan for adding SSL support into their JDBC driver?
> From what limited information I could find on the web, it appears
> Microsoft has no plans to ever support it! If they are not going to
> support it is there any way I can get the protocol definition so I can
> begin developing a solution myself?
> Am I even in the right place to ask such a question? Any Microsoft
> employees here or is everyone here just a user and at the complete mercy
> of Microsoft like I am?
|||Hi - regarding the new JDBC driver for SQL 2005. Is that planned to be
an upgrade to the current driver or a "new" driver as indicated by
your post?
- If new, will that driver be compatible with SQL 2000?
- Is there a beta version of the driver we can try with SQL 2005? We
have SQL 2005 Beta 2 but found no JDBC driver bundled there. When will
the SQL 2005 JDBC driver be available for beta testing with SQL 2005
please?
thanks
Grant
"Shelby Goerlitz [MSFT]" <shelbyg@.microsoft.com> wrote in message news:<#7N81DJhEHA.1048@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
> Brett:
> There are no plans to add SSL support to the current MS SQL Server 2000
> Driver for JDBC. However, we do plan to have new driver for SQL Server 2005
> and SSL on the feature list.
> Shelby Goerlitz
> Microsoft SQL Server
> "Brett Prucha" <brett.prucha.bah@.scrb.navy.mil> wrote in message
> news:MPG.1b8aba1c5bcc1515989680@.msnews.microsoft.c om...
|||Grant:
There isn't a beta version of the SQL Server 2005 driver to test yet, but as
soon as we know the timeline for this driver we'll post details to this
board.
-shelby
Shelby Goerlitz
Microsoft SQL Server
<grantmitchell7@.yahoo.com> wrote in message
news:fd5dcfa6.0408180917.412822f7@.posting.google.c om...
> Hi - regarding the new JDBC driver for SQL 2005. Is that planned to be
> an upgrade to the current driver or a "new" driver as indicated by
> your post?
> - If new, will that driver be compatible with SQL 2000?
> - Is there a beta version of the driver we can try with SQL 2005? We
> have SQL 2005 Beta 2 but found no JDBC driver bundled there. When will
> the SQL 2005 JDBC driver be available for beta testing with SQL 2005
> please?
> thanks
> Grant
> "Shelby Goerlitz [MSFT]" <shelbyg@.microsoft.com> wrote in message
news:<#7N81DJhEHA.1048@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
2005[vbcol=seagreen]
driver?[vbcol=seagreen]
mercy[vbcol=seagreen]

Wednesday, March 7, 2012

MetaData and FKCOLUMN_NAME

I've got a SQL Server 2000 database with a table that has two Foreign Keys.
They are declared as such in the database.
When I use the latest JDBC driver (sp3) to get the MetaData info about these
Foreign Keys, I'm runing into what appears to be a bug. Here's a snippet
code:
ResultSet rsForeignKeys = dbmd.getImportedKeys( null, null, "Recipes" );
while( rsForeignKeys.next() ) {
log.debug( "fktablename: " + rsForeignKeys.getString("FKTABLE_NAME") );
log.debug( "fkcolumname: " + rsForeignKeys.getString("FKCOLUMN_NAME") );
log.debug( "pktablename: " + rsForeignKeys.getString("PKTABLE_NAME") );
log.debug( "pkcolumnename: " + rsForeignKeys.getString("PKCOLUMN_NAME") );
}
This yields the following (with Log4J prefix info ommitted):
fktablename: Recipes
fkcolumname: MenuSectionID
pktablename: MenuSections
pkcolumnename: MenuSectionID
fktablename: Recipes
fkcolumname: MenuSectionID***
pktablename: RecipeType
pkcolumnename: RecipeTypeID
Notice the asterisked item above (asterisks are my own, not code generated).
The MenuSectionID is the fkcolumn name from the first FK entry but it is
show for both fk entries returned by the DBMD object. This is not correct,
the name of the second FK column for this table is "RecipeID". I have
double-checked my relationships in the database and all seems well there.
Any idea what might be going on here?
My thanks,
- Gary
Oh duh.
I just triple-checked by db-definition and found the problem. I had a typo
in the fk definition. The DBMD object was giving me exactly the fk's exactly
as I had (incorrectly) defined them.
Sorry about that.
- Gary
"gaffonso" wrote:

> I've got a SQL Server 2000 database with a table that has two Foreign Keys.
> They are declared as such in the database.
> When I use the latest JDBC driver (sp3) to get the MetaData info about these
> Foreign Keys, I'm runing into what appears to be a bug. Here's a snippet
> code:
> ResultSet rsForeignKeys = dbmd.getImportedKeys( null, null, "Recipes" );
> while( rsForeignKeys.next() ) {
> log.debug( "fktablename: " + rsForeignKeys.getString("FKTABLE_NAME") );
> log.debug( "fkcolumname: " + rsForeignKeys.getString("FKCOLUMN_NAME") );
> log.debug( "pktablename: " + rsForeignKeys.getString("PKTABLE_NAME") );
> log.debug( "pkcolumnename: " + rsForeignKeys.getString("PKCOLUMN_NAME") );
> }
> This yields the following (with Log4J prefix info ommitted):
> fktablename: Recipes
> fkcolumname: MenuSectionID
> pktablename: MenuSections
> pkcolumnename: MenuSectionID
> fktablename: Recipes
> fkcolumname: MenuSectionID***
> pktablename: RecipeType
> pkcolumnename: RecipeTypeID
> Notice the asterisked item above (asterisks are my own, not code generated).
> The MenuSectionID is the fkcolumn name from the first FK entry but it is
> show for both fk entries returned by the DBMD object. This is not correct,
> the name of the second FK column for this table is "RecipeID". I have
> double-checked my relationships in the database and all seems well there.
> Any idea what might be going on here?
> My thanks,
> - Gary