.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Recommend the best JDBC driver and version to connect to SQL server 2005 sp2

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Sql Server
 

SQL version details:Microsoft SQL Server 2005 - 9.00.3050.00 (Intel X86) Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2) on a clustered server.

Are there any issues using:

JDBC driver: Microsoft SQL Server JDBC Driver 3.0.
JBOSS: JBoss 4.2.3 with JDK 6 ?




View Complete Post


More Related Resource Links

How do I install SQL Server 2005 JDBC driver

  
I'm an new bie to "SQL Server 2005 JDBC Driver". I have downloaded SQL Server 2005 JDBC driver and extracted it to C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\. Is the installation complete now? How can I use this driver from my application? If there is a step-by-step instruction on whether we need to run some scripts in SQL Server or to configure some system variables, it would be great. Thanks in advance for your time in this.Cheeeeerrzzzz! S@kthi http://blogs.msdn.com/sqlsakthi | http://twitter.com/PowerSakthi Mark as Answer if it helps. This posting is provided "AS IS" with no warranties and confers no rights.

Microsoft SQL Server 2005 JDBC Driver

  
I'm getting the following exception when attempting to connect to SQL Server 2005 using Microsoft's new JDBC driver: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect The help docs suggest checking connectivity using telnet. So attempting to connect via telnet to 127.0.0.1:1433 generates: Could not open connection to the host, on port 23: Connect failed. So I try to start telnet: net start telnet I get the following error message: The service cannot be started either because it is disabled or because it has no enables devices associated with it. Can anyone help? Thanks

'TDS Protocol stream is not valid' error when running SQL Server 2008 with jdbc driver of version

  

I am using SQL Server 2008 on Windows Server 2008 R2 and one of our servers running as a windows service (on Windows Server 2008 R2) contacts the SQL Server 2008 in a timely fashion to get some information. During one of these runs, we encountered the following error logs in the service logs and thereby we took a hit in serving client requests. The jdbc jar that is used for database connectivity is of version 3.0 (sqljdbc.jar).

 

I can provide more details on this issue. Can someone please let us know why this can be occurring ? Just so you know, the set of errors repeats itself after sometime although on a different JDBC Connection (with different ConnectionID). We have a reconnection algorithm running in case the JDBC Connection is lost for some reason (but I would be surprised if this issue relates to the re-connect algorithm).

 

INFO   | jvm 1    | 2011/02/28 22:26:54 | Feb 28, 2011 10:26:54 PM com.microsoft.sqlserver.jdbc.TDSParser throwUnexpectedTokenException
INFO   | jvm 1    | 2011/02/28 22:26:54 | SEVERE: TDSReader@4686d ( ConnectionID:25 TransactionID:0x0000000000000000): FetchBufferTokenHandler: Encountered unexpected TDS_RET_STAT (0x79)
INFO   | jvm 1    | 2011/02/28 22:26:54 | Feb 28, 2011 10:26:54 PM com.microsoft.sqlserver.jdbc.TDSReade

cannot connect to sql server 2008 by MS JDBC driver

  

hello everyone!

i have this code for connecting to sql server 2008 from netbeans ide but i cannot connect to my db,

can someone tell me if i have a problem with my db, which schema is required for this connection?

/*

 * To change this template, choose Tools | Templates

 * and open the template in the editor.

 */

 

 

package library;

 

import java.sql.Connection;

import java.sql.Statement;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.ResultSetMetaData;

import java.sql.SQLException;

import java.util.logging.Level;

import java.util.logging.Logger;

 

 

public class Displayauthers {

 

    static final String JDBC_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";

    static final String DATABASE_URL = "jdbc:sqlserver//localhost:1433;" +

         "databaseName=DB_Library; user=sa; password=softPRO3";

 

    /**

     * @param args the command line arguments

     */

