I am trying to execute a job from SQL Server Agent however receiving the error:
The login is from an untrusted domain and cannot be used with Windows authentication.
The Sql server 2016 with Sql server Agent and SSIS where a credential account proxy is linking to windows admin account. The proxy is set SSIS package excecution:
The job has only 1 step to run SSIS package. This package is developed/tested/deployed from VS 2016+Data tools.
Here is the step:
and the error:
Right click on the job to view History. Here is the error:
Executed as user: MACHINE_NAME\admin_user. Microsoft (R) SQL Server Execute Package Utility Version 13.0.1601.5 for 64-bit Copyright (C) 2016 Microsoft. All rights reserved. Started: 2:15:10 PM Failed to execute IS server package because of error 0x80131904. Server: xxx, Package path: \SSISDB\Practise 1\SSIS 1\Package.dtsx, Environment reference Id: NULL. Description: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Source: .Net SqlClient Data Provider Started: 2:15:10 PM Finished: 2:15:10 PM Elapsed: 0.188 seconds. The package execution failed. The step failed.
The Sql server agent, which is running on the local machine, could not resolve the server name tcp:xxx.cloudapp.azure.com in the step. As the agent is local so just set the server name to .. Resolved.
Related
We converted our 2012 SSIS package to 2016 SSIS (TargetServerVersion = SQL Server 2016).
One of the database the SSIS package reads from is a SQL Server 2012 database.
Either connecting using Native OLE DB\SQL Server Native Client 11.0 or connecting using OLE DB provider for SQL Server give the same error.
Data Source=my2012SQLDBServer;Initial Catalog=my2012SQLDB;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;
Data Source=my2012SQLDBServer;Initial Catalog=my2012SQLDB;Provider=SQLOLEDB.1;Integrated Security=SSPI;Application Name=myApplicationName-{....}my2012SQLDBServer.my2012SQLDB;Auto Translate=False;
When running the SSIS package from SSMS (SSMS is run using a user that has a dbOwner permission to the 2012 database, ie myDomain\myUser) , I am getting the error in the step reading a table from the 2012 database
Execute SQL Task: Error: Failed to acquire connection "my2012SQLDBServer.my2012SQLDB".
Connection may not be configured correctly or you may not have the right permissions on this connection.
DTS_E_OLEDBERROR. An OLE DB error has occurred. Error Code:0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" HResult:0x80040E4D
Description: "Login failed for user "NT AUTHORITY\ANONYMOUS LOGON".
On Visual Studio (run using myDomain\myUser), I am able to succesfully run the SSIS package.
myDomain\myUser also has an ssis_admin, ssis_logreader, db_owner, app_dbowner role in the SSISDB database.
How can I fix this error ?
Thank you.
It is typical error for double-hop problem.
Simplest solution is to login using remote desktop to SSIS server and then run it using SSMS there.
Other option is to define SQL Agent job on the SSIS server and then run the package using this job.
Ultimate solution will be to configure Kerberos and allow double-hop connections on the SSIS box.
You can check following post how to configure Kerberos:
SSIS job fails when run remotely thru ssms, but runs fine on SQL Server
solution for me was like just changing windows authentication in the destination settings to SQL server authentication with apropriate
Account that have rights to reach the server, i dont understand how it works but it does.
I have a basic SSIS package that pulls data from a Redshift database ODBC DSN connection and puts it in a SQL Server database using an OLEDB connection. When I test the connections in Visual Studio everything is successful. When I run the package in Visiual Studio and the SSIS instance from SQL Server, they both are successful. However, when I try to run it from a SQL Sever agent job it fails with the AcquireConnection method failed error.
The VS solution/project is targeted to SQL Server 2014 same as the server.
The VS solution/project 64bitRunTime property is set to false so it will run as 32bit.
The configuration for the job step in SQL Agent is also set to 32bit.
Both the job owner and the step's login to the package are set to "sa" (just to test).
Still not working. Any ideas?
The difference between cases is the user credentials. When you run the package - it runs under your credentials, when SQL Server Agent runs it - it (by default) runs under service account.
Ways to test and fix:
Create a SQL Credential, SSIS execution proxy and configure Job step to use it in run as dropdown.
For testing - create a credential mapped to your account.
Change account under which SQL Agent starts or add privileges to the service account.
I opt for the first method, since it is more granular and affects only your job.
I am trying to run an SSIS Package using sql script. While I try to run this, I am getting the following error message,
"Message Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R)
SQL Server Execute Package Utility Version 12.0.5000.0 for 64-bit
Copyright (C) Microsoft Corporation. All rights reserved. Started:
6:05:54 PM Could not load package "\MSDB\TestPac" because of error
0xC00160AE. Description: Connecting to the Integration Services
service on the computer "Server Name" failed with the following error:
"Access is denied." By default, only administrators have access to
the Integration Services service. On Windows Vista and later, the
process must be running with administrative privileges in order to
connect to the Integration Services service. See the help topic for
information on how to configure access to the service. Source:
Started: 6:05:54 PM Finished: 6:05:54 PM Elapsed: 0.047 seconds.
The package could not be loaded. The step failed."
I have created an SSIS package in Visual Studio using the SSIS Import and Export Wizard and when I run it there, it runs successfully. Basically, the SSIS package runs a sql query on my SQL Server database and exports the results into an Excel file.
I have wrapped that package into a SQL Server job and scheduled it to run at a specific time. I noticed that it failed and the log file shows the following error messages:
Microsoft (R) SQL Server Execute Package Utility Version 12.0.5000.0 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 4:44:00 PM Error: 2017-10-12 16:44:00.59 Code: 0xC0016016 Source: ExpExcel Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2017-10-12 16:44:00.68 Code: 0xC0209303 Source: ExpExcel Connection manager "DestinationConnectionExcel" Description: The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver is not installed run the package in 32-bit mode. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2017-10-12 16:44:00.68 Code: 0xC00291EC Source: Drop table(s) SQL Task 1 Execute SQL Task Description: Failed to acquire connection "DestinationConnectionExcel". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error Error: 2017-10-12 16:44:00.68 Code: 0xC0209303 Source: ExpExcel Connection manager "DestinationConnectionExcel" Description: The requested OLE DB provider Microsoft.Jet.OLEDB.4.0 is not registered. If the 64-bit driver is not installed run the package in 32-bit mode. Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". End Error Error: 2017-10-12 16:44:00.68 Code: 0xC00291EC Source: Preparation SQL Task 1 Execute SQL Task Description: Failed to acquire connection "DestinationConnectionExcel". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 4:44:00 PM Finished: 4:44:00 PM Elapsed: 0.219 seconds. The package execution failed. The step failed.,00:00:00,0,0,,,,0
I am having a hard time trying to figure out how to debug these errors and finding the solution. If my SSIS package is running fine in Visual Studio (installed on that same machine as SQL Server), then why is it failing as a SQL Server job?
I must also add that Microsoft Office is not installed on that machine. Could that possibly be the cause?
You need to enable 32bit on your SQL Job agent step - And if that doesnt work you need to install OLDB ACE Driver for EXCEL
Driver link:
Microsoft ACE Driver
And as others point out. Your project protection level needs to be the same as the package protection level. You can change that under properties of the package and project.
How to set 32bit on step in SQL Job Agent on step
When you created the package it probably got set up with a User Key protection level. Meaning that any sensitive information (passwords) get encrypted with your user key. By extension, this means only you can really open/run the package. Your best bet (requiring the least amount of effort in my opinion) is to encrypt the package with a password and then you can specific that password as you are creating your SQL Agent job.
I removed old sql server from PC. Then I installed new sql server. After this sql server service doesn't start. When I am running service from sql server config manager - I receive error msg:
"The request failed or the service did not respond in a timely
fashion. Consult the event log or other applicable error logs for
details."
this command: sqlservr.exe -s MSSQL -e C:\1.txt returned logs:
2017-05-09 18:32:55.05 Server Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64)
Apr 29 2016 23:23:58
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows 10 Enterprise 6.3 <X64> (Build 10586: )
2017-05-09 18:32:55.05 Server UTC adjustment: 3:00
2017-05-09 18:32:55.05 Server (c) Microsoft Corporation.
2017-05-09 18:32:55.05 Server All rights reserved.
2017-05-09 18:32:55.05 Server Server process ID is 7956.
2017-05-09 18:32:55.05 Server System Manufacturer: 'ASUSTeK COMPUTER INC.', System Model: 'X550JX'.
2017-05-09 18:32:55.06 Server Authentication mode is WINDOWS-ONLY.
2017-05-09 18:32:55.06 Server Logging SQL Server messages in file 'C:\1.txt'.
2017-05-09 18:32:55.06 Server The service account is 'USER-PC\User'. This is an informational message; no user action is required.
2017-05-09 18:32:55.06 Server Command Line Startup Parameters:
-s "MSSQL"
-e "C:\1.txt"
2017-05-09 18:32:55.06 Server Error: 17113, Severity: 16, State: 1.
2017-05-09 18:32:55.06 Server Error 3(The system cannot find the path specified.) occurred while opening file 'master.mdf' to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.
2017-05-09 18:32:55.07 Server SQL Server shutdown has been initiated
I tried to add permissions for windows user, local system and local service but it didn't help.
The error log gives you the information about the failure: Error 3(The system cannot find the path specified.) occurred while opening file 'master.mdf' to obtain configuration information at startup. An invalid startup option might have caused the error.
You should check your startup parameters.
Start Configuration Manager -> SQL Server Services -> your instance -> Properties -> Advanced -> Startup Parameters.
It should contain paths to master.mdf, mastlog.ldf and errorlog