SQL Job unknown user or bad password - sql-server

We currently have a SQL Server 2012 job that fails and unable to figure out the problem. The SQL job calls a SSIS package and if I run the package via Integration Services it runs successfully. However when running the job it returns the following in Windows Event Viewer:
SQL Error : Logon failure: unknown user name or bad password.
SQL Job History Error:
Error: 2017-04-28 09:43:40.17
Code: 0x00000006
Source: Create Temp Tables 1
Description: The script returned a failure result.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
There doesn't appear to be any information that helps resolve the issue. We don't appear to have any proxies setup. All other jobs that reference a SSIS package run successfully.

I found the cause of the error as there was a variable set in the package that was referencing a secondary server. Changed the connection string and job is back up and running.

To run SSIS package through JOB you need to set a password in the package
And when informing the package will be requested the password so that you can include in the job

Related

SQL agent job failed with an error 0x80131904

I have one SQL agent job that executing the SSIS package. When the job is running through schedule then it is giving an error:
Failed to execute IS server package because of error 0x80131904. Server: XXXXX Package path: "XXXX" Environment reference Id: 2. Description: The operation failed because the execution timed out.
But when I manually running the job by right clicking on it then the job runs successfully.
Could anyone help me on this to find out the root cause and solution of the issue.
Thank you so much in Advance!!
Problem is that SQL Agent Service user don't have rights to execute package.
Two solutions:
Change SQL Server Agent service user
read where sql management studio
Make a proxy account for SQL Agent JOB Step ssis proxy account
Go for the 2, because if You have more than one JOB or some policies.....

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.

SQL Agent Job failes when trying to execute SSIS package due to some permission issues

I deployed ssis package on sql server 2012. Thereafter scheduled a sql job to run this ssis package weekly.
When I started a job for the first time, it failed with following error.
The job failed. The Job was invoked by User MyDomain\MyUserName. The
last step to run was step 1 (scheduling ssis package).
Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server
Execute Package Utility Version 11.0.5058.0 for 64-bit Copyright (C)
Microsoft Corporation. All rights reserved. Started: 2:17:12 PM
Package execution on IS Server failed. Execution ID: 6, Execution
Status:4. To view the details for the execution, right-click on the
Integration Services Catalog, and open the [All Executions] report
Started: 2:17:12 PM Finished: 2:17:17 PM Elapsed: 4.493 seconds.
The package execution failed. The step failed.
I am sure there is some issue with permissions, however I am not able to resolve this.
This package is deleting a content of a folder present on my desktop.
SQL Server instance is running on my machine. I am on a standalone machine.
After searching lot of articles I got an article which helped me identifying actual error :-
Identifying issue
Login sql server instance
Navigate to Integration Service Catalogs
Right Click on your SSISDB catalog and select All Reports -> Standard reports -> All Executions
For your folder, click on All Messages for failed task
Here you will see your error
In my case error was "Access to path 'C:\Users\MyUser\Desktop\Test Folder' is denied". To note there is a section Caller in this report who is trying to access this folder, in my case it was NT SERVICE\SQLSERVERAGENT.
Go to this folder, right click -> Properties -> Security
Under Group/username click Edit -> Inside new pop up Add new user
Now if you are trying to find NT SERVICE\SQLSERVERAGENT user, you won't find since its under a service account which means you will see a user named SERVICE . This is the user you need to add to this folder.
As soon as I added this, my job started running :)
In my case
Identifying issue:
Login sql server instance
Navigate to Integration Service Catalogs
Right Click on your SSISDB catalog and select All Reports -> Standard reports -> All Executions
-check the fail/ red error log report section(overview,all messages,execution performance)
- I went to overview ->clicked execution path -> under error messages clicked view context
this will show you step by step execution. I had a data type mismatch as I reran the sql script in ssms it was giving issue. Once I fixed the data type or removed extra data.
All back to normal
Solution :
I got the same error in SQL agent job ,so I just check SSIS package whether it is running or not then find that package is failing because from proc we are taking input as string and in package I have create a variable datatype object to store the proc input ,When I changed that my SSIS package as well as sql job is running fine now.
I hope this will help you ..
I got the same error while executing the SSIS Job in SQL Agent "Access to the path 'C:\Users\abhis\Documents\Visual Studio 2017\Projects\SSIS\AWS-S3-FileLoad\OracleEmployeeDetails' is denied.".
Solution -
Go to this folder for which you are getting the Access Denied Error,
Go to Folder -> Properties -> Security -> To Change Permission Click
Edit - > Add the user "SERVICE" to the Folder.
\As soon as the "SERVICE" user has been added, Job has executed and completed successfully.\

