SQL Agent: The Package Execution Failed - sql-server

I have spent the past two days trying to find a solution for this error but I am still struggling to understand the failure.
I am fairly sure the issue is to do with the SQL Agent accessing a Network Drive as I have created identical SSIS packages with the only difference being the location of a flat file, when it runs the version on a Network folder it fails with very little indication of the error.
Its worth pointing out both of the packages run in BIDS, its the SQL Agent that results in the error
I have followed the below link and created a Proxy account and I can confirm the SQL Agent runs under this logon (it says in the Job History)
How do I create a step in my SQL Server Agent Job which will run my SSIS package?
Question is - What is the failure and why? It clearly seems to be something with the network file but I cannot understand what step I am missing?
Thanks

Related

SSIS package failing via Credential account

I have one package which loads data from excel using ace.oledb.12.0 driver to SQL server(same server where SQL agent service is running.).
When I ran this Step from SQL Agent using Infrastructure Service account it succeed.
When I ran this step using a credential account it is stopping the job as a failure 'Unexpected Termination'.
Funny part is this is running exactly fine for files with data size low(100kb-300kb) when run from both Infrastructure Service account and a Credential account.
But for my current file having size 4.5 mb it is failing via Credential account.
Is there a way I can capture why the job is getting terminated?
Disclaimer: I work for ZappySys
Looks like you need to find out detailed error message to know more. Did you deploy package using SSIS Project Mode in SSISDB or running as File System Package? When you run SSIS Package via Agent Job you will see very limited error message and many times its useless. So better to run package under SSIS Catalog so you see full execution log. If that is not possible then try to Add Some SSIS Log Provider (see below) for better logging on error messages.
How to add SSIS Log Provider in your package
How to view execution log in SSIS Catalog (See Step#10 in this link)

SQL Jobs error for SSIS package of access data import

I am tearing my hair out with this particular issue, I have used SQL Agent Jobs for years and know there can be issues with permissions which I have always got around. But this issue I can't fathom. I am importing data from an Access Database to SQL Server via a SSIS package, I have had it successfully run via a SQL Job with no problem (using a proxy account). I need to change the login that runs the jobs, this has been set up with the same permissions and runs various jobs like running stored procedures. But when it tries to run the SSIS package it will not have it and I get a failed validation and returned error code 0xC020801C. It has exactly the same permissions, so why would it fail when I change the windows login account for the proxy? Any help would be hugely appreciative

Job SSIS - Extract data from PostgreSQL to SQL Server

I have some troubles to automatize a package SSIS with a job SQL Server.
I have to get some data from a DB PostgreSQL to a DB SQL Server. For that, I'm using an ODBC connector (downloaded from http://www.postgresql.org/ftp/odbc/versions/msi/ and added using administrator console odbc in C:\Windows\SysWOW64\odbcad.exe):
driver odbc:
odbcad:
To be able to run the SSIS package, I had to change debugging settings in SSDT to run the package in 32 bits mode :
So far, everything works fine, but when I'm trying to automatize it with a SQL Server job, the job fails. Yet, I specified to my job to run in 32 bits mode too:
Below, the errors I got (sorry it's french):
The most meaningful error is
failed to call method acquireconnection to connection manager "PostgreSQL". Error code : 0xC0014009
I'm stuck & every related posts I found are solved using the checkbox "32 bits mode" checked on the job.
Thank's to M.Ali, I found the solution.
I just needed to add the DSN connection under System because the job SQL Agent is launch with another account than my current user.

Package that runs perfect on SSIS, but fails on SQL - server job activity

I wonder if you can help me, I am having a problem which I can't figure out for the last few days... I get these errors when I run a package, that runs perfect on SSIS, on SQL - server job activity:
Error: There were errors during task validation
Error: .. failed validation and returned error code 0xC0208449
Error: One or more component failed validation
ADO NET source has failed to acquire the connection {...} with the following error message "exception from HRESULT: 0x80131937
Some additional info:
I am using project deployment mode
my Sql server version is 2014
My protection level in SSIS is DontSaveSensitives both in project and packages, but I think that it doesn't matter when I deploy anyway.
The package I get this error about run on SSIS but not on SQL-server job activity
When runnin within Sql Agent Job, your package is failing to acquire connections. First review your package/job connections, and make sure they have deployed properly.
Then rule out access permissions issues by testing the package using a Sql Server user/password account. If it works this way then most likely you need to use a Sql Server Proxy account.
If you are still unable to access then check connectivity between the machine you are running the job and the one(s) where your data is located (addresses, ports and instances,..). Also make sure that all involved machines can use the same transport (named pipe, tcp,...) in Sql Server Configuration Manager.

SSIS Package stalls when run as a SQL Job

Here is the short version of the problem: I have a discrete DTSX file that works fine on our Production server, but doesn't on our new Dev server.
Symptom: When run from a SQL-Server job, the job starts and nothing at all happens, and it never finishes... it just hangs, using very little system resources.
Some info: For Prod, the packages were developed on SQL-Server 2012 and run on an NT 2008 server. The new Dev server is also SQL-Server 2012, but runs on an NT 2012 server (in case that matters). I have duplicated the folder/file structure exactly, including drive name. The package uses an external dtsConfig file, but as I said - the folder/file structure is identical.
The SSIS service, SQL-Server Agent, and my remote login are all the same, and is a member of the server Administrator group on the Dev box. If I copy the command line text from the SQL job and run it in a CMD window using dtexec.exe, the package executes correctly. The job owner is my login, and the "run as" is the SQL-Agent, which - as I mentioned - is the same login. Since everything in the package uses integrated security, everything should be running using the same login whether on the command line or via the SQL-Agent, which should eliminate any user permission/credentials issues.
I tried adding SSIS logging to the package, logging everything I could. When I run the package from the command line, I get a ton of messages in the log. When I run the package via the SQL job, there are no messages at all in the log - nothing.
Whatever is going on, it's not getting far enough into the SSIS package to generate a single log entry. It's just stopping but not exiting or throwing an error. FWIW - I have the same problem with every other package I've tried.
Any ideas are appreciated...
I found the cause of the problem. The MS-SQL Server service was using a different login than the SSIS server service and the NT Agent service (it was using a local service account).
Once I changed the MS-SQL Server login to match the others (and restarted the service), the job ran correctly.

Resources