SQL 2005 JDBC 1.1 driver
I tried installing and using the new SQL 2005 JDBC 1.1 driver
and read and followed the technote at
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=ded4216b.
I get multiple error messages each time I try to connect using RDS.
After the messages aredismissed it works ok. The settings I used
for this Datasource were:
1. JDBC URL= jdbc:sqlserver:// SAIC-C549F42BF7 :
1433;DatabaseName=MwsDevSqlServer
2. Driver Class= com.microsoft.sqlserver.jdbc.SQLServerDriver
3. Driver Name= SQL 2005 JDBC 1.1
4. A standard User Name & Password
The previous Datasource I used, which I went back to is a
Microsoft SQL Server driver:
1. Database =MwsDevSqlServer
2. Server=SAIC-C549F42BF7
3. Port= 1433
4. A standard User Name & Password
Ideas to fix?
We got the same error while using XA Datasource from the SQL Server 2005 JDBC driver 1.0. The file downloaded is "sqljdbc_1.0.809.102_enu" . We have not installed "Microsoft Distributed Transaction Coordinator", as we are developing custom transaction manager to talk to oracle, sybase and sql server databases in a single transaction. Does SQL Server require the Microsoft Distributed Transaction Coordinator to participate in the two phase commit protocal ?
Joshy
Note:- If you are intereted, check out my 2006 Tax Calculator Applet at http://www.bestonlinetaxpreparation.com/2006TaxCalculator.html . Of Course it does not participate in two phase commit protocol -:) .
Similar Messages
-
CF8 and connection pooling using MS SQL 2005 JDBC Driver
After upgrading one of our production servers to CF8 we're
getting errors under load while connecting to MS SQL 2000 data
bases using the MS SQL 2005 JDBC 1.1 driver instead of the driver
cf8 ships with. The following error is recorded in the logs:
Error Executing Database Query. The TCP/IP connection to the
host has failed. java.net.BindException: Address already in use:
connect
Confirmed by the database statistics, Coldfusion is no longer
pooling the database connections. After changing the data source to
use the build in driver everything works fine. We've been using
this driver and CF7 for some time without this error.
Is this a compatibility issue between the driver and Java 6?
Or is there a conflict between this driver and the build in driver?
Has anyone seen similar issues? We’d like to use this driver
rather then the build in one.
Thanks,
Remy Becherthanks for the answer...I have been waiting for one..I do agree that connection ppooling is same ..but I would appreciate it if someone could point me to some example implemenations using MS JDBC type 4 driver..
Thanks again..
PS: I did search the forum before posting this.. -
We are frequently (couple times per day) encountering this problem with SQL Server JDBC 4.0 driver:
java.lang.NullPointerException com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:50) com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.processBatchRemainder(SQLServerCallableStatement.java:229)com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.processBatch(SQLServerCallableStatement.java:147)com.microsoft.sqlserver.jdbc.SQLServerStatement.processExecuteResults(SQLServerStatement.java:1137)com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.processResponse(SQLServerPreparedStatement.java:357)com.microsoft.sqlserver.jdbc.TDSCommand.close(IOBuffer.java:5781)
I was suprised I can't find anyone having similiar problems. What might be the cause?
Would be great if driver source code would be openly available. :)
Cheers,Hi Esko,
Have you perform some action/process and then this issue occurred?
I recommend you elaborate your issue and scenario with more detail, it will benefit for us to troubleshoot this issue.
Regards,
Elvis Long
TechNet Community Support -
Problem with MS SQL 2005 JDBC Conection
Dear all,
I am new user of MS SQL Server 2005 database and Java developer.
When I conect to MS SQL Server 2005 i have a problem with conection.
First I creat new class named DaoTest to test MS SQL conection.
Here I show my code complete.
{color:#0000ff}
import java.sql.Connection;
import java.sql.Statement;
import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
public class DaoTest {
private Connection connection;
public DaoTest() {
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
SQLServerDataSource ds = new SQLServerDataSource();
ds.setUser("sa");
ds.setPassword("deanweb");
ds.setServerName("localhost");
ds.setPortNumber(1434);
ds.setDatabaseName("common");
connection= ds.getConnection();
} catch (Exception e) {
e.printStackTrace();
public static void main(String[] args) throws Exception {
DaoTest daoTest1 = new DaoTest();
DaoTest daoTest2 = new DaoTest();
}{color}
{color:#000000}and when I run this class a error appeared:{color}
{color:#ff0000}com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.Prelogin(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(Unknown Source)
at DaoTest.<init>(DaoTest.java:21)
at DaoTest.main(DaoTest.java:32)
{color:#000000}But when i change main methol as{color}:
{color}{color:#0000ff}public static void main(String[] args) throws Exception {
DaoTest daoTest1 = new DaoTest();
daoTest1.connection.close();
DaoTest daoTest2 = new DaoTest();
}{color}
->>successful.
{color:#ff0000}{color:#000000}That mean I {color}**can not**{color} creat more than one instance of class DaoTest if i do not close {color:#000000}*daoTest1*'{color}s conection.
I only see this error with MS SQL Server,none in Postgres or HSQL.
Please help me.
Thank for reading and I am waiting for your reply.
sorry my english.
[email protected]
Edited by: DrNhut on Jun 24, 2008 3:39 AM
Edited by: DrNhut on Jun 24, 2008 3:44 AMThank you.
I try your code but it didn't work.
So,here my code with your opinion
String connectionUrl = "jdbc:sqlserver://localhost:1434;"
+ "databaseName=common;selectMethod=cursor;";
// Declare the JDBC objects.
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
// Establish the connection.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con = DriverManager.getConnection(connectionUrl,"sa","deanweb");
} catch (Exception e) {
e.printStackTrace();
public static void main(String[] args) throws Exception {
DaoTest daoTest1 = new DaoTest();
// daoTest1.connection.close();
DaoTest daoTest2 = new DaoTest();
}It throws same error with my last posted.
I can't use your code exactlyString connectionUrl = "jdbc:sqlserver://localhost:1434/common;selectMethod=cursor";because it throws a new exception:com.microsoft.sqlserver.jdbc.SQLServerException: The port number 1434/common is not valid.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)May be I change my DBMS instead of MS SQL 2005.
(I nead a database can manage big data.So,I choose MS SQL).
thank you.
DrNhut.
Edited by: DrNhut on Jun 25, 2008 6:39 PM -
CallableStatement does not run PL/SQL with jdbc:oracle:thin driver
I have a very simple PL/SQL function:
FUNCTION CalculateDistance
(x1 IN NUMBER, y1 IN NUMBER, x2 IN NUMBER, y2 IN NUMBER)
RETURN NUMBER
AS
distance NUMBER;
BEGIN
distance := SQRT(POWER(x1-x2,2) + POWER(y1-y2,2));
return distance;
END;
I call it with:
CallableStatement cs = null;
try {
biomassStatement = con.prepareCall("{ call MYPACKAGE.CalculateDistance(?, ?, ?, ?, ?)}");
cs.setDouble("X1", -367546.78402892);
cs.setDouble("Y1", 150712.8161204);
cs.setDouble("X2", -2155095.49289);
cs.setDouble("Y2", 774013.149084);
cs.registerOutParameter("v_Return", OracleTypes.NUMBER);
cs.execute();
The only answer I get is:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'CALCULATEDISTANCE'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I tried it with different Data sources (common, pool, XA) and nothing works...
Tried using ojdbc14_g.jar to see if could get more information with no help...
HELP!!!Hi,
You are calling a FUNCTION, i.e you have one return value (And four arguments)
So according to javadocs
http://download.oracle.com/javase/6/docs/api/java/sql/CallableStatement.html
Your synbtax should be like:
{?= call <procedure-name>[(<arg1>,<arg2>, ...)]}Rigtht now, your call seems to be for a procedure having five arguments.
Regards
Peter -
Unable to establish connection to MS SQL 2005 from topology manager in ODI
Hi,
My environment:
WinXP pro SP3, MS SQL SERVER2005, Oracle data integrator latest version.
MS SQL 2005 JDBC 2.0 DRIVER, JRE 1.4.2
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:microsoft:sqlserver://testserver:1433;SelectMethod=cursor;databaseName=AdventureWorksDW;integratedSecurity=false
I set the classpath, odi_home path and path poiting to jdbc driver in odi home->drivers and to odi->jre->1.4.2
Before i begin, i would like to mention, i have gone through many forum topicson this one and made sure my string is all right.
When I try to create a new data server in topology manager, it says connection is successful, but after that when i try to click OK, it gives me a error:
java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.graphical.frame.b.jz.dP(jz.java)
at com.sunopsis.graphical.frame.b.jz.bD(jz.java)
at com.sunopsis.graphical.frame.bo.bz(bo.java)
at com.sunopsis.graphical.frame.b.jz.em(jz.java)
at com.sunopsis.graphical.frame.b.jz.<init>(jz.java)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.sunopsis.graphical.frame.bb.b(bb.java)
at com.sunopsis.graphical.tools.utils.swingworker.v.call(v.java)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at com.sunopsis.graphical.tools.utils.swingworker.l.run(l.java)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Unknown Source)
Someone please help me.
Thank you.
Edited by: user9946607 on Feb 7, 2010 7:20 AM
Edited by: user9946607 on Feb 7, 2010 7:21 AMHi John,
Thank you for your reply. The link was good, but it did not solve my problem.
The artcile you provided me, lead me to another one: http://msdn.microsoft.com/en-us/library/ms378422.aspx
I download JRE 1.5.
Based on these, I have JDBC 2.0 (sqljdbc and sqljdbc4.0) files.
I copy only sqljdbc to my classpath = C:\OraHome_1\oracledi\drivers\sqljdbc.jar
my ODI_JAVA_HOME = C:\OraHome_1\jre\jre1.5.0_11
Same error in topology manager.
Data server name: test.ahu.edu, 1444
Conntection string:
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:microsoft:sqlserver://test.ahu.edu:1444;SelectMethod=cursor;databaseName=AdventureWorksDW;integratedSecurity=false
I am not sure show the share screen shots here, but if there is a way, please let me know, I can upload the screen shots.
Please help me.
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
at com.sunopsis.graphical.l.pm.o(pm.java)
at com.sunopsis.graphical.l.pm.r(pm.java)
at com.sunopsis.graphical.l.pm.g(pm.java)
at com.sunopsis.graphical.l.pm.a(pm.java)
at com.sunopsis.graphical.l.pm.a(pm.java)
at com.sunopsis.graphical.l.iz.actionPerformed(iz.java)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at com.sunopsis.graphical.l.pm.q(pm.java)
at com.sunopsis.graphical.l.pm.<init>(pm.java)
at com.sunopsis.graphical.frame.b.jh.bx(jh.java)
at com.sunopsis.graphical.frame.bo.w(bo.java)
at com.sunopsis.graphical.frame.bo.d(bo.java)
at com.sunopsis.graphical.frame.w.actionPerformed(w.java)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Thank you. -
Not able to connect to MS SQL 2005 Evaluation version
Hi,
I have installed MS SQL 2005 Evaluation version(downloaded from microsoft site) on my win2k3 Enterprise Edition I am writing a java application that connects to MS SQL 2005.
I have downloaded the MS SQL 2005 JDBC driver. And i unjarred the
I have unjarred the sqljdbc.jar file and kept the com folder and my .java file in the same folder.
When i am trying to connect, I am getting the following error:
com.microsoft.sqlserver.jdbc.SQLServerException: Failed Logon:com.microsoft.sqlserver.jdbc.SQLServerException: TCP/IP connection failed to host:155.35.54.160 java.net.ConnectException: Connection refused:connect
My code look like this:
try {
Class.forName ("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String fs = File.separator;
String conn_str = "jdbc:sqlserver://155.35.54.160:1433;user=sa;password=SA;databaseName=asdb";
conn = DriverManager.getConnection ( conn_str );
catch (Exception e) {System.out.println(e); }
Please reply.
Thanks and Regards,
Sudheer GajulaFirst aid check list for "connection refused":
- Check host name in connect string.
- Check port number in connect string.
- Try numeric IP address of server host in connect string, in case name server is hosed.
- Are there any firewalls between client and server blocking the port.
- Check that the db server is running.
- Check that the db server is listening to the port. On the server, try: "telnet localhost the-port-number". Or "netstat -an", there should be a listening entry for the port. You need to configure the database to accept TCP connections; read the documentation or google.
- Try "telnet server-host-name the-port-number" from the client, to see if firewalls are blocking it.
- If "telnet" fails: try telnet with the numeric ip address.
- If "telnet" fails: does it fail immediately or after an obvious timeout? How long is the timeout?
- Does the server respond to "ping serverhost" or "telnet serverhost" or "ssh serverhost"? -
I am trying to set up the Master Repository with the MS SQL Server 2005 JDBC Driver. I copied the sqljdbc.jar file into the /drivers directory, but it is not appearing in the drop down list. Any ideas? Thanks in advance.
EDIT: I have solved the problem by looking at the instructions in the Thread: "Not able to estabish connection with SQLServer2005 from the Topology Manage" At first glance I did not think this would relate to my issue.
Edited by: user9535932 on Nov 12, 2008 3:14 PMHi,
The driver will not appear in the list, but you can do this way.
JDBC driver MS SQL Server 2005 :
com.microsoft.sqlserver.jdbc.SQLServerDriver
URL MS SQL Server 2005 :
jdbc:sqlserver://localhost:1433;selectMethod=cursor;databaseName=xyz;integratedSecurity=false
Hopefully it solve your problem..
Regards,
V13N -
Connecting to MS SQL 2005 via JDBC Driver
I have an application in which I use Java to abstract
database elements as objects and handle most of the server-side
processing. This is done by creating a Java object via
CreateObject(). The Java then connects to a MS SQL 2005 database
using the JDBC 1.1 Driver.
The following tutorial explains how to set this up:
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=ded4216b.
It instructs you to create a Data Source, much like how you
typically would in "regular" ColdFusion applications. Then, using
some simple Java, I am successfully able to connect to the
database, query it, and get results. The connection code is
attached.
As you can see, I am still passing all the connection
parameters to the Database class constructor. My question is: how
would I go about connecting to the database by simply using the
Data Source Name, as you would, again, in "regular" ColdFusion
applications. Is this possible at all?
Thanks!Thanks for the input guys.
Perhaps I did not explain my intent very clearly. What I am
trying to accomplish is have a vast majority of the server-side
code done in Java. With that, I would be able to do things like:
<cfset myUser = CreateObject("java", "User").init(5)>
<cfoutput>#myUser.getFirstName()#</cfoutput>
However, unless I am able to connect to the database in Java
(which I currently AM able to do, but just not quite the way I want
to), I would have to run all the queries in CF and then pass them
to the different objects so that they can then process the query
results. This isn't a very smart thing to do, seeing that it binds
me to a lot of CF while I am trying use it as little as possible
(session management and user interface "tier" only).
So no, I am not going all out with Java just to avoid passing
username/password, but instead to use true OOP instead of CF
Components. I realize ColdFusion too passes this info, but it does
not show up in the source code, which is precisely what I need to
do, but with Java.
Basically, I have everything working the way I need now,
except I need to be able to connect using a data source name rather
than passing the parameters, if at all possible. -
Error in Connecting to MS SQL 2005 via JDBC Driver
Here's the setup
CF MX7 resides on a centOS wid Apache 2.0 webserver box.
I need to established a datasource connection between the
Coldfusion server and a MSSQL 2005 Express+SP1 database sitting on
a remote XP wid SP2 setup.
I've also downloaded and installed on the /lib folder of the
CFMX7 server the corresponding JDBC drivers (versions 1.1 and 1.0)
for the MS SQL server.
The thing is, this problem always occurs:
Connection verification failed for data source:
datasourcename
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Error establishing socket.
The root cause was that: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing
socket.
The datasource connection info is as follows:
CF Datasource Name: datasourcename_JDBCdriver
JDBC URL:
jdbc:microsoft:sqlserver://192.168.0.47:1433;DatabaseName=nameofdatabase
Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Driver Name: mssql2005
Username: sa
Password: userdefinedpassword
I've already tried these settings:
* Enabled mix mode of authentication under the SQL server
* Affix a /MSSQLSERVER instance name on the jdbc url setting
"jdbc:microsoft:sqlserver://192.168.0.47\MSSQLSERVER:1433;DatabaseName=nameofdatabase"
but a different error had occured:
The root cause was that: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]The requested instance
is either invalid or not running.
so i remove it since its only an optional setting
* Configured the SQL 2005 Express, under the SQL Server
Configuration Manager, to listen to protocol TCP/IP under port 1433
(this is the ONLY ENABLE protocol)
I've checked using Telnet and netstat and the SQL service is
normally listening to the said port.
* Disabled windows firewall under XP (came with SP2)
and even tried using other JDBC drivers such as:
* macromedia drivers
* jtds driver
but to no avail.
Is the problem still within the MS SQL 2005 Express wid
XP+SP2 box or a connecting issue on the Cf server under the
centOS/Apache machine?
A little help would do wonders just about now.I had the same problem, but do not have express version. In
the configuration manger, I viewed the properties of the enabled
tcp/ip protocol. On the IP addresses tab, I found that though the
IPs were enabled, the drop down beside active was no. I changed all
to yes, applied it and restarted my instance. Then in the cf
datasource I left the port blank and everything worked. -
Does BPEL 10.1.2.0.2 work with SQL Server JDBC 2005 driver?
Hi, wondering if any one has got 10.1.2.0.2 or .0.0 to work with the SQL Server 2005 jdbc driver. I have placed the sqljdbc.jar file in the OC4J_BPEL/applib/ directory in place of the previous 3 2000 drivers.
I then modified the connections I had in oc4j-ra.xml so that the:
driverClassName was com.microsoft.sqlserver.jdbc.SQLServerDriver instead of com.microsoft.jdbc.sqlserver.SQLServerDriver
the connectionString was jdbc:sqlserver:/ instead of jdbc:microsoft:sqlserver/
Forgot to add that after putting in the new driver and making the above changes we now get an error when running a process that connects to SQL Server that "Connection Refused"
Aside, has anyone found any performance benefits between 2000,2005 or datadirect sql server drivers?
Thank you,
AshleyHi
Did u able to connect to SQL Server 2005 with jdbc driver.
If yes could you please provide me the solution. I am also facing the same issue.
Thanks -
New SQL Server 2005 JDBC Driver
Dear All,
I am grasping for straws here. I have a very strange issue with
the new Microsoft JDBC driver (Microsoft SQL Server 2005 JDBC Driver).
I have a couple of strange things happenning when I am using this driver,
but the most critical one is that the application literally hangs
executing a readObject statement:
ExpressionBuilder trp= new ExpressionBuilder();
Expression exp1 = trp.get("ID").equal(ID);
getDatabaseSession().readObject(Trip.class, exp1);
I can see that it actually executes the statement, then hangs.
Any ideas would be greatly appreciated
I am using 10g Release 3 (10.1.3.0.0) (Build 060118)Are you able to get a thread dump to see where the threads are?
Doug -
Windows Authentication using Microsoft SQL Server 2005 JDBC Driver
Hi,
I am using Microsoft SQL Server 2005 JDBC Driver to connect to SQL Server 2000 database, can anyone tell me the connection URL for windows authentication. SQL authentication is working fine.
DataDirect has drivers for windows authentication but I am not using it.
Regards
ArupYou can't do it with the Microsoft driver. There's a free driver called jTDS that may be able to (I don't know).
(edit) Looking at their FAQ it looks like it does:
http://jtds.sourceforge.net/faq.html -
Microsoft SQL Server 2005 JDBC Driver
Hi
how can i use Microsoft SQL Server 2005 JDBC Driver to coonect to db???com.microsoft.jdbc.sqlserver.SQLServerDriver is a SQL Server 2000 class.
Also the port setting in the connection url jdbc:sqlserver://localhost:<port> is not 1433 as in SQL Server 2000.
In the connection URL, <port> is obtained from the SQL Server configuration Manager. When the SQL Server 2005 is restarted the port number changes.
To obtain the <port> in the SQL Server Configuration Manager select the node SQL Server 2005 Network Configuration>Protocols. Right-click on TCP/IP node and select Properties. Select the IP Addresses tab. In IP ALL the TCP Dynamic Ports specifies the <port> value. -
Sql Exception on Testing Configuration with SQL Server JDBC driver for XA
I have a requirement of analyzing the behavior of SQL Server JDBC data sources for XA transactions in our application.We have been using Non-XA drivers for both Oracle and SQL Server as we had no requirement for transactions spanning across multiple databases in past.I have setup and tested the XA driver for Oracle (Oracle Driver (Thin XA) for Instance Connections 9.0.1,9.2.0,10,11) in Weblogic 11g and its working perfectly for transactions spanning across two databases.No when I am trying to configure weblogic 11g R1 for Sql server JDBC driver to support XA transactions with driver details as follows,
Server:Weblogic 11g R1
Driver Type: MS Sql Server
Database Driver :Oracle's MS SQL Server Driver(Type 4 XA) Version:7.0,2000,2005)
Database:SQL Server 2005(Single Instance)
and try to create a new data source and select "Test Configuration" and following error is thrown ,
<Mar 17, 2011 4:49:49 PM GMT+05:30> <Error> <Console> <BEA-240003> <Console encountered the following error java.sql.SQLException: [OWLS][SQLServer JDBC Driver][SQLServer]xa_open (0) returns -3
at weblogic.jdbc.sqlserverbase.BaseExceptions40.createAppropriateSQLExceptionInstance(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseExceptions40.createSQLException(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
at weblogic.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at weblogic.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseStatement.commonTransitionToState(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseStatement.postImplExecute(Unknown Source)
at weblogic.jdbc.sqlserverbase.BasePreparedStatement.postImplExecute(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseStatement.commonExecute(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseStatement.executeUpdateInternal(Unknown Source)
at weblogic.jdbc.sqlserverbase.BasePreparedStatement.executeUpdate(Unknown Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.open(Unknown Source)
at weblogic.jdbcx.sqlserverbase.BaseXAConnection.init(Unknown Source)
at weblogic.jdbcx.sqlserverbase.BaseXAConnection40.init(Unknown Source)
at weblogic.jdbc.sqlserverbase.BaseClassCreatorForJDBC40.createXaConnection(Unknown Source)
at weblogic.jdbcx.sqlserverbase.BaseXADataSource.getXAConnection(Unknown Source)
at com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:550)
at com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:450)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64)
at org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction(ActionInterceptor.java:184)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.invoke(ActionInterceptors.java:50)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:87)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
at com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:261)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:256)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:133)
at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:686)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:142)
at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:106)
at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)
at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)
at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)
at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:47)
at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
I followed the instruction in weblogic jdbc drivers guide to configure the JTA Transactions to support XA on SQL Server machine and weblogic server which included,
1.Copying sqljdbc.dll copied to SQL_Server_Root/bin directory from WL_HOME\server\lib.
2.Copied instjdbc.sql to sql server machine and executed the script with following output,
Changed database context to 'master'.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_open', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_open2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_close', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_close2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_start', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_start2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_end', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_end2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_prepare', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_prepare2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_commit', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_commit2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_rollback', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_rollback2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_forget', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_forget2', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_recover', because it does not exist or you do not have permission.
Msg 3701, Level 11, State 5, Server SQLDB, Procedure sp_dropextendedproc, Line 16
Cannot drop the procedure 'xp_jdbc_recover2', because it does not exist or you do not have permission.
creating JDBC XA procedures
instxa.sql completed successfully.
3.Verified that MSDTC service is running on both SQL Server and weblogic machines with XA Transaction enabled and DTC option enabled for both inbound and outbound connections.
4.Copied sqljdbc.jar (version 3.0 downloaded from msdn portal) to "C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\sqlserver" directory and updated weblogic_classpth variable in commEnv.cmd file.
set WEBLOGIC_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%BEA_HOME%\utils\config\10.3\config-launch.jar;%WL_HOME%\server\lib\weblogic_sp.jar;%WL_HOME%\server\lib\weblogic.jar;%FEATURES_DIR%\weblogic.server.modules_10.3.2.0.jar;%WL_HOME%\server\lib\webservices.jar;%ANT_HOME%/lib/ant-all.jar;%ANT_CONTRIB%/lib/ant-contrib.jar;C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\sqlserver\server\ext\jdbc\sqlserver\sqljdbc.jar
Can some one please provide some input on whats causing this and any other steps needs to be followed to implement XA support using SQL Server JDBC driver.You seem to have done everything correctly and diligently. I would ask that you open
an official support case.
Maybe you are looking for
-
More than one language in iWeb - how to
I want to show my site in 3 different languages, how can i do that. It would be nice if i could have some flags on the frontpage witch could link to language sites i prefer to see. Is that possible?
-
Access to SharePoint from the Internet
I have a couple of users that are always on the run, using computers that is not a member of our domain. They want to access the SharePoint from oiutside our firewall, and use OneDrive for Business to sync document archives on our site. I have opened
-
Editing the author, picture, etc in my podcast--how to change??
Hello--I want to change some of the data in my podcast on itunes (change the picture and author spelling, etc). Its already submitted and on the itunes page. HOW DO I CORRECT IT??!!!
-
Hi guys, I've just bought an MSI GT70 2OD, and I'm greatly disappointed with the fact that Intel allowed this bug. I'm sure many of you have heard of the USB3.0 bug affecting the early Haswell units. I would post a link but the forum doesn't let me.
-
GET spool number according to Message type (nast-kschl)
hi all , i want to get the oldest spool number for a message type and PO number via abap program thinks in advancs. karim .