Hi
I have a java program which uses sql.It supports sql 2000 and 2005.The user can enter a command from which he can choose to what server type he wants to connect.It is something like :
" c:connect [jdbc driver for 2005] [server] "
Now i have to do some different operations when user connects to 2000 and other operations when user connects to 2005.
The problem is that when using jdbc driver for 2005 he can also connect to mssql server 2000.
How can i find out to what server type he is connecting to?
I have read similar posts to this, but I am still having problems.
I am trying to use connection pooling to connect to a local SQL Server 2005 database. I am running my application using MyEclipse Enterprise Workbench. I have verified that sqljdbc.jar resides in "WebRoot/WEB-INF/lib/"
I've got an import app written in Java. One table I'm importing from contains 22 million records. When I run the app in a 2000 environment, I have my max heap set at 512, and the table gets imported. When I run in a 2005 environment, I have to change the max heap to 1152 or it will error out with a similiar error:
com.microsoft.sqlserver.jdbc.SQLServerException: The system is out of memory. Use server side cursors for large result sets:Java heap space. Result set size:854,269,999. JVM total memory size:1,065,484,288. (<--this is with max heap at 1024)
what is the difference between the 2000 and 2005 JDBC that I have to set max heap in one and not the other?
Is anyone out there using Unix/Java/Sun app server to connect to SQL Server via JDBC? If so, what drivers are you using? We are currently testing with WebLogic's BEA JDBC driver. Does anyone have any feedback on it?
Hi I just downloaded the Microsoft JDBC Driver for SQL Server 2000. Now it tells me SQL Server 7 is not supported. :o I already checked the JDBC Driver list on suns site. Its quite long and only states MS SQL Server without any version number. Can you recommend a particular driver? Preferrably without any cost. :D Or am I better of with the jdbc/odbc bridge?
Hello all,I have a question about the SQL Server JDBC driver. I was wondering ifanyone knows what the default prefetch size is (in number of rows).Also, does anyone know if an entire packet is sent (i.e. padded withnull values) if there is not enough data to fill it?Thanks for your help!ty
I downloaded the latest version on JDBC from Microsoft and I got problems.Indeed, when fetching a smallint from SQL Server i got instead an Integer.How can i do to avoid such a problem?Some hints?many tanks, gaetano
I have a MSDE database that I am trying to connect to with JDBC. I don'thave SQL Server installed. Is this possible? When I try to connect I getthe error:java.sql.SQLException: [Microsoft][SQLServer 2000 Driver forJDBC][SQLServer]Login failed for user 'sa'. Reason: Not associated with a trusted SQL Serverconnection.From what I've read on the web it looks like I need to set the securitysettings to allowfor SQL authentication as well as NT authentication. Is that correct? Andcan thatbe done with just MSDE?I think that I have MSDE 2000 installed (it actually came with a differentapplication).I just downloaded the latest SQL Server JDBC driver.Thanks,Bruce
what is the jdbc driver for sql express? is it "sqljdbc"? then what is its "complete" name in the class path:"com.microsoft.sqlexpress.sqljdbc"? and for the conection url is it "jdbc:microsoft:sqlexpress://localhost/sqlexpress"?
I started with a simple insert on one of my tables. It throws an exception for trying to place NULL in one of two calculated fields in the table. I then tried setting up a simple stored procedure and calling it using:
Which generates this exception: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '@P0'.
of course there is no such expression in any of the code.
I then set up a simple two column table called tblTestJDBC. now i'm getting this error: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'dbo.tblTestJDBC'.
Btw we DID manage to get a simple select statement to work from my applet. Nothing else has. Is this the MS JDBC driver? Should I just avoid using it or are we missing something here?
String connectionUrl = "jdbc:sqlserver://localhost:1433;" + "instance=SQLEXPRESS;databaseName=UPM;integratedSecurity=true;"; Connection con = DriverManager.getConnection(connectionUrl);
returns "connection refused" no matter what I do.
I've used the surface config tool to enable TCP, I've added sqlsrvr.exe to the firewall exceptions, I've tried a dozen or so variations on the connection string.
I can connect to the database using the Management Studio.
Am using Mcafee and it has a built in MSSQL Database. Am not able to get data frrom database. Can anyone let me know how to connect to Built in MSSQL database using JAVA? Need very quick reply. Any help is greatly appreciated.
Hi at all, i'm new here, your communitiy seems too much preparated. My question is simple... i must to connect via jdbc to a ms sql server 2000 database, but i'm in doubt to select which jdbc driver to use. your suggest over microsoft'drivers? i found on the internet the open source drivers jdts...what about them?
I am having difficulty connecting to a SQL Server 7.0 database. I have an application running on JBoss 3.2.x, and which connects to an Oracle database without problem. However, I also need to have the application connect to a SQL Server 7.0 database.
I have a set of jar files which are added to my classpath for SQL Server. There were three jars (msutil.jar, msbase.jar and mssqlserver.jar) that had to be added to the classpath to get that far. However the application reported that the connection could not be established.
So, I wrote a java class to see if I could replicate the problem, or establish a connection and possibly figure out whether it was the application or the database. The class threw an exception and indicated that the driver was for SQL Server 2000, and was incompatible with SQL Server 7.0.
Has anyone used SQL Server 7.0 with JBoss and can point me in the right direction?
I appear to have an issue here with WebLogic and SQL Server. The WebLogic server is set up to create a pool of connections (max 15, min 4) to the SQL server. The idea is that connections are "leased" to the application for the duration of a transaction and then returned to the pool at the end of the lease. The pool can grow to up to 15 simultaneous connections -- after that the applications must wait for the next available connection in the pool.
As activity subsides, connections are supposed to be dropped down to the minimum number of 4 connections (which are maintained open continuously).
The problem that I can see from SQL is that there are tens of connections that are open (should not be more than 15, right?) and some of these connections have been held open for several days (going back to the last time we rebooted the server 2 weeks ago). I am told that this is a relatively new phenomenon; new within the last 3 months, anyway. I have tried killing some of these processes manually and now they show up in "Current Activity" as being in a "Killed/Rollback" state.
Does anyone have any experience with JDBC/Weblogic and SQL? Any experiences similar to this?
More information: SQL Server: SQL Server 2000 (SP3) Windows NT (SP6)
Hello. I am having trouble finding a descent API for executing TSQLvia JDBC. I have tried the Microsoft driver AND the JDTS driver's butget the same syntax errors. I am hoping there is a good solution alsofor executing scripts using the same. Any help is MUCHappreciated.Thx.
I'm a newbie w/ SQL Server 2005.We will be connecting to SQL Server 2005 via JDBC. We have made thiswork by using an SQL Server account, rather than an Active Directory(AD) account, even though SQL Server IS in mixed authentication mode.Does mixed mode mean you can connect either way, but only using MS SQLServer interfaces (like Mgmt Studio), and not something like JDBC?Can we connect using JDBC w/ an AD login? If so, what form does thelogin take? Is the login not in 'DOMAIN/LOGIN' form?What is the best practice for this sort of thing? We would prefer touse AD logins (that a sysadmin creates) rather than having a separate(and probably equal) set of SQL Server logins.Any help appreciated.thanksaj
Dear all,Our application needs a bit of database redundancy.Our application only accesses database for reading purposes.We want to have two databases in separate machines. Incase one databaseserver dies the application should automatically extract data from theother server.Is there any JDBC driver available so that it can detect failure in themain database server and then tries to extract data from the standbydatabase server?Kind regards--Posted via http://dbforums.com
I'm using Borland's ProcedureDataSet to retrieve data from a SQL 2005 database using the JDBC 1.2 Driver. My problem is with the money data type. The Borland's component translate money into BigDecimal and if the value in the database in NULL then I get a NullPointerException.
On MSDN I saw money was referred as Double which is wrong! Any Ideas?
I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:
name: Microsoft SQL Server 2005 JDBC Driver version: 1.1.1501.101 Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true
I get the error: Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit> WARNING: Failed to load the sqljdbc_auth.dll Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
I copied over x86sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:
What are the files xax86sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?