![]() |
![]() |
e-docs >
WebLogic Server >
Configuring and Using WebLogic jDriver for Microsoft SQL Server (Deprecated) > Installing WebLogic jDriver for Microsoft SQL Server |
Configuring and Using WebLogic jDriver for Microsoft SQL Server
|
Installing WebLogic jDriver for Microsoft SQL Server
This document tells you how to configure WebLogic jDriver for Microsoft SQL Server, BEA's pure-Java Type 4 JDBC driver for Microsoft SQL Server, and provides information about the following topics:
Note: The WebLogic jDriver for Microsoft SQL Server is deprecated. BEA recommends that you use the JDBC driver available from Microsoft. For more information, see "Installing and Using the SQL Server 2000 Driver for JDBC from Microsoft" in Programming WebLogic JDBC.
WebLogic jDriver for Microsoft SQL Server is a pure Java implementation of the Java Database Connectivity (JDBC) API, the industry standard for relational database access from Java clients.It provides Java clients with direct access to Microsoft SQL Server. The driver is available in two versions: one for SQL Server versions 6.5 and 7.0, and another for SQL Server 7.0 only. Both versions function identically, except as noted in the following section, Before You Begin.
Like all Type 4 JDBC drivers, WebLogic jDriver for Microsoft SQL Server is pure Java; it requires no vendor-supported client libraries. WebLogic jDriver for Microsoft SQL Server communicates directly with SQL Server through a TCP/IP network, using the SQL Server Tabular Data Stream protocol, so DB-Library does not have to be installed on a client computer.
This section describes the differences between two versions of WebLogic jDriver for Microsoft SQL Server.
BEA offers two versions of the WebLogic jDriver for Microsoft SQL Server drivers. One version supports Microsoft SQL Server versions 7.0 and 2000 (the default), and the other version supports Microsoft SQL Server version 6.5 and 7.0.
WebLogic jDriver for Microsoft SQL Server Version 7.0 and 2000
This version of the WebLogic jDriver for Microsoft SQL Server is preconfigured with WebLogic Server. You do not need to add any entries to your CLASSPATH to use this driver.
WebLogic jDriver for Microsoft SQL Server Versions 6.5 and 7.0
To use this version of the WebLogic jDriver for Microsoft SQL Server, you must add the path to mssqlserver4v65.jar in your CLASSPATH. For instructions, see Installation Procedure on page 4.
Checking Licensing Functionality
To use WebLogic jDriver for Microsoft SQL Server, you must have the proper license. WebLogic jDriver for Microsoft SQL Server licensing functionality is included in the license file located in the BEA home directory where you installed this WebLogic Server. For example:
c:\bea\license.bea
If your license included WebLogic jDriver for Microsoft SQL Server when you installed or last updated your WebLogic Server license, no further action is required. If you are adding this functionality, you must get an updated license from your BEA sales representative. For instructions to update your license file, see Updating Your license.bea File in Installing BEA WebLogic Server.
Note: If you use WebLogic jDriver for Microsoft SQL Server when WebLogic Server is not running, you must include the path to the folder where license.bea resides in your CLASSPATH.
Microsoft SQL Server is bundled with your WebLogic Server distribution. For Version 7.0 and 2000, the weblogic.jar file includes the Micrososft SQL Server classes. No further steps are required. However, if you are using Version 6.5, you must pre-pend the mssqlserver4v65.jar file in the classpath as follows:
set CLASSPATH=%WL_HOME%\server\lib\mssqlserver4v65.JAR;
%WL_HOME%\server\lib\weblogic.jar;%CLASSPATH%
WebLogic jDriver for SQL Server Connection Properties
If you are using WebLogic jDriver for Microsoft SQL Server with either WebLogic Server or WebLogic Express, you can set up a pool of connections to your SQL Server DBMS that will be established when WebLogic Server is started. Because the connections are shared among users, these connection pools eliminate the overhead of opening a new database connection for each user.
Your application then looks up a DataSource on the JNDI tree and requests a connection from the connection pool. When finished with the database connection, your application returns it to the connection pool.
Configuring a Connection Pool with WebLogic Server
Using the Connection Pool in Your Application
To use a connection pool, you must first establish a database connection. How you establish that connection depends on whether the application in which you want to use the connection pool as a client-side or a server-side application.
To use a connection pool in a client-side application, establish the database connection by looking up a DataSource on the JNDI tree and then requesting a connection. For more information, see Configuring and Using DataSources in Programming WebLogic JDBC.
To use a connection pool in a server-side application (such as a servlet), establish your database connection using a DataSource or by using the WebLogic pool or jts drivers. For more information, see "Programming Tasks" in Programming WebLogic HTTP Servlets.
Verifying Your SQL Server Installation
Note: Verify that you are using version 6.5 or 7.0 of Microsoft SQL Server. Older versions of SQL Server do not properly support JDBC metadata functions and have limited data type support.
To connect to SQL Server, you need the following information:
For Microsoft SQL Server, the default port number is 1433. Servers, however, can be configured to listen on any port number. Verify the port number from your configuration files. If you need help setting the port number, see the following section, "Setting a Port for SQL Server Connections."
Setting a Port for SQL Server Connections
You set the host name and port for SQL Server connections by creating an entry in the SQL Server configuration files. In the configuration files, a logical server name is associated with a server machine name and port number. WebLogic jDriver for Microsoft SQL Server does not use a logical server name; it uses only the host name and the port number.
You must have administrator privileges to change your SQL Server settings. To set the port:
Once you have set the port, you can verify, by using telnet, that the server is listening on that port. Enter the following command:
$ telnet hostname_or_IP_address port
For example, to check whether the SQL Server is listening on port 1433 of a computer named myhost, type:
$ telnet myhost 1433
If the server is not listening on the port, telnet displays an error message. If the server is listening on the port, telnet displays nothing; eventually, the host drops the connection.
You can test your login information by entering the following command:
$ isql -Uusername -Ppassword -Sserver
Verifying the JDBC Driver With dbping
You can use dbping, a WebLogic Java application, to verify that WebLogic jDriver for Microsoft SQL Server can connect to your SQL Server. Use the following commands to set your environment and to execute dbping:
WL_HOME\server\bin\setWLSEnv.cmd
java utils.dbping MSSQLSERVER4 username password
[database@]host[:port]
The arguments in this command line are defined as follows:
For example, the following command pings an SQL Server database called pubs on a computer named myhost, using the default TCP/IP port, the sa login, and a null password:
$ java utils.dbping MSSQLSERVER4 sa "" pubs@myhost
The output from the command includes code that you can use to connect to the database in a Java program.
For detailed instructions for using the dbping utility, see Using the WebLogic Java Utilities in the Administration Guide.
This section provides references to documents and code examples that maybe helpful to you.
For more information about using JDBC and jDrivers with WebLogic Server, see Programming WebLogic JDBC.
WebLogic Server provides several code examples to help you get started. Code examples are located in the SAMPLES_HOME\server\src\examples\jdbc\mssqlserver4 directory, where SAMPLES_HOME is the top-level directory for all samples and examples for the WebLogic Platform (c:\bea\weblogic700\samples, by default).
Using the SQL Server 2000 Driver for JDBC from Microsoft
The Microsoft SQL Server 2000 Driver for JDBC, available from Microsoft's MSDN Web site, is a Type 4 JDBC driver that supports a subset of the JDBC 2.0 Optional Package (see the driver documentation for details). This driver provides JDBC access to SQL Server 2000 through any Java-enabled applet, application, or application server.
The Microsoft SQL Server 2000 Driver for JDBC is available for download to all licensed SQL Server 2000 customers at no charge.
To download the Microsoft SQL Server 2000 Driver for JDBC, go to the Microsoft MSDN Web site and follow the directions on the page.
Installing the Driver on a Windows System
Installing the Driver on a Unix System
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |