View comments | RSS feed

Connecting to Microsoft SQL Server 7.x, 2000

Use the settings in the following table to connect ColdFusion to Microsoft SQL Server 7.x, 2000 data sources:
Setting
Description
CF Data Source Name
The data source name (DSN) used by ColdFusion to connect to the data source.
Database
The database to which this data source connects.
Server
The name of the server that hosts the database that you want to use. If the database is local, enclose the word local in parentheses.
Port
The number of the TCP/IP port that the server monitors for connections.
Username
The user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application does not supply a user name-for example, in a cfquery tag.
Password
The password that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application does not supply a password-for example, in a cfquery tag.
Description
(Optional) A description for this connection.
Select Method
Determines whether server cursors are used for SQL queries.

The Direct method provides more efficient retrieval of data when you retrieve record sets in a forward-only direction and you limit your SQL Server connection to a single open SQL statement at a time. This is typical for ColdFusion applications.
The Cursor method lets you have multiple open SQL statements on a connection. This is not typical for ColdFusion applications, unless you use pooled statements.
Maintain Connections
ColdFusion establishes a connection to a data source for every operation that requires one. Enable this option to improve performance by caching the data source connection.
Timeout (min)
The maximum number of minutes after the data source connection is made that you want ColdFusion to cache a connection after it is used.
Interval (sec)
The time (in seconds) that the server waits between cycles to check for expired data source connections to close.
Disable Connections
If selected, suspends all client connections.
Login Timeout (sec)
The number of seconds before ColdFusion times out the data source connection login attempt.
CLOB
Select to return the entire contents of any CLOB/Text columns in the database for this data source. If unchecked, ColdFusion retrieves the amount specified in the Long Text Buffer setting.
BLOB
Select to return the entire contents of any BLOB/Image columns in the database for this data source. If unchecked, ColdFusion retrieves the amount specified in the Blob Buffer setting.
LongText Buffer (chr)
The default buffer size, used if Enable Long Text Retrieval(CLOB) is not selected. Default is 65000 bytes.
BLOB Buffer (bytes)
The default buffer size, used if Enable binary large object retrieval (BLOB) is not selected. Default is 65000 bytes.
Allowed SQL
The SQL operations that can interact with the current data source.

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6

Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.

Comments


sam@serndesign.com said on Oct 10, 2002 at 9:08 PM :
It would be nice to list the actual JDBC driver used for each (vendor and version).
MikeFusion said on Dec 28, 2002 at 12:07 AM :
If your running SQL Server locally (or using MSDE) use 127.0.0.1 for the server name instead of the actual instance name.
rayafanatico said on Jan 10, 2003 at 1:57 PM :
Hello, is there a way to make the SQL server driver on ColdFusion MX to work with SQL server 6.5 with Windows NT? Or Do I need another driver?

Thanks
michaelkang said on Jan 31, 2003 at 10:03 PM :
I figured out how to connect to MS SQL Server 6.5.
First, create ODBC on a web server.(This ODBC could points to remote SQL Server.)
Second, create data source on the server inside ColdFusion Administrator web page.
(1) Data Source Name: Whatever you want
(2) use ODBC Socket
(3) Click Add
(4) Choose proper ODBC DSN you created in the First Step.
(5) Click Show Advanced Settings
(6) Username: insert proper one
(7) Password: insert proper one
(8) Connection String:
"Driver={SQLServer};Server=XXX.XXX.XXX.XXX;Address=XXX.XXX.XXX.XXX,1433;Network=DBMSSOCN;Database=XXXXX;Uid=XXXXX;Pwd=XXXXX"
(9) make sure that XXX shoulb be replaced with proper ip address, database name, userid, password in the above string.
(10) click submit

Thank you.
Robin Roberts said on Apr 24, 2003 at 6:05 PM :
I cannot get past the following error:
Connection verification failed for data source: Northwind
[]java.sql.SQLException: SQLException occurred in JDBCPool while attempting to connect, please check your username, password, URL, and other connectivity info.
The root cause was that: java.sql.SQLException: SQLException occurred in JDBCPool while attempting to connect, please check your username, password, URL, and other connectivity info.

I have tried many options. Does anyone have a clue? Thanks.
wrend said on Mar 11, 2003 at 2:11 PM :
I have tried this several times, have gone through the steps defined by the docs, and have been unsuccessfull.
HelpMe said on May 13, 2003 at 6:43 PM :
Connection verification failed for data source: OISConn
I am trying to set an ODBC Socket SQL Server and am getting the following message. Can anyone help?

