2

I have an SSIS package that outputs and excel file and emails it. When i run it from Visual Studio it works fine. But when i run it from the job in SSMS its throwing an error:

"Errors were detected in the command line argument, please make sure all arguments are set correctly. (SqlManagerUI)

The problem seems to be in the Excel connection manager connection string. Its working fine in Visual Studio but in SSMS job its causing the above mention error.

Below is how the connection string is defined in my job:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\\nsi.pri\atp-images-DEV\StagingDB\ApprovedCustomers\DailyApprovedCustomers_2019_05_14.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES";
Hadi
  • 36,233
  • 13
  • 65
  • 124
KSingh
  • 143
  • 1
  • 13

1 Answers1

0

I think the main cause is that the SQL Job run as the SQL service account which doesn't have access the the excel path. Try to run the Job as a windows user.

In addition. it may be a 32/64 bit issue, try to execute the job in 32-bit mode:

Hadi
  • 36,233
  • 13
  • 65
  • 124
  • thank you. Yes i was informed that the excel drivers are not installed on the servers. So that’s why I’m experiencing this issue when running the job from SSMS. Is their a work around for this? – KSingh May 14 '19 at 22:49
  • @KSingh can you provide a screenshot of the sql job configuration? – Hadi May 14 '19 at 23:12
  • yes i tried both suggestions, but it does not work. Either we need to install the excel drivers onto the servers or i need to find a work around. – KSingh May 15 '19 at 14:15
  • We decided to use .csv file instead of .xlsx to resolve this issue. – KSingh May 15 '19 at 14:31
  • @KSingh If you mean by Excel Drivers the OLEDB JET or ACE Provider used to connect to excel files, then there is no other way than converting files to csv or installing the drivers. Good Luck – Hadi May 16 '19 at 01:19