SQLSERVER 2008用户登录失败'(null)'。原因:与受信任的SQL Server连接无关

时间:2016-04-07 09:54:08

标签: sql-server database sql-server-2008

我正在使用SQL SERVER 2008 R2,我有一份每天运行DTS的工作。当我尝试执行DTS包时,它可以正常工作,但是当我尝试使用预定作业时,它会返回错误:

错误

-2147467259 (80004005); Provider Error:  18452 (4814)      Error string:  Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.      Error source:  Microsoft OLE DB Provider for SQL Server      Help file:        Help context:  0.  Process Exit Code 1.  The step failed.

我该如何解决?

2 个答案:

答案 0 :(得分:0)

按照以下步骤操作:

1. Start > Programs > Microsoft SQL Server 2008 > SQL Server Management Studio. 
2. In the Object Explorer, right-click the Server and select Properties. 
3. In the Server Properties dialog box select the Security page. 
4. Under Server authentication, select SQL Server and Windows Authentication Mode.

然后重启服务器。

有关进一步参考,请查看this.

答案 1 :(得分:0)

我偶然发现了这个问题并花了很多时间。 最后发现问题不在任何用户设置中,但我的发布设置覆盖了我的连接字符串。

在Web部署设置中,有一个选项可覆盖您的web.config连接字符串。取消选中该选项或放置正确的连接字符串。

有关详细信息,请参阅此帖子https://dba.stackexchange.com/a/141243

如果有人像我一样被困,我会把这个答案放在一边。 :)