    @SuppressWarnings("CallToThreadDumpStack")

  

SQL Server JDBC Driver 1.2 Issue

  
I am using JDBC 1.2 driver to connect to Sql Server 2005 database and i am facing the application crash issues several times and javacores shows that the crash happens during JDBC call. This issue is happening several times in our application, please let me know if an upgraded driver version will fix the problem or to investigate the driver issue further NULL            1XMCURTHDINFO  Current Thread Details NULL           ---------------------- 3XMTHREADINFO      "WebContainer : 8" (TID:0x5946E100, sys_thread_t:0x51D052F0, state:R, native ID:0x000008AC) prio=5 4XESTACKTRACE          at com/microsoft/sqlserver/jdbc/PLPInputStream.getBytes(Bytecode PC:64(Compiled Code)) 4XESTACKTRACE          at com/microsoft/sqlserver/jdbc/DDC.xmlPLPToObject(Bytecode PC:132(Compiled Code)) 4XESTACKTRACE          at com/microsoft/sqlserver/jdbc/ServerDTVImpl.getValue(Bytecode PC:216(Compiled Code)) 4XESTACKTRACE          at com/microsoft/sqlserver/jdbc/DTV.getValue(Bytecode PC:216(Compiled Code)) 4XESTACKTRACE          at com/micro

Can't connect to SQL 2005 Enterprise using Management Studio with Server Name (only (local) works

  
This is a test system, everything running locally & no domains. Win 2003 Ent. Server & SQL Server 2005 Enterprise. I can't log into SQL Server Management Studio using the server name & using either Windows Authentication or SQL login. If I change the name of the server in the drop-down list to "(local)", I connect just fine (both Windows & SQL security modes). Shared Memory, Named Pipes & TCP/IP enabled in both server & client. Remote connections allowed. I have IP adresses (both 127.0.0.1 & external IP) in my hosts file pointing to the server name. Does SQL require a DNS server? This wouldn't be a problem except for the fact that I can't install SQL 2005 SP3 due to authentication failure since there's no way to enter (local) as the server name. SQL tools (management studio, SP install) seem to see the SQL server running but won't authenticate the user through any means other than setting server name to (local). This is driving me crazy!!!

SQL Server 2005: Install reporting services - which version?

  
Hello - I installed SQL Server 2005 as part of an SBS2008 install. I need to install reporting services, but now I'm having trouble identifying which version (X64 or X86) I'm running. Is there an easy way of figuring out which installation disk I need to insert for SQL Server 2005? Thanks, Nick.

Unable to connect to SQL Server 2005 remotly, all client protocols are blank

  
I have an installation of SQL 2005 and had issues connecting remotly. Looking at the client protocolols, they are all blank. I can see that TCPIP, Named Pipes, VIA, etc. are 'enabled', but where the words 'TCPIP', 'Names Pipes', etc. should be, it's just blank. I tried to install SQL 2008R hoping the Client Protocols would be corrected during the installaion, but they were not. I'm assuming the issue with the Client Protocols not showing up is a symptom of the problem. Does anyone have any ideas? Thanks!

Connect SQL Server 2005 to Ms Access on another computer

  
I'm trying to create a "Linked Server" on my SQL Server 2005.  This linked server is a reference to an Access File on a remote computer.  I've set up all the permissions and shared resources.  I've created an ODBC DSN to connect to the database.  If i open the DSN in excel, i can retrieve data.  If I open a linked server connected to the DB I get the following error when i try to run a query against it.   ------------------ OLE DB provider "MSDASQL" for linked server "LS_Specialty" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed". OLE DB provider "MSDASQL" for linked server "LS_Specialty" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed". OLE DB provider "MSDASQL" for linked server "LS_Specialty" returned message "[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'.  It is already opened exclusively by another user, or you need permission to view its data.". Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "LS_Specialty". ---------------------   Why does this DSN work in Excel and Access, but not in SQL

SOS: Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But networ

  
Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But network connection is successful.   But SQL Server Logins contain   BUILTIN \ Administrators, and                                                    BUILTIN \  Administrators contain DOMAIN \ Domain Admins, and                                                    DOMAIN \ Domain Admins contain DOMAIN \ myname.   Creating SQL Server Login with DOMAIN \ myname entail successful local connection.   Removing SQL Server Login with DOMAIN \ myname and creating SQL Server Login with DOMAIN \ Domain Admins do NOT entail successful connection. Cannot connect! System:   Windows Server 2008. Error 18456

Cannot connect to SQL Server 2005 locally by Windows Authentication, but network connection is succe

  
Cannot connect to SQL Server 2005 locally by Windows Authentication DOMAIN \ myname. But network connection is successful.   But SQL Server Logins contain   BUILTIN \ Administrators, and                                                    BUILTIN \  Administrators contain DOMAIN \ Domain Admins, and                                                    DOMAIN \ Domain Admins contain DOMAIN \ myname.   Creating SQL Server Login with DOMAIN \ myname entail successful local connection.   Removing SQL Server Login with DOMAIN \ myname and creating SQL Server Login with DOMAIN \ Domain Admins do NOT entail successful connection. Cannot connect!                                     &

Connect VB6 app to SQL server 2005

  

Hi,

I have a VB6 app that has to connect to SQL server 2005 located on another machine.
Now I use a connection string like this

"Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=test1;Network=DBMSSOCN;Server=100.100.100.100;Integrated Security=SSPI"
and it works from my laptop.

The question is, when I move the VB6 app to another machine, what do I need installed there for the same connection string to work?
What stays behind "Provider=SQLOLEDB.1" ?
Is it a single .dll that I only have to put on the other machine and regsvr32 , or it's something more complex?

Thanks


Data Transfer in C# slow when targeting SQL Server 2005 using SQL Server SMO version 10 (distributed

  

 

Hello everyone,

I have a strange issue regarding SQL Server SMO Transfer. I am using the Transfer class to create a copy of a database. I will explain the different cases I have tried so far and maybe someone can help me figure out what's going on.

First case

I run my C# code from an assembly that references version 9.0.242.0 of SMO assemblies that are in my GAC

