一段时间后,用户空登录失败 [英] Login failed for user null occurs after a period of time

查看:81
本文介绍了一段时间后,用户空登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在两台计算机(我的计算机和一台网站
服务器)上有一个相同的SQL数据库,它连接到第三台服务器上的数据库(S3)。当我在我的机器上执行

存储过程来访问S3上的数据库时,它/ b $ b总是运行没有问题。但是,当我在网络服务器上运行相同的存储的

程序时(通过我的机器上的查询分析器,连接到网络服务器上的
),存储过程运行没有问题

大约十分钟,然后我突然收到错误登录失败

for user''(null)''。原因:与可信SQL Server无关。

连接。如果我然后通过Remote

桌面连接远程连接到网络服务器并在那里运行存储过程,那么它可以工作,然后我可以通过查询分析器在网络服务器上再次运行它在我的

机器上,但大约十分钟后会再次出现同样的问题。

我的机器与网络服务器之间的唯一区别是

webserver正在运行Windows Server 2003,而我的机器运行Windows $ XP
。两台机器上的SQL中的所有设置都是相同的,所以我想知道是否有人有可能解决这个看似随机问题的问题。

解决方案

听起来和Active Directory问题一样。检查

Web服务器上的时间,看它是否接近服务器时间;如果不是你可能需要手动调整它来匹配(或者在w32tm上读取以保持它们在
同步中)。如果时间超出时间,那么Web服务器可能会开始下降令牌。


您可能还想确保Web服务器没有周期性地尝试从NIC卡上下载



感谢您回复Stu。时间似乎与两台

服务器和我的机器匹配,所以我只能假设这不是

问题。我无法理解为什么我总是可以在没有

直接在Web服务器上运行查询的情况下运行查询,但是如果我在我的机器上通过

查询分析器在Web服务器上运行它,它工作大约五分钟,然后

我得到与可信连接错误无关。正如我所说的那样,如果我再直接在服务器上再次运行它,那么我可以在我的机器上的查询分析器中成功运行它大约五分钟。
/>
我遇到问题的唯一存储过程是

从第三台机器调用数据,但它始终在

上正常工作网络服务器。如果有人能帮助我,我将非常感激,因为我在一天中的大部分时间都在试图解决这个问题。在Windows 2003服务器上使用

之前,我从未在以前的网站运行Windows 2000的
服务器上遇到问题。


正如Stu所指出的那样,它看起来像是一个Active Directory问题。你是使用Windows或SQL Server身份验证吗?
?听起来像Windows

身份验证。


检查您遇到问题的机器是否正在进行身份验证

域名(查看可疑条目的事件查看器。)

或者,您可以使用SQL Server身份验证(如果

服务器配置为允许这样做),但是,更多一个简短的

术语解决方法。


HTH,


BZ


I have an identical SQL database on two machines (my machine and a web
server) that links to a database on a third server (S3). When I execute
a stored procedure on my machine that accesses a database on S3, it
always runs without a problem. However, when I run the same stored
procedure on the webserver (via Query Analyzer on my machine, connected
to the webserver), the stored procedure runs without a problem for
about ten minutes, and then I suddenly receive the error "Login failed
for user ''(null)''. Reason: Not associated with a trusted SQL Server
connection.". If I then connect remotely to the webserver via Remote
Desktop Connection and run the stored procedure there it works, and
then I can run it again on the webserver via Query Analyzer on my
machine, but the same problem will occur again after about ten minutes.
The only difference between my machine and the webserver is that the
webserver is running Windows Server 2003, whereas my machine runs
Windows XP. All settings in SQL on the two machines are identical, so I
would love to know if anyone has a possible solution to this seemingly
random problem.

解决方案

It sounds like and Active Directory problem. Check the time on your
web server to see if it''s close to the server time; if not you may want
to adjust it manually to match (or read up on w32tm to keep them in
sync). If the time is out of kilt, then the web server may start
dropping tokens.

You may also want to make sure that the web server doesn''t try to power
down the NIC cards periodically.


Thanks for replying Stu. The time seems to be matching on the two
servers and my machine, so I can only assume that this is not the
problem. I cannot understand why I can always run the query without
fail directly on the web server, but if I run it on the web server via
query analyzer on my machine, it works for about five minutes, and then
I get the "Not associated with a trusted connection error". As I said,
if I then run it again directly on the server, I can then run it
successfully in Query Analyzer on my machine for about five minutes.
The only stored procedure with which I have the problem is the one that
calls data from the third machine, but it always works correctly on the
webserver. I would be most grateful if anyone can help me on this, as I
have wasted most of the day trying to solve the problem. Prior to using
the Windows 2003 server, I never had a problem on the previous web
server, which ran Windows 2000.


As Stu pointed out, it looks like an Active Directory problem. Are you
using Windows or SQL Server authentication? Sounds like Windows
authentication.

Check that the machine you are having issues with is authenticating do
the domain (look in Event Viewer for suspicious entries).
Alternatively, you may be able to use SQL Server authentication (if the
Server is configured to allow so), however, that is more of a short
term workaround.

HTH,

BZ


这篇关于一段时间后,用户空登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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