外文翻译--如何解决 SQL Server 2000 中的连接问题_第1页
外文翻译--如何解决 SQL Server 2000 中的连接问题_第2页
外文翻译--如何解决 SQL Server 2000 中的连接问题_第3页
外文翻译--如何解决 SQL Server 2000 中的连接问题_第4页
外文翻译--如何解决 SQL Server 2000 中的连接问题_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

附录 B 外文文献 How to troubleshoot connectivity issues in SQL Server 2000 Chris Tull, Microsoft Help and Support This article can help you to resolve connectivity problems with Microsoft SQL Server 2000. This article contains descriptions of common connectivity problems and the steps that you can take to help resolve your connectivity problems. SQL Server 2000 supports several methods of communication between the instance of SQL Server and the client applications. If your client application and the instance of SQL Server reside on the same computer, Microsoft Windows interprocess communication (IPC) components, such as local named pipes or the Shared Memory protocol, are used to communicate. However, when the client application and the instance of SQL Server reside on different computers, a network IPC, such as TCP/IP or named pipes, is used to communicate. SQL Server 2000 uses Net-Library, a DLL, to communicate with a particular network protocol. A matching pair of Net-Libraries must be active on the client computer and the server computer to support the network protocol that you want to use. For example, if you want to enable a client application to communicate with a specific instance of SQL Server across TCP/IP, the client TCP/IP Sockets Net-Library (Dbnetlib.dll) must be configured to connect to the server on the client computer. Likewise, the server TCP/IP Sockets Net-Library (Ssnetlib.dll) must listen on the server computer. In this scenario, the TCP/IP protocol stack must be installed on both the client computer and the server computer. After you install SQL Server 2000, you can configure the properties of the client Net-Libraries by using Client Network Utility. You can configure the properties of the server Net-Libraries by using Server Network Utility (Svrnetcn.exe). The server Net-Libraries are installed during the installation of the server tools in SQL Server Setup. However, some of the server Net-Libraries may not be active. By default, SQL Server 2000 enables and listens on TCP/IP, named pipes, and Shared Memory. Therefore, for a client to connect to a server computer, the client must connect by using a client Net-Library that matches one of the server Net-Libraries that is currently being used by the instance of SQL Server. For additional information about SQL Server communication components and Net-Libraries, see the following topics in SQL Server Books Online: Communication Components Client and Server Net-Libraries Managing Clients Troubleshoot connectivity issues Most of the connectivity issues that you may notice in SQL Server 2000 occur because of problems with TCP/IP, Windows authentication, or a combination of TCP/IP and Windows authentication. Important Before you start to troubleshoot connectivity issues in SQL Server 2000, make sure that the MSSQLServer service is started on the computer that is running SQL Server. Verify your DNS settings The name resolution process in Domain Name System (DNS) is used to resolve the IP address to the name of the instance of SQL Server. If the name resolution process does not work correctly, the instance of SQL Server is not reachable, and you may receive one or more of the following error messages: SQL Server does not exist or access denied General Network Error Cannot Generate SSPI Context To verify that the name resolution process is resolving the correct server, you can ping the server by using the server name and the IP address of the server. To do so, follow these steps: 1. Click Start, and then click Run. 2. In the Run dialog box, type cmd in the Open box, and then click OK. 3. At the command prompt, run the following command: ping Note the IP address that is returned. 4. At the command prompt, run the following command (where IP address is the IP address that you noted in step 3): ping a Verify that the command resolves to the correct server name. If either of the specified commands are not successful, time out, or do not return the correct values, the DNS lookup is not working correctly or the problem occurs because of other networking or routing issues. To see your current DNS settings, run the following command at a command prompt: ipconfig /all To work around this problem, add an entry for the server to the %systemroot%system32d- riversetchosts file on the client computer. You can also work around the problem by connecting to the server by using the Named Pipes Net-library. Verify the enabled protocols and aliases Connectivity problems may occur if the alias on the client computer is set incorrectly. You can view the aliases by using Client Network Utility. To do so, follow these steps: 1. Start Client Network Utility. If the SQL Server client tools are installed on the computer that is running the client application, follow these steps to start Client Network Utility: a. Click Start, and then point to Programs. b. Point to Microsoft SQL Server, and then click Client Network Utility. If the SQL Server client tools are not installed on the client computer, follow these steps to start Client Network Utility: a. Click Start, and then click Run. b. In the Run dialog box, type cliconfg in the Open box, and then click OK. 2. In the SQL Server Client Network Utility window, click the General tab, and then enable all the protocols that you want to use. Note You must at least enable the TCP/IP protocol and the named pipes protocol. 3. Click the Alias tab, and then verify the aliases that are configured for the instance of SQL Server. 4. Verify the properties of the aliases to make sure that the server name or IP address and the protocol are configured correctly. You can create a new alias to test the connectivity by using the server name, the IP address, or even by using a different protocol. Note Earlier versions of Microsoft Data Access Components (MDAC) have a different user interface for Client Network Utility. Therefore, if you do not see the options that are listed in this article, install a later version of MDAC on the computer that is running the client application. Verify that the instance of SQL Server is listening correctly To verify that the instance of SQL Server is listening on named pipes, TCP/IP, or another protocol that you are using at the client application, open the current SQL Server error log file. The SQL Server error log file may contain entries that are similar to the following: 2003-11-06 09:49:36.17 server SQL server listening on TCP, Shared Memory, Named Pipes. 2003-11-06 09:49:36.17 server SQL server listening on 192.168.1.5:1433, 127.0.0.1:1433. If you analyze the entries in the SQL Server error log file, you can verify that the instance of SQL Server is listening on the correct IP address and on the correct port. By default, a default instance of SQL Server listens on the port 1433. You can also use Server Network Utility to verify the protocol settings for SQL Server and to change the properties in SQL Server, including the protocols that can connect to SQL Server and the ports that can be used. For more information about using Server Network Utility, see the SQL Server Network Utility topic in SQL Server Books Online. Sometimes, SQL Server 2000 may not bind to port 1433 or any other specified port. This problem may occur if the port is being used by another application or if you are trying to connect by using an IP address that is not correct. Therefore, the TCP/IP connections to SQL Server may not be successful and you may receive the following error message in the SQL Server error log file: 2001-11-14 15:49:14.12 server SuperSocket Info: Bind failed on TCP port 1433.If you cannot connect to the instance of SQL Server by using a TCP/IP connection, try to use the named pipes protocol or the Shared Memory protocol. Run the following command at a command prompt to obtain information about the ports that are in use: NETSTAT an You can also use the Portqry command-line utility to obtain more information about the ports that are in use. Note For named instances of SQL Server, SQL Server dynamically determines the port and listens on the determined port. Therefore, when you start the named instance of SQL Server, SQL Server tries to listen on the port that was previously being used. If SQL Server cannot bind to that port, the named instance may dynamically bind to a different port. In that situation, make sure that the client application is also set to determine the port dynamically. Alternatively, you can also specify a static port for the named instance to bind to and to listen on by using Client Network Utility. Troubleshoot MDAC Issues Connectivity problems may also occur because of problems with MDAC. For example, a software installation may overwrite some of the MDAC files or change the permissions that you must have to access the MDAC files. You can run the MDAC Component Checker to verify the MDAC installation on your computer. Note If you are connecting to a named instance of SQL Server, make sure that you are running MDAC 2.6 or later on your computer. Earlier versions of MDAC do not recognize named instances of SQL Server. Therefore, connections to named instances may not be successful. You can use the Odbcping.exe utility to verify connections through the SQL Server ODBC driver. You can also test connectivity to the instance of SQL Server by using a .udl file. Troubleshoot firewall issues If firewall exists between the client computer and the computer that is running SQL Server, make sure that the ports that are required to communicate through the firewall are open. If you use the TCP/IP protocol to connect to the instance of SQL Server, make sure that you can use the Telnet program to connect to the port where SQL Server is listening. To use the Telnet program, run the following command at a command prompt: Telnet If the Telnet program is not successful and you receive an error message, resolve the error and then try to connect again. Note Because of issues that were caused by the Slammer virus, the User Datagram Protocol (UDP) port 1434 may be blocked on your firewall. Troubleshoot authentication and security issues Connections to SQL Server may not be successful because of authentication failures. If the authentication fails, you may receive one of the following error messages: Login failed for user Login failed for user NTAUTHORITYANONYMOUS LOGON Login failed for user null If you receive an error message because of an authentication failure and the error message does not mention a specific SQL Server login name, troubleshoot the problem with Windows authentication. You may receive the following error message because of problems with Windows authentication: Cannot generate SSPI Context The following problems may cause authentication and security issues: Problems occur with NTLM authentication or with Kerberos authentication. The domain controller cannot be contacted because of connectivity issues. Problems occur with trust relationships across domains. For more information about possible causes, see the event logs on the computer. To work around connectivity problems with Windows authentication, you can use SQL Server Authentication to connect to the instance of SQL Server. If the connection is not successful when you use SQL Server Authentication, you receive the following error message: Login failed for user . Not associated with a trusted connection To troubleshoot this problem, follow these steps. Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk. 1. Make sure that the instance of SQL Server is configured to use Windows authentication and SQL Server Authentication. To do so, make sure that the following registry keys are on the computer that is running SQL Server. For the default instance of SQL Server: HKEY_LOCAL_MACHINESoftwareMicrosoftMSSQLServerMSSQLServerLoginMode For the named instance of SQL Server: HKEY_LOCAL_MACHINESoftwareMicrosoftMicrosoft SQL ServerMSSQLServerLoginMode Make sure that the following registry key values are set: Authentication type Value Windows authentication only 1 Mixed mode (SQL Server Authentication and Windows authentication) 2 Note If you make any changes to the registry, you must stop and then restart the instance of SQL Server for the changes to take effect. 2. Try to connect to the instance of SQL Server by using different Windows accounts or SQL Server login accounts. This can help determine if the connection is not successful because of problems with a particular login account. For example, the password of the login account may have been changed. 3. Try to connect to the instance of SQL Server by using different protocols. For example, the connections that use the TCP/IP protocol with Windows authentication may not be successful, but connections that use the named pipes protocol with Windows authentication may be successful. If you are using certificates, you may receive a Secure Sockets Layer (SSL) security error message when you try to connect to the instance of SQL Server. Troubleshoot stress on TCP/IP sockets When you use the SQL Server ODBC driver, the Microsoft OLE DB Provider for SQL Server, or the System.Data.SqlClient managed provider, you can disable connection pooling by using the appropriate application programming interfaces (APIs). When you disable connection pooling and your application frequently opens and closes connections, the stress on the underlying SQL Server network library may increase. Sometimes, the Web servers and the JDBC drivers may also try to connect to the instance of SQL Server. Therefore, the increase in connection requests to SQL Server may be more than SQL Server can handle. This may stress the TCP/IP sockets, and you may receive the following error message in the SQL Server error log file: 2003-08-07 20:46:21.11 server Error: 17832, Severity: 20, State: 6 2003-08-07 20:46:21.11 server Connection opened but invalid login packet(s) sent. Connection closed. For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base: 154628 INF: SQL logs 17832 with multiple TCPIP connection requests 328476 TCP/IP settings for SQL Server drivers when pooling is disabled Note You may not notice the stress on TCP/IP sockets if you are running SQL Server 2000 SP3 or SQL Server 2000 SP3a because a limit on the number of login packets was added. The 17832 error occurs when you use third-party drivers to connect to the instance of SQL Server. To resolve this problem, contact the third-party vendor and obtain drivers that have been tested to work with SQL Server 2000 SP3 and SQL Server 2000 SP3a. See if the instance of SQL Server is started in single-user mode If the instance of SQL Server that you are trying to connect to is started in single-user mode, only one connection can be established with SQL Server. If you have software running on your computer that automatically connects to SQL Server, the software can easily use the only connection. For example, the following software can automatically connect to the instance of SQL Server: SQL Server Agent Third-party backup software Third-party monitoring software Third-party virus software Microsoft Internet Information Services (IIS) SQL Server Enterprise Manager The client application that is trying to connect to the instance of SQL Server receives the following error message: SQL Server does not exist or Access Denied This error generally occurs during SQL Cluster Setup and service pack setup when the setup process starts the instance of SQL Server in single-user mode. The specified applications may automatically connect to the instance of SQL Server using the only available connection, and setup is not successful. To determine if the instance of SQL Server has been started in single-user mode, check to see if the SQL Server error log file has an entry that is similar to following: 2003-07-31 11:26:43.79 spid3 Warning * 2003-07-31 11:26:43.80 spid3 SQL Server started in single user mode. Updates allowed to system catalogs. Verify named pipes connectivity to SQL Server If you cannot connect to the instance of SQL Server by using named pipes, make sure that the instance of SQL Server is configured to accept named pipes connections. Troubleshoot connections that time out during the recovery process Every time that you start an instance of SQL Server, SQL Server recovers each database. During this recovery process, SQL Server rolls back the transactions that are not committed. SQL Server also rolls forward the transactions that are committed and the changes that were not written to the hard disk when the instance of SQL Server was stopped. When the recovery process is complete, SQL Server logs the following message in the SQL Server error log file: Recovery Complete During the recovery process, SQL Server may not accept connections. Clients that try to connect to the instance of SQL Server during that time may receive an error message that is similar to the following: Timeout Expired The SQL Server Agent service may not start because it waits for SQL Server to recover the databases. Therefore, when you receive the following message in the SQL Server error log file, the connections will no longer fail with a timeout error: Recovery Complete If the recovery process takes a long time, you may have to additionally troubleshoot the recovery process. Test different ways to connect to the instance of SQL Server If you experience connectivity problems when you connect to the instance of SQL Server, you can use one or more of the following methods to work around the connectivity problem. Test the connectivity to the instance of SQL Server by using both SQL Server Authentication and Windows authentication. Test the connectivity to the instance of SQL Server from other data sources, such as an ODBC DSN, a .udl file, SQL Query Analyzer, SQL Server Enterprise Manager, the isql utility, or the osql utility. Test the connectivity to the instance of SQL Server by using different protocols. You can specify different protocols by creating a new alias for the instance of SQL Server using that protocol. You can also specify the protocol in your connection string by adding tcp:, np:, lpc:, or rpc: to the beginning of the name of the instance of SQL Server. For example, if TCP/IP connections are not successful, named pipes connections succeed. Test the connectivity by using a different login account to help you determine if the problem is associated with a particular login account. Try to add an entry that corresponds to the IP address of the computer that is running the instance of SQL Server to the %systemroot%system32driversetchosts file. Try to connect to the instance of SQL Server from the computer that is running SQL Server and from the client. If you are connecting from the computer that is running SQL Server, you can specify . or (local) (without the quotation marks) instead of the server name and then connect. Try to connect to the instance of SQL Server by using the IP address instead of the server name. Try to specify the specific port that the instance of SQL Server is listening on, either by creating an alias or by adding a port number to the connection string (MyServerMyInstance, 1433, for example). 附录 C 外文文献中文译文 如何解决 SQL Server 2000 中的连接问题 Chris Tull, Microsoft Help and Support 这一篇文章能帮助你解决微软 SQL 伺候器 2000 的连接性问题。这一篇文章包含你能拿帮助解决你的连接性问题的通常连接性问题和步骤的描述。 SQL Server的例证和客户端申请之间的沟通的 SQL Server 2000 支持一些方法。如果你的客户申请和 SQL Server 的例证在相同的计算机上住 , Microsoft Windows 处理之间的 沟通 (IPC) 成份 ( 像是当地的命名管或者被分享的记忆记录 ) 用来沟通。 然而 , 当客户 端 申请和 SQL Server的例证在不同的计算机 , 网络 IPC( 像是 TCP/IP 上住的时候或者命名管道 ) 用来沟通。 SQL Sever 2000 使用 网络控件库 (一个 DLL)与一个特别的网络记录沟通。 一双相配 网络控件库 一定在客户计算机和服务器计算机上是活跃的支援你想要使用的网络记录。 举例来说,如果你想要使一个客户申请能够与通过 TCP/IP的一个 SQL Server的特定例证沟通 , 客户 TCP/IP套接字网络控件库 (Dbnetlib.dll) 一定配置成在客户计算机上对伺候器连接。 同样地 , 服务器 TCP/IP套接字网络控件库 (Ssnetlib.dll) 一定在伺候 器计算机上听。 在这一个情节中 , TCP/IP协议堆栈 一定是装置在客户计算机和服务器计算机。 在你安装 SQL Server 2000 之后,你能配置客户端网络的特性使用客户端网络公用程序的网络库属性。你能配置服务器网络的特性使用服务器网络公用程序(Svrnetcn.exe)的网络控件库属性。在安装 SQL Server 安装程序中的服务器工具期间,服务器的网络库也被同时安装了。然而,一些服务器的网络库可能不是激活的。如此, SQL Server 2000 启用并侦听 TCP/IP、命名管道和共享内存。因此,让 一个客户端对一部服务器计算机连接,客户端一定使用一个客户端网络库,该网络库匹配与 SQL Server实例正在使用的服务器网络库之一。 对于关于 SQL Server 通讯部件和网络库的其它信息,请参见 “SQL Server 在线参考书 ”中的下列主题: 通信部件 客户端和服务器网络库 管理客户端 解决连接问题 在 SQL Server 2000 中大多数连接问题你可能会注意到的都是由 TCP/IP 的问题或 Windows 身份认证的问题引起,或者两者共同组合引起。 重要说明:你开始 解决 SQL Server 2000 的连接问题之前,确定MSSQLServer 服务已在运行 SQL Server 的计算机上启动。 验证 DNS 设置 域名系统 (DNS)的名称解析过程被用于解决 IP 对 SQL Server实例名称。如果名称解析程序不正确地工作, SQL 服务器的实例不是可到达的,你可能接受到一条或多条下列错误信息: SQL Server does not exist or access denied General Network Error Cannot Generate SSPI Context 为了 要确认名称解析程序是解析正确的服务器,你能使用服务器的服务器名字和 IP 地址 ping服务器。为此,请遵从如下步骤操作: 1. 单击 “开始 ”,然后单击 “运行 ”。 2. 在 “运行 ”对话框中,在 “打开 ”框中键入 cmd,然后单击 “确定 ”。 3. 在命令提示符下,运行下列命令: ping 记录返回的 IP 地址。 4. 在命令提示符下,运行下列命令(此处的 IP address 就是你在步骤 3 中记录的 IP 地址): ping a 确认指令跟正确的服务器名字 解决。如果任一指定指令不成功、超时或者没有返回正确的数值在两个指定的命令,那么 DNS 查找未能正常工作,或者因为其它的网络问题引发问题。要查看当前 DNS 设定,在命令提示符下运行下列命令: ipconfig /all 要 解 决 此 问 题 , 可 以 在 客 户 端 计 算 机 上的 %systemroot%system32driversetchosts 文件中为服务器添加一个条目。要解决此问题,还可以使用命名管道网络库连接到服务器。 启用的协议和别名的验证 如果客户端计算机上的别名错误设置,可能会引起连接问题。你可以查看别名使用客 户端网络实用程序。为此,请按以下步骤操作: 1. 启动客户端网络实用程序。如果 SQL Server 客户端工具被安装在正在运行客户端应用程序的计算机上,请启动客户端网络实用程序按照以下步骤: a. 单击 “开始 ”,然后指向 “程序 ”。 b. 指向 “Microsoft SQL Server”,然后单击 “客户端网络实用程序 ”。 如果 SQL Server 客户端工具没有安装在客户端计算机上,请按照以下步骤启动客户端网络实用程序: a. 单击 “开始 ”,然后单击 “运行 ”。 b. 在 “运行 ”对话框中,在 “打开 ”框中键入 cliconfg,然后单击 “确定 ”。 2. 在 “SQL Server 客户端网络实用程序 ”窗口中,单击 “常规 ”标签,然后启用你要使用的所有协议。 注意:你必须启用 TCP/IP 协议和命名管道协议至少。 3. 单击 “别名 ”标签,然后验证为 SQL Server 实例所配置的别名。 4. 验证别名的属性,确认服务器名或 IP 地址和协议的配置是正确的。 你可以测试连接性能创建一个新的别名,通过使用服务器名、 IP 地址或者其他协议。 注意 :在 Microsoft 数据存取部件 (MDAC) 的早期版本中,客户端网络实用程序的用户界面是不同的。因此,如果你没有看到选项在本文中列出的,请在正在运行客户端应用程序的计算机上安装 MDAC 的新版本。 验证 SQL Server 实例正在正确地侦听 要验证 SQL Server 实例正在正确地侦听命名管道、 TCP/IP 或你在客户端应用程序中使用的其他协议,请打开当前的 SQL Server 错误纪录文件 。 SQL Server 错误日志文件可能包括与以下类似的条目: 2003-11-06 09:49:36.17 server SQL server listening on TCP, Shared Memory, Named Pipes. 2003-11-06 09:49:36.17 server SQL server listening on 192.168.1.5:1433, 127.0.0.1:1433. 通过分析 SQL Server 错误日志文件中的条目,可以验证 SQL Server 实例是否正在侦听正确的 IP 地址和端口。在默认情况下,一个 SQL Server 实例默认侦听端口 1433。你还可以验证 SQL Server 的协议 设置并更改 SQL Server 中的属性使用服务器网络实用程序,包括可以连接到 SQL Server 和可以使用的端口的协议。关于使用服务器网络实用程序的更多信息,请参见 SQL Server 在线参考书中的 “SQL Server 网络实用程序 ”专题。 有时候, SQL Server 2000 可能不会绑定于端口 1433 或任何其他指定的端口。如果端口正被其他应用程序使用,或者如果你正在尝试使用一个错误的 IP 地址进行连接,就可能会出现此问题。因此, TCP/IP 到 SQL Server 的连接 可能不成功,在 SQL Server 错误日志中你会收到下列错误信息: 2001-11-14 15:49:14.12 server SuperSocket Info:Bind failed on TCP port 1433. 如果通过 TCP/IP 连接你不能连接到 SQL Server 实例,请尝试使用命名管道协议或共享内存协议。运行下面的命令在命令提示符下,以获取信息关于正在使用的端口: NETSTAT -an 注意 :对于 SQL Server 命名实例, SQL Server 动态地决定端口并侦听决定 的端口。因此,当你启动 SQL Server 命名实例时, SQL Server 将设法侦听之前使用的端口。如果 SQL Server 不能绑定到该端口,命名实例可能会动态地绑定到另一个端口。在这种情况下,请确认客户端应用程序也被设置为动态地决定端口。作为选择,你还可以为命名实例指定一个静态端口,通过客户端网络实用程序对其进行绑定和侦听。 解决 MDAC 问题 MDAC 的问题也可能会引起连接问题。例如,安装一个软件可能会覆盖一些 MDAC 文件或更改权限,而你需要这些权限才能访问 MDAC 文件。你可以运行 MDAC 部件检查器来验证 MDAC 在计算机上的安装。 注意 :如果你正连接到 SQL Server 的一个命名实例,请确认计算机上运行的是 MDAC 2.6 或更新的版本。 MDAC 的早期版本不识别 SQL Server 的命名实例。因此,可能无法连接到命名实例。 你可以使用 Odbcping.exe 实用程序来验证通过 SQL Server ODBC 驱动程序的连接。 解决防火墙问题 如果防火墙存在于客户端计算机和正在运行 SQL Server 的计算机之间,请确认通过防火墙进行通信时所需的端口已打开 。 如果你使用 TCP/IP 协议连接 SQL Server 实例,请确认能够用 Telnet 程序连接到 SQL Server 正在侦听的端口。要使用 Telnet 程序,在命令提示符下运行下列命令: Telnet 如果 Telnet 程序没有成功,并且你接收到错误信息,请解决此错误然后尝试再次连接。 注意 :因为由 Slammer 病毒引起的问题,在你的防火墙上,用户数据报协议 (UDP) 端口 1434 可能被阻挡。 解决身份验证和安全问题 由于身份 认证失败,可能无法连接到 SQL Server。如果身份认证失败,你可能收到下列错误信息之一: Login failed for user Login failed for user NTAUTHORITYANONYMOUS LOGON Login failed for user null 如果你接受 一个错误信息因为身份认证失败和错误信息不提到一个特定的SQL Server 登录名,请使用 Windows 身份认证解决该问题。由于 Windows 身份认证的问题,你可能会 收到下列错误信息: Cannot generate SSPI Context 下列问题可能会引起身份认证和安全问题: NTLM 身份认证或 Kerberos 身份认证出现问题。 由于连接问题,无法联系域控制器。 域之间的信任关系出现问题。 有关可能原因的更多信息,请参见计算机上的事件日志。要解决 Windows 身份认证的连接问题,你可以使用 SQL Server 身份认证连接到 SQL Server 实例。 有关如何诊断和解决 “Cannot Generate SSPI Context” 如果在使用 SQL Server 身份认证时连接没有成功,你会收到下列错误信息: Login failed for user .Not associated with a trusted connection 若要解决此问题,请按照以下步骤操作。 警告 :不恰当的使用 “注册表编辑器 ”可能导致严重问题,可能需要重新安装操作系统。 Microsoft 不能保证你可以解决因 “注册表编辑器 ”使用不当而导致的问题。使用 “注册表编辑器 ”的风险需要你承担。 1. 请确认 SQL Server 实 例配置为使用 Windows 身份认证和 SQL Server 身份认证。为此,请确认在正在运行 SQL Server 的计算机上存在下列注册表项。对于默认的 SQL Server 实例: HKEY_LOCAL_MACHINESoftwareMicrosoftMSSQLServerMSSQLServerLoginMode 对于 SQL Server 的命名实例: HKEY_LOCAL_MACHINESoftwareMicrosoftMicrosoft SQL ServerMSSQLServerLoginMode 请确认已设置下列注册表项的值: 身份认证类型 值 仅限于 Windows 身份认证 1 混合模式( SQL Server 身份认证和 Windows 身份认证) 2 注意:如果你对注册表进行了任何更改,必须关闭并重新启动 SQL Server 实例使更改生效。 2. 尝试使用其他 Windows 帐户或 SQL Server 登录帐户连接到 SQL Server 实例。这样能够帮助确定是否是由于某个特殊的登录帐户的问题而造成连接失败。例如,登录帐户 的密码可能已被更改。 3. 尝试使用其他协议连接到 SQL Server 实例。例如,使用 TCP/IP 协议进行

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论