连接到服务器Connecting to the Server

下载下载 PHP 驱动程序DownloadDownload PHP Driver

本部分中的主题介绍使用 Microsoft Drivers for PHP for SQL ServerMicrosoft Drivers for PHP for SQL Server 连接到 SQL ServerSQL Server 的选项和过程。The topics in this section describe the options and procedures for connecting to SQL ServerSQL Server with the Microsoft Drivers for PHP for SQL ServerMicrosoft Drivers for PHP for SQL Server.

Microsoft Drivers for PHP for SQL ServerMicrosoft Drivers for PHP for SQL Server 可以使用 Windows 身份验证或使用 SQL Server 身份验证连接到 SQL ServerSQL ServerThe Microsoft Drivers for PHP for SQL ServerMicrosoft Drivers for PHP for SQL Server can connect to SQL ServerSQL Server by using Windows Authentication or by using SQL Server Authentication. 默认情况下, Microsoft Drivers for PHP for SQL ServerMicrosoft Drivers for PHP for SQL Server 尝试使用 Windows 身份验证连接到服务器。By default, the Microsoft Drivers for PHP for SQL ServerMicrosoft Drivers for PHP for SQL Server try to connect to the server by using Windows Authentication.

本节内容In This Section

主题Topic 说明Description
如何:使用 Windows 身份验证进行连接How to: Connect Using Windows Authentication 介绍如何使用 Windows 身份验证建立连接。Describes how to establish a connection by using Windows Authentication.
如何:使用 SQL Server 身份验证进行连接How to: Connect Using SQL Server Authentication 介绍如何使用 SQL Server 身份验证建立连接。Describes how to establish a connection by using SQL Server Authentication.
如何:使用 Azure Active Directory 身份验证进行连接How to: Connect Using Azure Active Directory Authentication 介绍如何设置身份验证模式并使用 Azure Active Directory 标识进行连接。Describes how to set the authentication mode and connect using Azure Active Directory identities.
如何:在指定端口上连接How to: Connect on a Specified Port 介绍如何在指定端口上连接到服务器。Describes how to connect to the server on a specific port.
连接池Connection Pooling 提供有关驱动程序中的连接池的信息。Provides information about connection pooling in the driver.
如何:禁用多个活动的结果集 (MARS)How to: Disable Multiple Active Resultsets (MARS) 介绍如何在建立连接时禁用 MARS 功能。Describes how to disable the MARS feature when making a connection.
连接选项Connection Options 列出在包含连接属性的关联阵列中允许的选项。Lists the options that are permitted in the associative array that contains connection attributes.
支持 LocalDBSupport for LocalDB 介绍对 LocalDB 功能的 Microsoft Drivers for PHP for SQL ServerMicrosoft Drivers for PHP for SQL Server 支持,该支持已在 SQL Server 2012 (11.x)SQL Server 2012 (11.x) 中添加。Describes Microsoft Drivers for PHP for SQL ServerMicrosoft Drivers for PHP for SQL Server support for the LocalDB feature, which was added in SQL Server 2012 (11.x)SQL Server 2012 (11.x).
支持高可用性、灾难恢复Support for High Availability, Disaster Recovery 讨论如何配置应用程序以利用 SQL Server 2012 (11.x)SQL Server 2012 (11.x) 中添加的高可用性和灾难恢复功能。Discusses how your application can be configured to take advantage of the high-availability, disaster recovery features added in SQL Server 2012 (11.x)SQL Server 2012 (11.x).
连接到 Microsoft Azure SQL 数据库Connecting to Microsoft Azure SQL Database 讨论如何连接到 Azure SQL 数据库。Discusses how to connect to an Azure SQL Database.
连接复原Connection Resiliency 讨论重建断开连接的连接复原功能。Discusses the connection resiliency feature that reestablishes broken connections.

另请参阅See Also

Microsoft Drivers for PHP for SQL Server 编程指南Programming Guide for the Microsoft Drivers for PHP for SQL Server

示例应用程序(SQLSRV 驱动程序)Example Application (SQLSRV Driver)