Thursday, March 22, 2012

Email Task

In my DTS package I tried to make an email task and it works if I execute it manualy, but if I schedule it I get the following error:

DTSRun: Executing... DTSRun OnStart: DTSStep_DTSExecuteSQLTask_16 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_16 DTSRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1 DTSRun OnStart: DTSStep_DTSDataPumpTask_2 DTSRun OnProgress: DTSStep_DTSDataPumpTask_2; 8 Rows have been transformed or copied.; PercentComplete = 0; ProgressCount = 8 DTSRun OnFinish: DTSStep_DTSDataPumpTask_2 DTSRun OnStart: DTSStep_DTSSendMailTask_1 DTSRun OnError: DTSStep_DTSSendMailTask_1, Error = -2147220352 (80040480) Error string: Logon failed: MapiLogonEx Failed due to MAPI error 273: MAPI Logon failed. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 1100 Error Detail Records: Error: -2147220352 (80040480); Provider Error: 0 (0) Error string: Logon failed: MapiLogonEx Failed due to MAPI error 273: MAPI Logon failed. Erro... Process Exit Code 1. The step failed.

What could it be?SQLAgent service account should be used to set up the mail profile.|||Got that to work, Thanks,

But now I am getting into another error:
Executed as user: UPSAPP\SQLService. DTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSExecuteSQLTask_16 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_16 DTSRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1 DTSRun OnStart: DTSStep_DTSDataPumpTask_2 DTSRun OnError: DTSStep_DTSDataPumpTask_2, Error = -2147467259 (80004005) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -329978796 (EC54EC54) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 DTSRun OnFinish: DTSStep_DTSDataPumpTask_2 DTSRun: Package execution complete. Process Exit Code 1. The step failed.

This is happends when I am exporting a table into .xls file on the network drive.
Any ideas? Why is it using Microsoft JET Database Engine from SQL Server? Why can't it create a file, and why is it creating a file, i already have the file there.

Thanks in advance.|||So, if you're trying to append to the file, you just say so in your task desgn. The reason you're getting the error is because upon an attempt to append to the file it looks for it, and it can't find it because this account (SQLAgent service account) doesn't have permission to even read that share. So, it tries to create one (by design), and failes due to the same permission issue.|||So how would I tell the network admin to add that account for permission to that drive?|||First, confirm that permission is the issue by logging in with SQLAgent service account to demonstrate to yourself and then to your network admin that this is the case.|||And remember, when you execute a DTS package, it runs using your account. When you schedule it as a job, it runs as SQLAgent. This can confuse things when you are trying to debug permissions.

No comments:

Post a Comment