Connect to Microsoft SQL Server database

If you run ColdFusion on a Windows NT or a UNIX platform, you can configure Microsoft SQL Server as a data source. To complete the connection:

  1. Select options as described in the Windows NT or UNIX table.  For the steps involved in configuring your data source, see Configure ODBC data sources.

 

Windows NT

Field

Description

Default

Data Source Name

This field displays the name that you entered on the main Data Sources page. You can edit it here.

Filled

Description

Enter a brief description about the data source.

Blank

Server

Enter the name of the server that hosts the database that you want to use. If the database is local, enclose the work local in parentheses: (local).

Blank

Use Trusted Connection

This option allows SQL Server to authenticate users based on their Windows NT logins. You can enable this option if the SQL Server database uses an Integrated or Mixed security mode.

 

Integrated security uses Windows NT authentication connection schemes. Only users with trusted connections can connect to the SQL server. You do not have to enter a username and password, as the server ignores them. A trusted connection means that users connect to the database as a ColdFusion service user, not as a ColdFusion runtime user.

 

Mixed security allows trusted and nontrusted connections. If you leave the username and password blank, then the SQL Server uses Windows NT domain credentials. If you enter a users and password, the SQL Server attempts to authenticate users with this login information.

Blank

Login Info/Database

Enter the name of the SQL Server database.

Blank

Login Info/Language

From the drop-down list, select the national language used by the SQL Server.

Default

Generate Stored Procedure for Prepared Statement

Enable this option to have the SQL Server driver create stored procedures for prepared statements. The SQL Server driver prepares a statement by placing it in a procedure and compiling that procedure.

Enabled

Translation/Convert OEM to ANSI characters

Enable this option if the SQL Server client computer and the SQL Server use the same non-ANSI character set. For example, if the SQL Server uses code page 850 for the OEM code page, this option ensures that extended characters stored in the database convert properly to ANSI for use by Windows-based applications.

Enabled

 

 

 

 

UNIX

Field

Description

Default

Data Source Name

This field displays the name that you entered on the main Data Sources page. You can edit it here.

Filled

Description

Enter a brief description about the data source.

Blank

Database Name

Enter the name of the database to which you want to connect.

Blank

Server IP Address

Enter the IP Address of the server that contains the SQL database you want to access.

Blank

Server Port

Enter the number of the TCP/IP port to that the server monitors for connections.

Blank

Create Stored Procedures

This setting determines whether stored procedures should be created on every call, only if parameters are specified, or never.

 

 

 

  1. Click Create to save the configuration.

Related topics