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.
Similar Messages
-
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. -
Trying to connect to Microsoft SQL Server via JDBC
This is what I've got:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://databasename:1433", "user", "pass");This is what I get:
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriverDoes anyone know what I'm doing wrong?Well, you must have tested to make sure that the socket value is indeed the correct value. But with that error, and you are certain that the socket value is correct, then it becomes difficult.
-
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"? -
MS SQL Server 2000 JDBC driver and databasename
Hi,
I have tried to switch from using WebLogic jDriver for MS SQL Server to using
MS SQL Server 2000 JDBC Driver as recommended by Bea for WebLogic 7.0. I can get
the connection pooling to work with the new driver but I cannot get it to work
for certain database. It seems to always connect to the defaul database even though
I specify the database in console with property databasename=DBNAME. Any ideas
what could be wrong?
Thanks!
Cheers,
JouniWe had this working fine with WLS7, this is the entry from our config.xml
<JDBCConnectionPool DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
InitialCapacity="50" MaxCapacity="50" Name="SQLServerConnectionPool" Password="{3DES}UkODkM1JaCU="
Properties="user=Destin8;SelectMethod=cursor;databaseName=Destin8V3" ShrinkingEnabled="false"
Targets="Destin8Cluster1" URL="jdbc:microsoft:sqlserver://mcp1:1433"/>
Hope this helps..
Pete
"Jouni Peltonen" <[email protected]> wrote:
>
Hi,
I have tried to switch from using WebLogic jDriver for MS SQL Server
to using
MS SQL Server 2000 JDBC Driver as recommended by Bea for WebLogic 7.0.
I can get
the connection pooling to work with the new driver but I cannot get it
to work
for certain database. It seems to always connect to the defaul database
even though
I specify the database in console with property databasename=DBNAME.
Any ideas
what could be wrong?
Thanks!
Cheers,
Jouni -
MS SQL Server 2000 JDBC Driver + Tomcat 4
Will the MS SQL Server 2000 JDBC Driver (http://www.microsoft.com/SQL/downloads/2000/jdbc.asp) work with a JSP application on the Tomcat Server. The JSP is to access a MS SQL Server Database. Would it b able to do this with this Driver or do I need another one (type) for Tomcat?
Thanx
YazHi Yasir,
1. It should be OK.
(2. Check the requirement to see if you have everything)
--Paul. -
Change the sql 2005 database C drive to E drive
hi,
it is possible to change the sql 2005 database C drive to E drive
if ,yes then step:-?
Regards
AmitHello Amit,
>it is possible to change the sql 2005 database C drive to E drive
>if ,yes then step:-?
You can also check note [363018|http://service.sap.com/sap/support/notes/363018].
Regards,
Eduardo -
Does Microsoft SQL Server 2k JDBC Driver SP3 support "trusted connections"?
I get the following error when attempting to connect to a SQL Server instance via JDBC :-
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user '<username>'. Reason: Not associated with a trusted SQL Server connection.
Does Microsoft SQL Server 2000 JDBC SP3 Driver support "trusted connections"?No, the MSDE instance I'm trying to connect to from my J2 application is configured as "Integrated Windows Authentication" ONLY (i.e not "mixed mode" and deliberately so) hence my search for a JDBC driver that supports o/s-based authentication.
I appear to have found one now however at it appears that DataDirect's JDBC driver supports NTLM and Kerberos authenicaiton on Windows (although I haven't got it working yet).
Thanks for your reply tho' -
BC4J connect to Microsoft SQL*Server via Allaire Jrun JDBC
This post is in answer to Matteo Tamburini's questions about
connecting to SQL*Server using the allaire jdbc drivers.
see Re: Version 10.1.0.3.03 of Oracle Data Provider for .NET
These drivers are available for download from Macromedia at:
http://www.macromedia.com/v1/Handlers/index.cfm?ID=22399&Method=Full
They are shipped as one jar file: jrun_drivers.jar
I installed it into <jdev_home>\lib
To make a connection from designtime, follow (roughly)
the steps in the HowTo walkthrough:
Notice that the JDBC driver class is:
allaire.jrun.jdbc.JRunDriver
and the URL is something like:
jdbc:jrun:sqlserver://machinenane:1433;Selectmethod=cursor
There are two gotchas:
1. the Selectmethod=cursor is important
2. you will get an error saying that the class
allaire/jrun/servlet/JRunSE
can't be found.
Indeed - that package is not to be found inside the .jar
file; I suspect it is a rogue import in the source.
The workaround is to ask the VM not to verify classes - do this
by specifying -Xverify:none in the Java Options box of the
"Runner" tab of project properties.
I did successfully test a project deployed as a JSP inside OC4J:
the caveats are that you have to enter the jar file location
in j2ee\home\config\application.xml (as in Matteo's thread)
and that the -Xverify:none switch needs to go on the CLIENT
project, because it launches the embedded OC4J
hope all this helps, Karl McHorton (BC4J Development)Well, you must have tested to make sure that the socket value is indeed the correct value. But with that error, and you are certain that the socket value is correct, then it becomes difficult.
-
Problem in Java Application Server 7 2004 Q2 + MS SQL 2000 + MS JDBC Driver
I have two applications runing on window 2000 server + Sun Java System Applilcation Server and connect to SQL Server 2000 + window 2000 server.
The JDBC driver is Microsoft JDBC type 4.
Both of them are with Local, Remote Ejb and session beans.
All of the ejbs have a unique jndi name. Each app has its only ejbs.
The problem I am facing is that If I deploy one of them, only one, every thing is fine.
However, If I deploy both of them , only one of them works.
I started the app server serval times. However, every time I got a different fail app.
For example, I got the following error message:
[24/Jan/2005:15:38:41] SEVERE ( 2440): Validation error in class gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_JDOState: com.sun.jdo.api.persistence.model.util.ModelValidationException: Warning: Cannot find the table Student for the class gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_JDOState.
Verify that the schema file exists and that its contents are correct.
[24/Jan/2005:15:38:42] INFO ( 2440): Bean Student method ejbFindActiveByPassword: problems running JDOQL query with params [21]
com.sun.jdo.api.persistence.support.JDOFatalInternalException: Failed to load the configuration for class gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_JDOState.
NestedException: com.sun.jdo.api.persistence.support.JDOUserException: The mapping for class gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_JDOState is invalid. Compile the class in the IDE, correct any errors, and verify that all required files are packaged for execution.
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.getPersistenceConfig(SQLStoreManager.java:145)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.loadPersistenceConfig(PersistenceManagerImpl.java:2085)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getRetrieveDesc(PersistenceManagerImpl.java:1009)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.CodeGeneration.createRetrieveDesc(CodeGeneration.java:707)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.CodeGeneration.checkRetrieveDesc(CodeGeneration.java:4665)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.CodeGeneration.prepareRetrieveDescs(CodeGeneration.java:4360)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.CodeGeneration.query(CodeGeneration.java:850)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.JQLC.codeGen(JQLC.java:332)
at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:626)
at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:552)
at gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_ConcreteImpl.ejbFindActiveByPassword(StudentBean129315485_ConcreteImpl.java:3491)
at gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_ConcreteImpl_LocalHomeImpl.findActiveByPassword(StudentBean129315485_ConcreteImpl_LocalHomeImpl.java:137)
at gwumc.edu.ejb.smhs.visitingstudent.StudentDeanSessionBean.ejbCreate(StudentDeanSessionBean.java:24)
at gwumc.edu.ejb.smhs.visitingstudent.StudentDeanSessionBean_LocalHomeImpl.create(StudentDeanSessionBean_LocalHomeImpl.java:27)
at gwumc.edu.smhs.servlet.VisitingStudentDeanModel.<init>(VisitingStudentDeanModel.java:18)
at gwumc.edu.smhs.servlet.VisitingStudentDean.doPost(VisitingStudentDean.java:27)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
at com.iplanet.ias.we
[24/Jan/2005:15:38:42] INFO ( 2440): b.WebContainer.service(WebContainer.java:850)
NestedStackTrace:
com.sun.jdo.api.persistence.support.JDOUserException: The mapping for class gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_JDOState is invalid. Compile the class in the IDE, correct any errors, and verify that all required files are packaged for execution.
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.getPersistenceConfig(SQLStoreManager.java:128)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.loadPersistenceConfig(PersistenceManagerImpl.java:2085)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getRetrieveDesc(PersistenceManagerImpl.java:1009)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.CodeGeneration.createRetrieveDesc(CodeGeneration.java:707)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.CodeGeneration.checkRetrieveDesc(CodeGeneration.java:4665)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.CodeGeneration.prepareRetrieveDescs(CodeGeneration.java:4360)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.CodeGeneration.query(CodeGeneration.java:850)
at com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.JQLC.codeGen(JQLC.java:332)
at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:626)
at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:552)
at gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_ConcreteImpl.ejbFindActiveByPassword(StudentBean129315485_ConcreteImpl.java:3491)
at gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_ConcreteImpl_LocalHomeImpl.findActiveByPassword(StudentBean129315485_ConcreteImpl_LocalHomeImpl.java:137)
at gwumc.edu.ejb.smhs.visitingstudent.StudentDeanSessionBean.ejbCreate(StudentDeanSessionBean.java:24)
at gwumc.edu.ejb.smhs.visitingstudent.StudentDeanSessionBean_LocalHomeImpl.create(StudentDeanSessionBean_LocalHomeImpl.java:27)
at gwumc.edu.smhs.servlet.VisitingStudentDeanModel.<init>(VisitingStudentDeanModel.java:18)
at gwumc.edu.smhs.servlet.VisitingStudentDean.doPost(VisitingStudentDean.java:27)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)
[24/Jan/2005:15:38:42] SEVERE ( 2440): StandardWrapperValve[visitingstudentdean]: Servlet.service() for servlet visitingstudentdean threw exception
javax.servlet.ServletException: nested exception is: com.sun.jdo.api.persistence.support.JDOFatalInternalException: Failed to load the configuration for class gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_JDOState.
NestedException: com.sun.jdo.api.persistence.support.JDOUserException: The mapping for class gwumc.edu.ejb.smhs.visitingstudent.StudentBean129315485_JDOState is invalid. Compile the class in the IDE, correct any errors, and verify that all required files are packaged for execution.
at gwumc.edu.smhs.servlet.VisitingStudentDean.doPost(VisitingStudentDean.java:41)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)
Any suggestion is great.
Thanks,Hi again, Thanks for the reply!,
I understand the part that you mentionned about specifying the database name. That is not what is causing me a problem : I was reffering to an instance. A new feature of MS SQL server 2000 -> you can have multiple SQL server instances, which means that each will have its own set of databases. Kinda like having multiple virtual servers but on the same machine. With ODBC, you can connect to the DEFAULT instance by just specifying the server name only. When you try to connect to a non default instance in ODBC you must specify it like this : '\\server_name\instance_name.'. I have found no way to do this with the type 4 MS driver (writting it like this : '//server/instance' or any other way was unsuccessful). Does anyone know how to do this or if it can be done with the MS driver???
THX, Bye
Andre Carrier -
ODI 10.1.3.4.0 - Topology Manager Connection Error using SQL 2005 SP3
Hello All,
I am using the ODI repository in SQL 2005 SP3. I could create my master repository using the following parameters:
driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
URL:jdbc:microsoft:sqlserver://server_name:1433;SelectMethod=direct;DataBaseName=ODI
I needed to copy to the drivers directory all files of SQL 2000 (msutil.jar, msbase.jar,mssqlserver.jar) and SQL 2005 (sqljdbc.jar). I am using the JRE 1.4.2 and JDBC 2005 1.2 (http://msdn.microsoft.com/en-us/library/ms378422(SQL.90).aspx)
But when I try to connect in Topology Manager to create the work repository appears the following error:
using this driver string: com.microsoft.jdbc.sqlserver.SQLServerDriver
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC] Can't start a cloned connection while in manual transaction mode.
using this driver string: com.microsoft.sqlserver.jdbc.SQLServerDriver
java.sql.SQLException: No suitable driver
Does Somebody know what is happening?
Regards,
Wallace Galvao
Sao Paulo - BrazilHi,
If you plan on using the SQL Server 2005 drivers then you only need the 1.2 sqljdbc.jar file in the drivers directory.
The connection details for SQL Server 2005 should be like the following.
com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:sqlserver://<sqls machine>:1433;databaseName=<db name>;integratedSecurity=false
I would try just with just the correct driver in place, remove the others, restart any ODI components and then make sure the connection information is correct like above.
Cheers
John
http://john-goodwin.blogspot.com/ -
Coldfusion connection to MS SQL 2005
Please help with this issue if you have any suggestions. I am
trying to establish a connection from my IIS server with ColdFusion
to another local server with an MS SQL 9.0 database. I can connect
to this database using Enterprise from another computer, but when I
use the same username and password within ColdFusion I get the
following error:
Connection verification failed for data source: FORMS
java.sql.SQLException: [Macromedia][SQLServer JDBC
Driver][SQLServer]Login failed for user 'domain\coldfusion'. The
user is not associated with a trusted SQL Server connection.
The root cause was that: java.sql.SQLException:
[Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user
'domain\coldfusion'. The user is not associated with a trusted SQL
Server connection.
I have reinstalled ColdFusion with no errors and have also
installed the MS JDBC driver for MS SQL 2005 but still get the same
error.
Thanks for any suggestions you might have.
CraigIf there is anyone else with this problem I have something
that you may want to try. This did work for me and I'm able to
connect to SQL 2005 using ODBC Socket. The IIS computer was using
system credentials and not the ColdFusion credentials I had
created.
On the ColdFusion application server goto the Properties of
CF's ODBC server and agent. Under LogOn change the LogOn
information to the username and password you have set up for
ColdFusion for both and restart these services. When setting up
your ODBC Socket do not include username or password information.
Hopefully CF8 will include Windows Authentication. Even with
this workaround we may need to switch to mixed authentication on
SQL which is not ideal. -
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. -
Database connection to MS SQL 2005 (URGENT Help Needed)
Hi all,
Does anyone know how to connect my adobe form to MS SQL 2005?
I have this code:
try {
InitialContext initialContext = new InitialContext ();
DataSource dataSource = (DataSource) initialContext.lookup ("jdbc/MyAlias");
java.sql.Connection connection = dataSource.getConnection ();
} catch (SQLException e) {
// handle exception
} catch (NamingException e) {
// handle exception
Other than these, what else do i need to do inorder to get my database connection up?
And after my database connection is up, how do i test to check if my database connection is up or not?
How do i extract the information from the database and put them onto the textfields/dropdownlists on my form?
Thanks In AdvanceHi Mel,
After implementing the codes and modifying them, some of them are underlined, why is this so? =X
Or are u willing to exchange msn so i could send u the screenshot instead?
Thanks In Advance
(Sorry im not that good in this)
(I shall underline the areas which represents the red underline in my web dynpro)
//Code for database connection.
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)_ctx.lookup("jdbc/JXDataSource");_
Connection conn = ds.getConnection();
Statement st = null;
ResultSet rs = null;
IPrivateDetailed_Claims_FormView.IFillDataElement dataEle = null;
st = conn.createStatement();
// Execute the appropriate SQL query
rs = st.executeQuery("SELECT NAME WHERE VENDORCODE='9000116L' ");_
while (rs.next()) {
// Code that will populate your VN based on the data obtained in the ResultSet.
dataEle = wdContext.createFillDataElement();
dataEle.setName(_rs.getString(1)_);
// dataEle.setAge(rs.getInt(2));
// dataEle.setAddress(rs.getString(3));
//wdContext.nodeFillData.addElement(dataEle);
// Close the connections
rs.close();
st.close();
conn.close();
Edited by: JingXuan Lim on Jan 25, 2008 4:59 AM
Edited by: JingXuan Lim on Jan 25, 2008 5:00 AM -
Hi,
Should there be a difference of compatibility between Windows 8.1 (laptop A) and Windows 8.1 Pro (laptop B) when connecting to a SSAS instance on a remote 2005 SQL Server via SSMS 2014?
I am able to connect to the SSAS from laptop A without having set any permissions explicitly, or otherwise. While on laptop B it cannot connect, stating"Forcibly Closed by Remote Host" as the error. I have run a SQL Server Profiler trace, laptop A
logs in as Administrator, again no permissions were set explicitly, compared to laptop B that attempts to login as anonymous.
I also tested connecting to the SSAS via Excel 2013 from both laptops. Laptop A connects without issues whereas Laptop B gives an error pertaining to the transport layer.
Why is this happening? What is the problem and how do I go about fixing it?
Thank you.By default, SSAS only support windows account. Have you configured the HTTP access to SSAS? If yes, what’s the authentication setting? Can you connect to SSAS via the URL in SSMS? Anyway, just for test purpose, change the authentication to windows Integrated,
disable Anonymous access for the pump
http://stackoverflow.com/questions/4785686/adomd-net-an-existing-connection-was-forcibly-closed-by-the-remote-host
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/62e5968c-6f83-4ff7-9b63-051020df2b80/security-configuration-for-http-connection?forum=sqlanalysisservices
Maybe you are looking for
-
I suddenly can't use my printer! It stopped working, so I followed apple's advice and deleted the printer, downloaded a new driver, now I get this message when I try to install it: Can't install the software for the Brother HL-2040 series because it
-
How to add the Note board web part to a page with powershell
Hi everyone, I've been looking around everywhere but haven't seen it explicitly mentioned. Does anyone know how to add the Note Board web part to a Team Site page, e.g. Non-publishing site, Left Zone, First webpart in the zone in powershell? Example
-
LVRT.dll error everytime I build a deployment
HI all, I have struggled with this for 2 days now and tried to use the forum to figure this one out, but I cannot. I have built quite a few deployments before, however, when I try to put a new deployment on a clean Win7 32-bit PC, I get the same issu
-
Multiple Users - NOTES (Outlook/iTunes Synchronization issue)
To date I have tried everything I can think of. My wife and I share one computer, and we use Outlook. We have new iPhones (purchased yesterday), and it appears that most of what we need to allow separate entries is working properly. However, in Outlo
-
Typical resolution logic for client connection request (Oracle Database 11g)
Salam, hello everyone, I would know the process that oracle follows to connect a client to a database (local or remote connection) via this command : connect username/password[@connect_identifier]. Can someone help me with that?