Download the driver from Microsoft. http://www.microsoft.com/downloads/details.aspx?familyid=e22bc83b-32ff-4474-a44a-22b6ae2c4e17&displaylang=en
Last updated on
Apr 27, 2021
This TechNote describes how to configure ColdFusion MX to use the Microsoft SQL Server 2005 JDBC Driver to connect to a Microsoft SQL Server 2005 database. This driver is distributed by Microsoft and is available at no charge in localized versions for Windows and Linux/Unix.
Configuring ColdFusion MX to use the Microsoft SQL Server 2005 JDBC Driver
-
-
Install the driver. The default Windows installation location is C:\Program Files\Microsoft SQL Server 2005 Driver for JDBC.
-
Add the sqljdbc.jar to the Java classpath:
- For Server and Multiserver configurations:
- Access the ColdFusion Administrator "Java and JVM" page.
- Add the full path to the sqljdbc.jar to the Class Path field. For example, the default on Windows is C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.0\enu\sqljdbc.jar on Windows platforms.
- Click Submit Changes to update Java and JVM Settings for ColdFusion MX.
- Restart the ColdFusion MX Application Server service. Note: On Linux/Unix platforms, from the cf_root/runtime/bin directory, run coldfusion restart.
- For J2EE configurations, consult your server's documentation for properly adding the sqljdbc.jar to the classpath.
- For Server and Multiserver configurations:
-
Use the ColdFusion Administrator Data Sources page to add a new data source for the Microsoft JDBC driver:
For example:-
Name the data source ps_db where it will connect to the server named ps-db where MicrosoftSQL Server resides.
-
Select Other in the driver field to tell ColdFusion you will describe another type of driver.
-
Click Add to add the data source and display the default driver window for this driver.
-
-
Enter the following in the JDBC URL field:
jdbc:sqlserver:// ps-db : 1433 ;DatabaseName= NorthWind
Where ps-db is the name of the database server.
Where 1433 is the port number for the data source connection.
Where NorthWind is the database you are connecting to.
Note: The information in this field is case-sensitive. -
Enter the following in the Driver Class field:
com.microsoft.sqlserver.jdbc.SQLServerDriver
Note: The information in this field is case-sensitive. -
Enter a valid username and password in the Username and Password fields.
Where the username and password are defined as user account information on the database server. -
(Optional) Enter the name of the driver in the Driver Name field.
-
Click Submit to apply the changes to the data source.
Additional Information
- ColdFusion MX: Configuring the Microsoft SQL Server 2000 JDBC driver
- ColdFusion MX: Trailing space in Driver Class field causes data source verification failure (18612)
- ColdFusion MX: Configuring the Sybase jConnect 5.5 driver (18591)
- ColdFusion MX: Enabling a JDBC data source for PostgreSQL (18338)
- ColdFusion MX: Configuring the Oracle JDBC thin driver (18344)