  • Microsoft.SqlServer.ConnectionInfo
  • Microsoft.SqlServer.Smo
  • Microsoft.SqlServer.SqlEnum

If I target a database hosted on a Sql Server 2005 database engine, it works perfectly and fast.

But of course, as soon as I try to target a Sql Server 2008 database engine, it complains that it is not compatible. No surprise there.

 

Second case

I run the exact same C# code from an assembly that references version 10.0.0.0 of SMO assemblies that are also present in my GAC

  • Microsoft.SqlServer.ConnectionInfo
  • Microsoft.SqlServer.Management.Sdk.Sfc
  • Microsoft.SqlServer.Smo
  • Microsoft.SqlServer.Smo.Extended
  • Microsoft.SqlServer.SqlEnum

If I target a database hosted on a Sql Server 2008 database engine, it works perfectly and fast.

However, if I try to target the sam

Data Transfer in C# slow when targeting SQL Server 2005 using SQL Server SMO version 10 (distributed

  

 

Hello everyone,

I have a strange issue regarding SQL Server SMO Transfer. I am using the Transfer class to create a copy of a database. I will explain the different cases I have tried so far and maybe someone can help me figure out what's going on.

First case

I run my C# code from an assembly that references version 9.0.242.0 of SMO assemblies that are in my GAC

  • Microsoft.SqlServer.ConnectionInfo
  • Microsoft.SqlServer.Smo
  • Microsoft.SqlServer.SqlEnum

If I target a database hosted on a Sql Server 2005 database engine, it works perfectly and fast.

But of course, as soon as I try to target a Sql Server 2008 database engine, it complains that it is not compatible. No surprise there.

 

Second case

I run the exact same C# code from an assembly that references version 10.0.0.0 of SMO assemblies that are also present in my GAC

  • Microsoft.SqlServer.ConnectionInfo
  • Microsoft.SqlServer.Management.Sdk.Sfc
  • Microsoft.SqlServer.Smo
  • Microsoft.SqlServer.Smo.Extended
  • Microsoft.SqlServer.SqlEnum

If I target a database hosted on a Sql Server 2008 database engine, it works perfectly and fast.

However, if I try to target the sam

how to connect my hosting database from my pc using sql server management studio 2005

  

Hi..

I have one asp.net hosting account with some service provider.. 

They have given me some xxx.xxxxxx.com to access sql server from my desktop... 

I enter xxx.xxxxx.com in server name and username and password but it will not connect.. 

so please let me know what are the steps i have to do to access my hosting database...

they have given sql server 2008 im using in local sql server 2005 management studio so let me know how to connect

thanks in advance


Access 2007 upsizing wizard can't connect to SQL Server 2005 Express

  
Hi,

When trying to use the Access 2007 upsizing wizard to move a database to SQL Server 2005 Express, I get the following error message:

Connection failed:
SQLState: '01000'
SQL Server Error: 2
[Microsoft][ODBC SQ Server Driver][Share
Memory][ConnectionOpen(Connect()).
Connection failed:
SQLState:'08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server
does not exist or access denied.

I get the same message regardless of whether I configure SQL Server to run as a local system or service.

I am the only user on my Vista 32 PC and am therefore the administrator. As far as I can tell I have sufficient authority since I can start and stop SQL Server.

As a newbie to all this, I can't find any step by step instructions as to how a local copy of SQL Server should be configured to work with the upsizing wizard. In fact I can't even find any Access 2007 help walk-throughs on this upsizing wizard, let alone troubleshooting its error messages.

Any help would be appreciated, as well as links to step by step instructions (which I can't find in the MSDN Library materials).

Thanks!
Richard
PS Does MS understand how inadequate and inefficient its built-in documentation really is? Maybe that's what keeps MS Press in business!

windows 7 can't connect to SQL Server 2005

  

This is quite the odd problem, or at least that's how it seems.   I have a brand new installation of Windows 7 x64 as my dev machine.  I am having issues with connecting to instances of SQL2005 SP2.   We'll call them LOCAL_NETWORK_SQL and VPN_SQL, and they are both named instances.

From my Win7 machine, I can connect to LOCAL_NETWORK_SQL using Management Studio.  I can NOT connect to it using any SqlConnection through .NET.  This fails with..

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified"

I can NOT connect to VPN_SQL using either Management Studio OR a .NET SqlConnection; it fails with the same error (above) in both cases

I CAN connect to LOCAL_NETWORK_SQL using OSQL

I CAN connect to other SQL server instances ( SQL2005 SP3) that are on the same VPN network/domain as VPN_SQL using either Management Studio OR .NET SqlConnection.

I CAN connect to a named instance that is hosted locally on my dev machine (SQL2008 Express)

This seems a little bit like the issue described here http://social.msdn.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend