DTSX 包在 Visual Studio 中运行,但在从数据库作业调用时不运行 [英] DTSX package runs in Visual Studio but not when called from a Database Job

查看:72
本文介绍了DTSX 包在 Visual Studio 中运行,但在从数据库作业调用时不运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个采用数据库备份的 SSIS 包,它在 Visual Studio 中运行良好,但从数据库作业执行时失败并出现以下错误.我无法理解的部分是 'GS\BOS-DBMONITOR$' 不是用户.'BOS-DBMONITOR' 是服务器名称.

I have an SSIS package that takes database backups and it runs fine in visual studio but when executed from a database job it fails with the following error. The part I can't understand is that 'GS\BOS-DBMONITOR$' isn't a user. 'BOS-DBMONITOR' is the server name.

错误:

以用户身份执行:NT Service\SQLSERVERAGENT.Microsoft (R) SQL Server 执行包实用程序版本 11.0.2100.60,适用于 64 位 版权所有 (C) Microsoft Corporation.版权所有.开始时间:上午 10:58:03 错误:2014-07-30 10:58:04.33 代码:0xC0024104 来源:备份数据库任务说明:任务上的 Execute 方法返回错误代码 0x80131904 (用户登录失败)GS\BOS-DBMONITOR$'.).Execute 方法必须成功,并使用out"参数指示结果.结束错误 DTExec:包执行返回 DTSER_FAILURE (1).开始:上午 10:58:03 结束:上午 10:58:04 经过:0.593 秒.包执行失败.步骤失败.

Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 10:58:03 AM Error: 2014-07-30 10:58:04.33 Code: 0xC0024104 Source: Back Up Database Task Description: The Execute method on the task returned error code 0x80131904 (Login failed for user 'GS\BOS-DBMONITOR$'.). The Execute method must succeed, and indicate the result using an "out" parameter. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 10:58:03 AM Finished: 10:58:04 AM Elapsed: 0.593 seconds. The package execution failed. The step failed.

推荐答案

SQL Server Agent 是 SQL Server 附带的调度程序.错误的第一行 Executed as user: NT Service\SQLSERVERAGENT 指定您的实例以系统用户身份运行 - 而不是真实"帐户.然后,这台机器尝试与另一台计算机联系并要求登录该 SQL Server 实例.SQL Server 说我不允许和陌生人说话,GS\BOS-DBMONITOR$',你很奇怪."

SQL Server Agent is the scheduler that comes with SQL Server. The first line of your error, Executed as user: NT Service\SQLSERVERAGENT specifies that your instance is running as the system user - not a "real" account. This machine is then trying to reach out to another computer and asks to log in to that SQL Server instance. SQL Server says "I'm not allowed to talk to strangers and GS\BOS-DBMONITOR$', you're strange."

您需要让外国机器知道要与他们交谈的帐户.

You need to let the foreign machines know about the account that's going to talk to them.

  1. 使用 SQL Server 配置管理器将服务帐户从本地帐户更改为域帐户 MyDomain\NonExpiringAccount
  2. 在 BOS-DBMONITOR 上的 SQL Server 实例中创建一个 Credentialed 用户,然后将其分配为代理以执行此包以及任何类似的 SSIS 包.这允许将经过认证的用户的帐户呈现给外部主机.与更改服务帐号相比,这对现有操作的潜在影响较小,但需要更多工作
  3. 可能有一些巫术可以在您需要备份的所有服务器上工作以允许该用户登录,但我什至不会走这条路.这将是您必须在每个盒子的基础上执行的工作,并且可能有一些安全隐患让我无法理解

这篇关于DTSX 包在 Visual Studio 中运行,但在从数据库作业调用时不运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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