-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Annoying MSSQL (MSDE) warnings
PostPosted: Wed Sep 08, 2004 1:37 pm 
Beginner
Beginner

Joined: Fri Jan 23, 2004 10:26 am
Posts: 21
Our Hibernate application is working fine under MSDE (MSSQL desktop engine) using microsoft JDBC, however, it gives warnings when there is a new connection opened or closed like this:

13:26:37 WARN - SQL Warning: 0, SQLState:
13:26:37 WARN - [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to <mydb>
13:26:37 WARN - SQL Warning: 0, SQLState:
13:26:37 WARN - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Changed database context to '<mydb>'.
13:26:37 WARN - SQL Warning: 0, SQLState:
13:26:37 WARN - [Microsoft][SQLServer 2000 Driver for JDBC]Language changed to us_english
13:26:37 WARN - SQL Warning: 0, SQLState:
13:26:37 WARN - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Changed language setting to us_english.

Although it does not cause trouble, it is quite annoying.
anybody familiar with this issue?

my connection url is:
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=<mydb>;SelectMethod=Cursor;sendStringParametersAsUnicode=false

Hibernate version:
2.1.2


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 08, 2004 1:47 pm 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
Are you using the standard hibernate connection pool? If so change it to another one ( C3P0 or proxol are the recommended ones ).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 08, 2004 1:51 pm 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
Plus don't use the Microsoft JDBC driver, it has many bugs and is quite slow compared to others.

See here

http://www.hibernate.org/80.html

Try the jTDS one, free and opensource.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 03, 2005 6:34 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
I'm using Inetsoftware's Opta2000 driver and I'm receiving the same annoying warnings...

My guess is that you will probably receive these warnings regardless of the MSSQL JDBC driver in use.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 1:12 pm 
jTDS Developer
jTDS Developer

Joined: Tue Feb 24, 2004 5:36 pm
Posts: 70
Location: Bucharest, Romania
Indeed, SQL Server returns these two messages on connect as warnings, so all JDBC drivers for SQL Server will return them (unless intentionally removed by the driver).

Alin Sinpalean,
The jTDS Project.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 18, 2005 6:42 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
I found out that it appears that you can set a URL property "nowarnings=true" to disable the warnings using Inetsoftware's Opta2000 driver. Of course, that turns off all the warnings, but, I'm not sure how useful those warnings are anyway...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 19, 2005 2:34 pm 
jTDS Developer
jTDS Developer

Joined: Tue Feb 24, 2004 5:36 pm
Posts: 70
Location: Bucharest, Romania
jemiller wrote:
I found out that it appears that you can set a URL property "nowarnings=true" to disable the warnings using Inetsoftware's Opta2000 driver. Of course, that turns off all the warnings, but, I'm not sure how useful those warnings are anyway...


Well, that depends. You might want to know that the driver returned a forward-only read-only ResultSet instead of the scrollable updateabe you asked. The way to do that, according to the JDBC specification, is to call getWarnings() after you got the ResultSet and check the warnings. Or you could call setXXX() or previous() and get an SQLException. Your choice, really.

Alin,
The jTDS Project.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.