将ColdFusion连接到SQL Server数据库实例 [英] Connect ColdFusion to SQL Server database instance

查看:316
本文介绍了将ColdFusion连接到SQL Server数据库实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ColdFusion 9中尝试连接到SQL Server(2008)数据库实例,但在CF管理员中没有在哪里放置实例名称。我可以使用一个连接字符串像这样:

I am trying to connect to a SQL server (2008) database instance in ColdFusion 9 but there is no where to put an instance name in the CF administrator. I can get in with .net using a connection string like so:

Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;
Password=myPassword;

有一个地方可以在ColdFusion中输入连接字符串,但我似乎不能连接到正确的实例(似乎连接到默认实例)。有没有办法在管理员中将ColdFusion连接到SQL Server数据库实例?

There is a place to enter a connection string in ColdFusion but I don't seem to be able to connect to the right instance (it seems to connect to the default instance). Is there a way to connect ColdFusion to a SQL Server database instance in the administrator?

推荐答案

ColdFusion的沙盒安全,那么您可以在ColdFusion管理员的数据源定义的服务器字段中指定实例名称。正如你所提到的,你只需要指定 myServerName\myInstanceName 。但... ...

If you are NOT using ColdFusion's sandbox security then you can specify the instance name in the server field of the datasource definition in the ColdFusion administrator. As you mentioned, you would just specify myServerName\myInstanceName. But...

如果您使用ColdFusion的沙箱安全,那么这将不起作用。我有同样的问题,当我升级到ColdFusion 9,从来没有找到一个解决方案。我在Adobe输入了一个错误: ColdFusion 9.0.1 Bug 84928 <

If you are using ColdFusion's sandbox security then that will not work. I had this same issue when I upgraded to ColdFusion 9 and never did find a resolution. I entered a bug at Adobe for it: ColdFusion 9.0.1 Bug 84928 It has since been closed as "Deferred" with the reason "Not Enough Time".

我发现使用ColdFusion的沙盒安全时出现了连接问题,因为它已经被关闭为Deferred,原因是不够时间。禁用它,数据源将使用上面指定的实例名称。启用它,同一连接将失败。

I found that the connection issue arose when using ColdFusion's sandbox security. Disable it and the datasource will work with the instance name specified per above. Enable it and that same connection will fail.

为了解决这个问题,您需要在服务器名称字段中指定数据库服务器(不带实例名称),并为指定的端口指定端口号实例在端口号字段中。详情请参阅错误。

In order to get around the bug you need to specify the database server only (without the instance name) in the server name field and specify the assigned port number for the named instance in the port number field. See the bug for full details.

这篇关于将ColdFusion连接到SQL Server数据库实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