[]java.sql.SQLException: SQLException while attempting to connect: java.sql.SQLException: [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '\'.
The root cause was that: java.sql.SQLException: SQLException while attempting to connect: java.sql.SQLException: [MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '\'.


rhett not butler said on Sep 7, 2003 at 6:42 AM :
connecting to a named instance of sql server 2000 named RHETTXP\RHETTXP DOES NOT work with colfusionMX
the arror is inaccessible but all my other sql tools work. even a odbc system data source works fine with RHETTXP\RHETTXP
WHY does NOT this work with macormediaMX server.

I am using server administrator to create a data source
No screen name said on Oct 24, 2003 at 1:15 AM :
this is what I'm getting I have try different options many times but no success

Connection verification failed for data source: movie_dns
[]java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
The root cause was that: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
Terry Reiber said on Nov 7, 2003 at 3:55 PM :
I think its quite pathetic that Macromedia doesn't supply some basic documentation that tells you how to connect to the NorthWind database.

I mean, lets face it, ms sql 2000 is probably the most common server used.

I have yet to find anyone on the internet that can give me the basic settsing for both Enterprise Server and ColdFusion administration to do this task.

Is it just the companies want paid support calls?
jrunrandy said on Nov 10, 2003 at 7:01 AM :
See http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/dataso12.htm#wp1238785 for Terry's answer to the Northwinds question.
No screen name said on Nov 14, 2003 at 8:41 AM :
I'm having trouble connecting to a data source of a local innstance of SL Server. I get the message:
Connection verification failed for data source: FAD_RAD
[]java.sql.SQLException: SQLException occurred in JDBCPool while attempting to connect, please check your username, password, URL, and other connectivity info.
The root cause was that: java.sql.SQLException: SQLException occurred in JDBCPool while attempting to connect, please check your username, password, URL, and other connectivity info.
I'm running on XP pro. On a differen machine using windows server 2000 I have been successful but now that connection has failed and cannot be re-established. I have followd the insrtuctions on how to make the connection and now I need some information on trouble shooting the issue,
thanks
jrunrandy said on Nov 14, 2003 at 8:38 AM :
We're sorry, but LiveDocs is for documentation comments only. It is not a source for product support. Please post your issue to the online forums: http://webforums.macromedia.com/coldfusion/

Also, to help us communicate with you better, please use a valid e-mail address when registering with macromedia.com.
jrunrandy said on Nov 22, 2004 at 5:08 AM :
I asked a QA engineer about the "Connection Refused" error message, and this is what he said:
*******
Two things come immediately to mind:

1. They are running SQLServer on W2K Pro (max 10 connections) instead of on W2K Server, and this request is the 11th TCP/IP connection.

2. They have a connection-limited license for SQLServer - and CF is requesting an additional connection beyond their limit.

Both of these problems can be surmounted by setting the Datasource [Limit Connections] and [Restrict connections to] settings in CF Admin (taking into account any other connections which may be present.
*******
No screen name said on Dec 7, 2004 at 7:04 AM :
The root cause was that: java.sql.SQLException: SQLException occurred in JDBCPool while attempting to connect, please check your username, password, URL, and other connectivity info.
No screen name said on Dec 13, 2004 at 9:08 AM :
Hello,

I had this problem (Error establishing socket., WXP SP2)

I uninstalled SP2: it works fine now.
tferring said on Dec 20, 2004 at 9:38 PM :
I had the same socket problem:
**********
[]java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
**********
I used a few methods mentioned and resolved my problem
MY FIX:
1. I changed the port on the SQL Server-Properties-Network Configuration-Highlight TCP/IP and click Properties- Set the Port to 8433.
2. Click OK
3. RESTART SQL
4. Go to ColdFusion Administrator
5. Use the SQL Northwind database, set the Server to 127.0.0.1, use the ColdFusion Login and password.

6. Set the Server to 127.0.0.1
7. Create a SQL Login user
a. Expand SQL Server instance – in my case it was (local)
b. Expand Security tab
c. Right—Click and select New Login
d. Create a new Login called “ColdFusion”(any name will do) and set the password Triton45%$God
e. Set all the Server Roles and Database Access
This worked for me...
jwlewisii said on Jan 13, 2005 at 5:14 AM :
I was getting the same error: "Connection Refused" and noticed that there have been a number of solutions. After trying everyone else's suggestions unsuccessfully - I evaluated my software versions and this is what worked for me:

1. This may not have been necessary - but I uninstalled CF.

2. MS - SQL 2000 is running on Server 2003. I updated the SQL software to service pack 3a. http://www.microsoft.com/sql/downloads/default.asp

3. Then, I updated the SQL SP3 type 4 JDBC driver from Microsoft. http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en

4. I then reinstalled CF server.

I am sure that I could have just updated the driver and been done with it, but was a little desperate.

5. I followed TFerring's steps to create SQL user for the CF user and pass:
"6. Set the Server to 127.0.0.1
7. Create a SQL Login user
a. Expand SQL Server instance – in my case it was (local)
b. Expand Security tab
c. Right—Click and select New Login
d. Create a new Login called “ColdFusion”(any name will do) and
set the password Triton45%$God
e. Set all the Server Roles and Database Access "

All this is assuming that the SQL properties are set to accept both SQL users as well as Windows users for the particular system the server is running on. With the new updates in place, I was able to run the connection on the default port .
Guru_HUITZILOPOCHTLI said on Feb 26, 2005 at 2:01 PM :
I had the same problem connecting a local msde. I found that msde does not start it's tcp/ip service by default and I had to go in and start the service and restart the msde.
No screen name said on Mar 9, 2005 at 3:59 PM :
When I try to establish a DSN connection via the Administrator, I am greeted with the following message:

Connection verification failed for data source: ows
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Could not establish a connection using integrated security: No LoginModules configured for JDBC_DRIVER_01
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Could not establish a connection using integrated security: No LoginModules configured for JDBC_DRIVER_01

Does anyone have any friendly advice? This has become a 3+ hour uphill battle now....thanks!!
jrunrandy said on Mar 14, 2005 at 1:34 PM :
The Troubleshooting discussion in the CFMX 7 documentation has suggestions that might apply to you.

http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001743.htm
No screen name said on Mar 18, 2005 at 12:47 AM :
How to connect MSDE 2000 (SQL Server 2000 Desktop Edition) to ColdFusion 6.1 via the ColdFusion administrator?
niko1 said on Mar 19, 2005 at 7:33 PM :
I know this area is not for support but I think most people will find they can solve this issue by updating MS SQL DBNETLIB.dll. All you have to do is download the MS SQL update tool. I have bloged this information there:


http://www.robisen.com/index.cfm?mode=entry&entry=BE1AB594-55DC-F2B1-F392552E0A41542A
JRowny said on Jul 15, 2005 at 5:44 PM :
For those of you who get the error connecting to socket.
I found that my SQL Server (MSDE SP4) actually didn't have the TCP/IP configured at all. All I needed to do was go to properties-> network configuration -> enable TCP/IP and then restart the service.
Swathi_Sathish said on Sep 23, 2005 at 5:55 AM :
I faced the same problem today and have been trying various solutions that were given online. Then decided to do something on my own. Just went into CFMX Admin and for all of my SQLServer Datasource Mappings, I just went into the advanced settings and limited the number of connections to just 1. Then stopped the CFMX Server. Next step went into the Enterprise Manager and Selected on my local SQLServer->Properties. There U have an option to set the number of parallel connections. I increased it to 20. U can increase it to UR limit. Then stop the MSSQLServer. Restart MSSQLServer and then restart CFMX Server. Go into Datasources and do a verify all connections and it should all be OK. I even tried restartign my Workstation about 4-5 times. It did not work but this method worked. I dunno how but it worked for me and i hope it does work for U as well.
No screen name said on Feb 5, 2006 at 2:04 AM :
if you are using Windows 2003 server and CF MX 7 and MS SQL Server 2000 and get the error message

Error establishing socket. Connection refused: connect

SQLCritUpdPkg.exe file from Microsoft's website (mentioned by robison above)

unzip / install the above package , a folder named SQLCritUpdPkg will be created on your C drive with other folders in it.

from SQLCritUpd folder install SQLHotfix_ENU.exe and proceed with datasource creation in CF MX Administration
No screen name said on Jun 2, 2006 at 8:29 AM :
All the related topics above lead to case sensitive issues. Make sure that the datasources' names are exactly the way it is displayed in Enterprise Manager. I hope this helps.
No screen name said on Jul 17, 2006 at 10:39 AM :
If you get an error like the following and are running MS SQL Server 2000:

Connection verification failed for data source: blogcfcsql []java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect

Then, your problem can most likely be solved by installing MS SQL Server 2000 Service Pack 4. Somehow, it seems like it has something to do with OLAP engine.

Hope this helps...
Christian Gayton said on Oct 31, 2006 at 8:57 AM :
SQL Security Tools seems to be the solution
http://www.microsoft.com/downloads/details.aspx?familyid=9552d43b-04eb-4af9-9e24-6cde4d933600&displaylang=en
Worked for me with CFMX 7.02 and SQL 200 sp3a
HTH
Christian

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6/Administering_ColdFusion_MX/datasources_ADV_MJS8.htm