为何我通过odbc连接sql server数据库必须先通过网络邻居联上服务器.(100分)

  • 主题发起人 主题发起人 firnwolf
  • 开始时间 开始时间
F

firnwolf

Unregistered / Unconfirmed
GUEST, unregistred user!
我现在必须先通过网络邻居登陆服务器,然后odbc再连接sql server才能通过,否则
会有错误.请问服务器应该如何配置才能避免.3x
错误信息:
[State =01000][Error=1326][Microsoft][ODBC SQL Server Driver]
[SQL Server][dbnmpntw] ConnectionOpen (CreateFile())
好像服务器安装上金山网镖或者天网防火墙之后都能导致此症状.
 
msdn里的帮助是这样的,偶看不等.

SUMMARY
When you use anonymous connections for IIS and you attempt to query remote SQL servers using named pipes, the following error may occur:


[State =01000][Error=1326][Microsoft][ODBC SQL Server Driver]
[SQL Server][dbnmpntw] ConnectionOpen (CreateFile())

Error 1326 means "Logon failure: unknown user name or bad password." This error is raised because the IIS Service does not have any rights to use the named pipe.



MORE INFORMATION
In order for a SQL server client to gain access to a Windows NT named pipe, the client needs to be validated by the Windows NT server. This is normally accomplished through a Workgroups style validation method where identical usernames and passwords are created on the client and the server, or the domain method where both the client and server are domain members.

The Internet Information Server (IIS) setup process creates a Windows NT ID called IUSR_machinename (where machinename is the name of the Windows NT server), and adds that user to the Guest local group. The IIS service runs under this Windows NT account name.

If the connection to IIS is anonymous, IIS uses the Windows NT account IUSR_machinename and so any network activity performed by IIS is done under this account ID.

If the SQL server resides on the same server as IIS, then named pipes connections work and validation is successful.

If the SQL server resides on a separate server from IIS, then the IUSR_machinename account needs to be validated on the Windows NT server that SQL resides on.

This validation can be implemented by several methods:


Add the account to the local user account database on the NT server that SQL resides on.


Make the Windows NT ID IUSR_machinename a member of the domain that the SQL server resides in.


Enable the Windows NT ID Guest.


For more information regarding security and Microsoft Internet Information Server, please refer to the following article in the Microsoft Knowledge Base:

Q142868 : IIS: Authentication & Security Features

Additional query words: ODBC IIS

Keywords :
Issue type :
Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600 kbSQLServ650 kbSQLServ420


Last Reviewed: April 2, 1999



--------------------------------------------------------------------------------

Send feedback to Microsoft

© 2002 Microsoft Corporation. All rights reserved.


 
检查sql服务器中使用的安全方式是windows认证还是混合认证。
如果是windows认证就必须要登陆网络。
 
是混合模式,我一般不使用windows认证模式.
 
还有一可能,就是你的计算机和服务器,不在同一个域里面!
 
应该是你的计算机和服务器,不在同一个域里面。
 
那就把服务器上guest用户放开,密码为空,应该旧可以了
 
后退
顶部