BIDS 2008 SSIS Package Data Flow Task fails validation and returns "VS_ISBROKEN" Error

A BIDS 2008 SSIS package that I am working is failing validation when it reaches any Data Flow Task in the package. I am able to run the SSIS package within BIDS 2008 on my computer locally. When I run the SSIS package through an SQL Agent Job, the package fails with the error message below. I have researched error code 0x80004005 and error code 0xC004706B through Google searches, but have not found anything that is of use.
The SSIS package in question is one of several SSIS packages that run together in the same SQL Agent Job. The other SSIS packages in the original SQL Agent Job all are able to run successfully. This leads me to believe that the SQL Agent Service Account and Proxy Account are configured with the appropriate permissions. A DBA was able to confirm that the Service Account and Proxy Account do have the appropriate permissions.
The SQL Agent Job runs the SSIS package using the Operating System (CmdExec) type and the SSIS package has Run64BitRuntime set to FALSE so the SSIS Package is running under the 32-bit runtime.
For debugging purposes, I recreated the Data Flow Task, Database Connections, and related source and destination tasks in a new SSIS Package from the original SSIS package. The debugging SSIS package is able to run locally on my computer, but fails when I try to run using a new SQL Agent Job setup exactly like the original SQL Agent Job.
I have also use different Database Connections such as Native OLE DB\SQL Server Native Client 10.0, 10.1, 11.1, and Native OLE DB\Microsoft OLE DB Provider for SQL Server. All of which have failed when I test the debugging SSIS package
I have verified that the metadata for the OLE DB Source and Destinations match the datatypes and lengths in the SQL Server Database tables. I have verified that the stored procedure used by the OLE DB Source task in the Data Flow Task work when ran on SQL Server Management Studio and the Service Account has permissions to run the stored procedure.
I think that is every bit of information that I can recall from working on troubleshooting this issue.
Has anyone else come across this error before? Any possible solutions to attempt?
Any help is welcomed!
Error Message:
Executed as user: domain\SQLAgentServiceAccount. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 64-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 1:37:09 PM
Error: 2014-08-14 13:37:09.94 Code: 0xC0202009 Source: Data Flow Task - OLEDB Source [1]
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.
Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005
Description: "Syntax error or access violation".
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC004706B Source: Data Flow Task SSIS.Pipeline
Description: "component "OLEDB Source" (1)" failed validation and returned validation status "VS_ISBROKEN".
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC004700C Source: Data Flow Task SSIS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC0024107 Source: Data Flow task
Description: There were errors during task validation.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 1:37:09 PM Finished: 1:37:09 PM Elapsed: 0.219 seconds. Process Exit Code 1.
The step failed.
I found the this solution :
Ensure that the connection string in Connection Manager has "Provider=SQLNCLI11.1; Persist Security Info=True; Auto Translate=False;"
I did it and it worked for me on Hyperscale / SQL Server.
This is kind of strange error that I got a while ago and I used the following to resolve the problem:
Run command prompt as Administrator
Type the following command and hit Enter: regsvr32 jscript.dll
Type the following command and hit Enter: regsvr32 vbscript.dll
The solution to the problem was that the service account that is running the SQL Agent job did not have execute permissions on the stored procedure being executed through the Data Flow Task. Gave the service account execute permissions and the SSIS package was able to successfully execute.

Some of the tasks in the SSIS package failed when I migrated the package to another server

Sorry, I'm new to SSIS development. The title I've given to the problem isn't so appropriate - please go through below.
I have a SSIS package in the C drive of a local server, which everyone on the team has access to. If I login using my windows username and password, I can execute the "Execute SQL tasks" in the SSIS package, and it completes successfully. The package contains 3 "execute sql task" all of which run OK.
When my teammate tries to execute the package with his username and password
it shows an error, of the 3 "Execute SQL tasks" only 1 executed successfully, the other 2 error out with the following:
Execute SQL Task] Error: Executing the query "EXEC
usp_ETL_GetRepairHistoryFacts" failed with the following error: "The
statement has been terminated.". Possible failure reasons: Problems
with the query, "ResultSet" property not set correctly, parameters not
set correctly, or connection not established correctly.
What we can't understand is we are using the same SSIS package, same databases, the only difference is the logins.
Does anyone have any thoughts as to how to resolve this?
Is your SQL Server using authenticated Windows logins? It sounds that way.
If so, I would have your team-mate login to SSMS (SQL Server Management Studio), start a New Query and run the "EXEC usp..." statement.
You might see an error message. My guess is that it's a permissions problem with the stored procedure "usp_ETL..." It sounds like you have execute permissions and he/she does not.

Resources