将 RDS 与 ODBC 连接池结合使用

适用于:Access 2013、Office 2013

如果您使用的是 ODBC 数据源,则可以在 Internet 信息服务 (IIS) 中使用连接池选项来实现对客户端负载的高性能处理。 连接池是用于连接的资源管理器,可维护常用连接的打开状态。

若要启用连接池,请参考 Internet 信息服务文档。

请注意,启用连接池可能会使 Web 服务器受到其他限制,如Microsoft Internet Information Services文档中所述。

为了确保连接池稳定且提供额外的性能提升,必须将 Microsoft SQL Server 配置为使用 TCP/IP 套接字网络库。

为此,您需要执行下列操作:

  • 将 SQL Server 计算机配置为使用 TCP/IP 套接字。

  • 将 Web 服务器配置为使用 TCP/IP 套接字。

将 SQL Server 计算机配置为使用 TCP/IP 套接字

在 SQL Server 计算机上运行 SQL Server 安装程序,以便与数据源交互时使用 TCP/IP 套接字网络库。

在 SQL Server 计算机上指定 TCP/IP 套接字网络库

在 Microsoft SQL Server 6.5 中:

  1. From the Start menu, point to Programs, point to Microsoft SQL Server 6.5, and then click SQL Setup.

  2. 单击“继续”两次。

  3. “Microsoft SQL Server - 选项”对话框中,选择“更改网络支持”,然后单击“继续”。

  4. 请确保“TCP/IP 套接字”复选框处于选中状态,然后单击“确定”。

  5. 单击“继续”完成操作,然后退出安装程序。

在 Microsoft SQL Server 7.0 中:

  1. From the Start menu, point to Programs, point to Microsoft SQL Server 7.0, and then click Server Network Utility.

  2. 在该对话框的“常规”选项卡上,单击“添加”。

  3. “添加网络库配置”对话框中,单击“TCP/IP”。

  4. “端口号”和“代理地址”框中,输入网络管理员提供的端口号和代理地址。

  5. 单击“确定”完成操作,然后退出安装程序。

将 Web 服务器配置为使用 TCP/IP 套接字

可通过两个选项将 Web 服务器配置为使用 TCP/IP 套接字。 你执行的操作取决于是从 Web 服务器访问所有 SQL Server,还是仅从 Web 服务器访问特定的SQL Server。

如果从 Web 服务器访问所有 SQL Server,则需要在 Web 服务器计算机上运行 SQL Server 客户端配置实用工具。 以下步骤更改从此 IIS Web 服务器建立的所有SQL Server连接的默认网络库,以使用 TCP/IP 套接字网络库。

配置 Web 服务器 (所有 SQL Server)

在 Microsoft SQL Server 6.5 中:

  1. From the Start menu, point to Programs, point to Microsoft SQL Server 6.5, and then click SQL Client Configuration Utility.

  2. 单击“网络库”选项卡。

  3. “默认网络”框中,选择“TCP/IP 套接字”。

  4. 单击“完成”保存所做的更改并退出该实用工具。

在 Microsoft SQL Server 7.0 中:

  1. From the Start menu, point to Programs, point to Microsoft SQL Server 7.0, and then click Client Network Utility.

  2. 单击“常规”选项卡。

  3. “默认网络库”框中,单击“TCP/IP”。

  4. 单击“确定”保存更改并退出该实用工具。

如果从 Web 服务器访问特定SQL Server,则需要在 Web 服务器计算机上运行 SQL Server 客户端配置实用工具。 若要更改特定SQL Server连接的网络库,请在 Web 服务器计算机上配置 SQL Server 客户端软件,如下所示。

(特定SQL Server) 配置 Web 服务器

在 Microsoft SQL Server 6.5 中:

  1. From the Start menu, point to Programs, point to Microsoft SQL Server 6.5, and then click SQL Client Configuration Utility.

  2. 单击“高级”选项卡。

  3. “服务器”框中,键入要使用“TCP/IP 套接字”连接到的服务器的名称。

  4. In the DLL Name box, select TCP/IP Sockets.

  5. Click Add/Modify. 现在,指向此服务器的所有数据源都将使用 TCP/IP 套接字。

  6. 单击“完成”。

在 Microsoft SQL Server 7.0 中:

  1. From the Start menu, point to Programs, point to Microsoft SQL Server 7.0, and then click Client Configuration Utility.

  2. 单击“常规”选项卡。

  3. Click Add.

  4. Enter the alias of the server in the Server alias box. 在“网络库”框中,单击“TCP/IP”。 在“计算机名”框中,输入侦听 TCP/IP 套接字客户端的计算机的计算机名。 在“端口号”框中,输入 SQL Server 在其上进行侦听的端口。

  5. 单击“确定”,然后再次单击“确定”退出该实用工具。