JDBC for SQL Server
Has anyone had success using the driver provided by Microsoft?
Hi
I have been using JDBC driver of microsoft for SQL Serevr 2000. I use them in my application under Windows environment connecting to Windows NT Server.
Since I am a new user, I have been facing a limitation; I can connect only the default database set in the server for the user Id. Anybody has any idea how do I connect any database under it?
Thanks
mortoza
Similar Messages
-
How to establish a trusted connection with JDBC for SQL SERVER 2000
Hi!I am using jdk 1.4 and eclipse 3.3.
I create a servlet in eclipse with in-build tomcat.
When I run it ,it was working perfectlly has it was suppose to work.
In this servlet I connect to a sql 2000 database using jdbc-odbc bridge driver.
But when I tried to deploy the servlet on tomcat 5.5 manully on the same machine ,it gave me error saying
[Microsoft][SQLServer JDBC Driver][SQLServer]Login failed
for user 'sa'
I searched around some post and found that ok ,I need trusted connection
But I have 2 Questions
1). Why was in eclipse I was able to connect to the SQL server and why not in the servlet which I deployed manully on tomcat.
2). How do I create a trusted connection with JDBC for SQL server 2000
Thnaks for your help in advance.Hi! duffymo ,QussayNajjar ,dvohra09 .
Thank for help.
The ideas are really great.
I am trying generate reports for my company.
When I used eclipse the code worked perfectly.
below is code which I used
out.println("Calling For Class Name<br>");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
out.println("Calling For Class Name success Now calling database <br>");
1). jdbcConnection = DriverManager.getConnection("jdbc:odbc:SQLJasper");
2). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb");
3). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb","UID=UserName","Password=Password");
out.println("connecting to database success<br>");
I had tried to connect the database using this three way.
In 1st I tried using DSN name .
Next 2 self explainer for expert like you.
I used to 2nd variant to connect in eclipse and it worked fine.
I not an expert in java ,I just doing some research on jasperReport.
My best guest is that eclipse is using some library files of which I have no clue.
Thank's for your help,I appretiate it.
Once again thank a billion.
Sorry for the messy righting. -
I have downloaded it and installed it on my NT box.
How do I use this? What's the syntax for making the
connection? Any help is greatly appreciated.I just put my foot in my mouth. After installing it, you should find online help in the start button, under programs. But here's the syntax:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://server1:1433","username","password"); -
Hi,
I'm trying to execute some SQL queries and I just don't understand what's wrong.
I�m using Tomcat and SQL Server in order to do this, but when I�m try to execute a query with a INNER JOIN statements Tomcat raise a SQL exception... at the very first time I thought there was a problem with database connection but I realize that a simple query to a table works pretty well. then I found out some problems with JDBC:ODBC.... so I install JDBC for SQL Server 2000 and test with the same simple query and works..... so, I come to a conclusion.... INNER JOIN or JOIN statements can't be used in JDBC..... please... somebody tell I�m wrong and give me a hand...
I'm using TOMCAT 4 and JDK 1.4 SQL Server 2000
Error occurs when executeQuery() is called.... not prepareStatement().... ??????
Driver DriverRecResult = (Driver)Class.forName(driver).newInstance();
Connection ConnRecResult = DriverManager.getConnection(DSN,user,password);
PreparedStatement StatementRecResult = ConnRecResult.prepareStatement(query);
ResultSet RecResult = StatementRecResult.executeQuery(); <---- Exception raise here
So much tahnks in advance,That's exactly what I think, driver it's raising the exception, but I don't know why.... i test the same query with INNER JOIN directly from SQL Query Analyser and it's works perfectly, my problem ain't SQL, but JSP and JDBC 'cause i'm a newbie about these issues.
Common sense tell me possible problems lie in SQLServer drivers 'cause i run the same pages on JRUN through jdbc:odbc and do works well, but by now i just depend on Tomcat.....
I've installed SQL Server drivers for JDBC but i just find it doesn't work fully... could be the version of JDK i've installed? what version do i need?
( I'm running Tomcat 4 with JDK 1.4 & SQL Server 2000 W2K )
thanks for reply. -
Deploy JDBC driver for SQL server 2005 on PI 7.1
How to deploy JDBC driver for SQL server 2005 on PI 7.1
We are in SAP NetWeaver 7.1 Oracle 10G
Third party system is SQL server 2005
There are different JDBC versions are available to download for SQL server 2005.
I am not sure about the applicable version for the PI 7.1 SP level. Again JMS Adapter needs to be deploy along with this.
Please helpHi,
Hope this How to Guide help you.
How To Install and Configure External Drivers for the JDBC & JMS Adapters from
www.sdn.sap.com/irj/sdn/howtoguides
Regards,
Karthick.
Edited by: Karthick Srinivasan on Apr 13, 2009 4:07 PM -
Deploying JDBC driver for SQL Server 2005 on PI 7.1
How to Deploy JDBC driver for SQL Server 2005 on PI 7.1 on Windows 2003 server
We are in NW PI 7.1 and third party db is sql server 05.
Found How-to Guide SAP NetWeaver u201804 but unable to find for NW PI 7.1
Can any one help me on this? (looking for guide step by step procedure)
Regards
MaheshHi,
Check these:
Re: Installing JDBC Drivers for PI 7.1
how to deploy MS Sql Server 2005 and 2008 jdbc driver
Mention of a SAP Note in the first link or refer this note [831162|https://service.sap.com/sap/support/notes/831162]
Regards,
Abhishek. -
*****Error in Microsoft JDBC drivers for SQL Server 2000****
hi guys,
I am getting the following error in my application. The error seems to have thrown by Microsoft JDBC drivers for SQL Server 2000
The application tries to execute the the following query when the error is thorwn:
SELECT getDate(); // getDate is a function which returns currebt date time. The error is thrown occassionally. Other times the same query is executed correctly by the application.
Can any one help with this one.
The error is:
java.lang.NullPointerException
at com.microsoft.jdbc.base.BaseImplStaticCursorResultSet.setupTempFiles(Unknown Source)
at com.microsoft.jdbc.base.BaseImplStaticCursorResultSet.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.chainInServiceImplResultSets(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.getNextResultSet(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonGetNextResultSet(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)
at com.sanderson.tallyman.util.TallymanDB.executeQuery(Unknown Source)
at com.sanderson.tallyman.util.TallymanDB.getCurrentDate(Unknown Source)
at com.sanderson.tallyman.operations.interfaces.RecordUpdateControl.updateRecord(Unknown Source)
at com.sanderson.tallyman.operations.interfaces.DebtInterfaceControl.processUpdate(Unknown Source)
at com.sanderson.tallyman.operations.interfaces.DebtInterfaceControl.processInterface(Unknown Source)
at com.sanderson.tallyman.operations.interfaces.InterfaceHandler$ProcessRecord.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
rgds,Hi,
Did you ever get an answer to this? I am also having this problem. -
Microsoft Jdbc driver for SQL Server memory leak
I'm using Microsoft Jdbc driver and see there's some leak after running application for a while. I'm sure that it's from Jdbc driver because I sitch to Jtds and the issue went away. My question is is there anybody knows which web sites talk about memory leak issue in Microsoft Jdbc driver for SQL Server?
Appreciate your helpI'm using Microsoft Jdbc driver and see there's some leak after running application for a while. I'm sure that it's from Jdbc driver because I sitch to Jtds and the issue went away. My question is is there anybody knows which web sites talk about memory leak issue in Microsoft Jdbc driver for SQL Server?
Appreciate your help -
Has anybody used the microsoft JDBC 2.0 driver for sql server 2000?
Hi,
Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from the
microsoft website?When I try using it with WL 6.1 sp1 it says it can't load the
driver.I try viewing the class file from the jar file using the jar utility it
gives an unknown Zip format error.Anybody has any solution for this ?If anybody
has managed to work with this microsoft driver i will be grateful if they provide
me with a solution.
Thanks
ThomasHello Thomas,
You may want to download the driver again and install it again.
heres a sample xml tag in the config.xml:
<JDBCConnectionPool
DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
InitialCapacity="3" MaxCapacity="12" Name="MSpool"
Password="{3DES}fUz1bxR0zDg=" Properties="user=uid"
Targets="myserver"
URL="jdbc:microsoft:sqlserver://mydbserver:1433"/>
ensure that you follow the instructions from Microsoft. For using 2000
driver you will need to have
Install_dir/lib/msbase.jar and Install_dir/lib/msutil.jar in addition to
Install_dir/lib/mssqlserver.jar in the CLASSPATH.
hth
sree
"Thomas" <[email protected]> wrote in message
news:3c91ec0e$[email protected]..
Hi,
Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from
the
microsoft website?When I try using it with WL 6.1 sp1 it says it can't load
the
driver.I try viewing the class file from the jar file using the jar utility
it
gives an unknown Zip format error.Anybody has any solution for this ?If
anybody
has managed to work with this microsoft driver i will be grateful if they
provide
me with a solution.
Thanks
Thomas -
JDBC driver for SQL Server Compact Edition
Hi,
I'm trying to run pc java application on Pocket Pc (Mobile 5.0) with SQL Server Compact edition.
The error message is:
java.lang.UnsatisfiedLinkError: java/sql/DriverManager.getCallerClassLoader()Ljava/lang/ClassLoader;
at java.sql.DriverManager.getConnection(Unknown Source)...
Should I use a special jdbc driver for SQL Server Compact Edition? Is there one?
MixxoHi,
I got an answer from msdn forum:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2307542&SiteID=1.
There is no jdbc driver for SQL Server Compact Edition. OleDB and ADO.net are available. Now I need to know how to use them (in Java)...
Thanks, Mixxo -
Is there a free JDBC Driver for SQL Server 7 available? If so, where? I created a server program that listens to a port and inserts records based on information it receives. It uses sun's JDBC:ODBC Bridge but it crashes randomly (sometimes weeks, sometimes days, sometimes hours after starting program). Each time it crashes it generates a error log file like this:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77f821e1
Function name=RtlEnterCriticalSection
Library=C:\WINNT\System32\ntdll.dll
Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.driverConnect(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.xxxxx.data.DataAccess.connect(DataAccess.java:20)
at com.xxxxx.xxx.server.Broadcaster.insertOrder(POSServer.java:71)
at com.xxxxx.xxx.server.ClientListener.run(POSServer.java:298)
Dynamic libraries:
0x00400000 - 0x00405000 C:\WINNT\system32\java.exe
0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0C000 C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F35000 C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DB0000 C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
0x6D420000 - 0x6D4F0000 C:\Program Files\JavaSoft\JRE\1.3.1_02\bin\hotspot\jvm.dll
Local Time = Mon May 06 10:36:33 2002
Elapsed Time = 124
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.3.1_02-b02 mixed mode)
Or this:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77f821e1
Function name=RtlEnterCriticalSection
Library=C:\WINNT\System32\ntdll.dll
Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.freeConnect(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLFreeConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.closeConnection(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.close(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.finalize(Unknown Source)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
at java.lang.ref.Finalizer.access$100(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
Dynamic libraries:
0x00400000 - 0x00405000 C:\Program Files\JavaSoft\JRE\1.3.1_02\bin\javaw.exe
0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
0x77DB0000 - 0x77E0C000 C:\WINNT\system32\ADVAPI32.dll
0x77E80000 - 0x77F35000 C:\WINNT\system32\KERNEL32.DLL
0x77D40000 - 0x77DB0000 C:\WINNT\system32\RPCRT4.DLL
Local Time = Mon May 06 10:13:59 2002
Elapsed Time = 137
# The exception above was detected in native code outside the VM
# Java VM: Java HotSpot(TM) Client VM (1.3.1_02-b02 mixed mode)
I think this error occurs because I'm using sun's JDBC:ODBC Bridge. I'm hoping that using a different driver will solve the problem.
Thanks,
DanI used Sun's jdbc odbc driver for a while, with no problems, with Sql Server 7. But anyways, if you want a free type 4 driver, you can get the freetds driver at
https://sourceforge.net/projects/jtds/ -
Does anyone know of a JDBC driver for SQL Server 2000 that supports Windows Authentication?
Meaning a username and password does not need to be supplied when connecting to the database.
Thanks,
James.Yes.
JDBC-ODBC. -
Using JSP & JDBC driver for SQL Server 2000 on Red Hat
I successfully have a .jsp app running on windows server 2000 using JDBC
driver for SQL Server 2000. Which I installed in order to the following
Red Hat:
http://msdn.microsoft.com/MSDN-FILES/027/001/779/install.htm
I moved the .jsp app over to the Red Hat 9 server running Tomcat, while
keeping the MS SQL 2000 on windows. The issue I have is setting up the
JDBC driver for SQL Server 2000 on the Red Hat server.
I created a folder called /usr/java/MSSQLdriver and unzipped the tar file with
the driver for SQL Server 2000. And ran the install.ksh script.
The /usr/java/MSSQLdriver/lib has the following files within it:
msbase.jar, msutil.jar, & mssqlserver.jar
I chmod 0777 each of the *.jar files.
I then went into /etc/profile.d/tomcat.sh and adding the following:
CLASSPATH=.;/opt/msSQLjdbc/lib/msbase.jar;/opt/msSQLjdbc/lib/msutil.jar;/opt/msSQLjdbc/lib/mssqlserver.jar
Each time I login and pull up the termial I get the following error:
bash: /opt/msSQLjdbc/lib/msbase.jar: cannot execute binary file
bash: /opt/msSQLjdbc/lib/msutil.jar: cannot execute binary file
bash: /opt/msSQLjdbc/lib/mssqlserver.jar: cannot execute binary file
And can't connnect to the database within the .jsp app.
Is there anyone out there using DBC driver for SQL Server 2000 on the Red Hat server?
MichaelSorry, I needed to correct some information of where the drivers were installed.
I created a folder called /usr/java/MSSQLdriver/new and untar the Microsoft file with the driver for SQL Server 2000. I ran the install.ksh script "sh install.ksh"
installed the driver into the default directory "/opt/msSQLjdbc".
The /opt/msSQLjdbc/lib has the following files within it:
msbase.jar, msutil.jar, & mssqlserver.jar
Michael -
JDBC driver for SQL Server 2000 with windows authentication
Does anyone know of a JDBC driver for SQL Server 2000 that supports Windows Authentication, that is that a username and password does not need to be supplied when connecting to the database.
You can use the JDBC-ODBC-Bridge.
ODBC provides windows-authentication.
Hope it helps.
Freddy -
Are there any JDBC Drivers for SQL Server 2000?
Hello Everyone,
Any news on the JDBC drivers for SQL Server 2000? I know it is not
certified yet but is there a date when it will be.
Which versions of WLS will they work with? Any help is appreciated.
Sincerely,
--LuisHello Michael,
Any news on the JDBC drivers for SQL Server 2000? I know it is not
certified yet but is there a date when it will be.
Which versions of WLS will they work with? Any help is appreciated.
Sincerely,
--Luis
"Michael Girdley" <[email protected]> wrote in message
news:3a6549bb$[email protected]..
Not yet, but they will appear on the web site in about two weeks.
Thanks,
Michael
Michael Girdley, BEA Systems Inc
Learning WebLogic? Buy the book.
http://www.learnweblogic.com/
"Stefano Picozzi" <[email protected]> wrote in message
news:[email protected]..
Are there any JDBC Drivers for SQL Server 2000 for Weblogic Server.
Maybe you are looking for
-
Financial Reports - Text function to trim description for charts
Hello! I have looked at the text functions in Hyperion Financial Reports Studio 9.3.1 to grab either Member Description or Alias ( Planning ) and need to trim or section or segment per the following example: Member = "C3402" Alias = "C3402 Major Proj
-
Best Practice for programatically navigating to a page in ADF
What is the best approach to navigate programmatically to another page in ADF. I can use this in JSF but want to know is there anyother approach for navigation in ADF: FacesContext.getApplication().getNavigationHandler().handleNavigation
-
Why is it when I am multi-tasking between apps that when going back to an app like safari the page will reload. I was checking out on a web page shopping cart and went to my email for a second and when I came back to safari by double click home butto
-
Windows iPhone tether stopped working (Win7 64-bit)
Have an iPhone 5S on Canada's Rogers network. Tethering was working on my desktop (Win7 x64) a month ago. Needed to move away desktop and find tethering no longer working. I've run a temporary cable to ensure latest iTunes, and ability to download an
-
How the best way to use the defringe tool in removing chromatic aberration?
I am having a problem with LR 4.2 in correcting chromatic aberation. When I try to use the "defringe tool" I receive the following error message, "Cannot set the purple or green fringe color. Please sample a representative fringe color agian." How