SSIS Package runs on the server but not as a scheduled job (SQL Agent) - sql

I have scheduled my SSIS package using SQL Server Agent Jobs. If I right click on the package and choose Execute, it does run successfully. However, when I set up the job and try to run it I get errors related to user login. I'm reading about proxy users and other option but it doesn't seem to work.
The error:
FullSnapshot:Error: SSIS Error Code 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 'DOMAIN\SERVER$'.".
The server is "SERVER" and the package is grabing data from other server into "SERVER".
What might be the possible cause for this error? Please give your suggestions. Please let me know if you need more information on that.
Thanks in advance
I guess the question is how to give permissions to the service account for SQL Server Agent on SERVER to access the second server. Because when I run different package that doesn't need to access external SQL server it works fine

When you right click and execute the package executes with your credentials. When it's executing from the server, it's using the service account for your SQL Server Agent. In this case, your Agent service appears to be an automatically generated system account which does not have access to do everything the package requires.
You will either have to set up a proxy user, or change your agent service account.
This link from a quick googling looks to provide a good walkthrough: http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/

Related

SQL Server Agent job: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication

I am trying to execute an SSIS package from SQL Server Agent however receiving the error:
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
The job itself very simple, grabbing data from a table from server A into another database from Server B. and the connection manager is OLEDB.
This job has been executed many many times in the past without any issues, but just recently this error occurred. I also have another job (SSIS package) using the same connection manager, but that job is so far so good.
What am I missing? Any help would be greatly appreciated!

SSIS Deployment Error while deploying packages into SQL Server

I was Trying to deploy SSIS package from Visual studio 2019 into MS SQL Server 2016, I have been facing deployment error as shown below:
"“A .NET Framework error occurred during execution of user-defined routine or aggregate "deploy_project_internal": System.ComponentModel.Win32Exception: A required privilege is not held by the client.”
After few hours of debugging found that the error is actually from SQL Server. SQL Server is unable to run the stored procedure from SSISDB "[catalog].[check_schema_version] ".
Hence we realized that there are certain privileges for the current service account on which SQL Server is running. Hence we have created a new local admin account and provided all privileges.
• As per Microsoft suggestion, we have added the SQl server service account & SQL server integration service account in the below Configs :
o Edited DCOM config properties and provided granted the Local Launch and Local Activation permissions for the below component services
 Microsoft SQL Server Integration Services 11.0, Microsoft SQL Server Integration Services 12.0 and Microsoft SQL Server Integration Services 13.0
o Further we extended permissions for both the service accounts as below :
 Log on as a service .
 Permission to write to application event log.
 Impersonate a client after authentication.
 Adjust memory quotas for a process
Below are the two group policies yet to be added :
 Bypass traverse checking
 Replace a process-level token
I would like to know if this resolves the issue and please suggest anything that we are missing here to resolve the issue.
After adding the New service account to the listed group policies, the deployment got succeeded.
I ran into this problem after a new Security Policy was put in place that broke WinRM (disabled "Allow remote server management through WinRM"). Even after rolling back the change I could not deploy SSIS packages. I finally fixed the problem by running the "Repair" SQL option from the installation disk and then restarting the server. After that deployments worked as normal.

SSIS Error - The AcquireConnection method call to the connection manager failed with error code 0xC0202009

I have scoured high and low for a solution but nothing has helped. To be clear, I am not developing a SSIS package, I am simply trying to run one that has already proven to work. This issue is server specific.
We have an ETL Job that builds a repository from a production database for reporting purposes. I built a new VM server with bigger resources to ease the burden of this process on our larger databases.
Server is Windows Server 2012R2. Running SQL Server 2014 SP2 CU05 with integration services and really not much else. This job runs through the agent on 15 minute intervals. The first few times it runs, it does actually start building some of the data in the destination database, but this error persists with every new batch that is executed, whether manually or on schedule, and after a while it just stops moving data.
Here is the base error:
SSIS Error Code DTS_E_CANNOTACQVIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "ETL_Framework" failed with error code 0xCO202009.
There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Said error messages before the AcquireConnection call:
SSIS Error Code DTS_E OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
Source: "Microsoft SQL Server Native Client 11.0" Description: "Login timeout expired".
Source. "Microsoft SQL Server Native Client 11.0" Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online."
Source. "Microsoft SQL Server Native Client 11.0" Description: "Named Pipes Provider: Could not open a connection to SQL Server [2]. ".
One important thing to bear in mind is that both the source and destination databases are on this same server that the job is running from, meaning everything is localized and the domain service account is a local admin on the server and a sysadmin on SQL.
I have Named Pipes and TCP/IP protocols enabled on SQL. The service account running the job is a domain user that I have used hundreds of times on other servers setup for this same kind of work with never having a problem. I can connect via SSMS to this server from other VMs using the FQDN of the instance (i.e. SZDB.somewhere.com\SQL2014), and vice-versa.
So, open to suggestions here. There has to be something I am missing in the setup of my server.
We found that the solution in this case was to install a default instance of SQL Server. I previously only had a named instance running. As soon as I went through SQL setup and installed the default instance (i.e. MSSQLSERVER), the error on our ETL job went away and our data warehouse continued to build without any further issues. Proved to be the solution on two other servers as well that were exhibiting the same issue.

SQL Server 2008 - Reporting Services Failed Login for User '...'

Good Afternoon,
I'm having difficulty running a report with a data source saved on the Report Server using credentials for a user I created on SQL Server named 'ReportUser'. Attempting to resolve this I've mapped the user to the 'ReportServer' database with the db_owner role as well as setting the default database to the 'ReportServer'. However, each time I attempt to run the report I receive the error message:
Cannot create a connection to data source 'Test'. Login failed for user 'ReportUser'.
I'm running SQL Server 2008 from my local machine and am able to successfully run the reports when I setup the datasource using Windows Authentication. Any idea on what could be causing the issues when attempting to use the SQL Authentication with the 'ReportUser'
Thank you very much for your help!
Thank you for your reply.
I believe I found the cause of my issue. Since this was a local install for testing purposes I just set up the instance of SQL Server with Windows Authentication. However, I made the mistake of not setting up the server for both Windows and SQL Authentication. The following link helped me resolve this.
http://forums.asp.net/t/1784261.aspx/1?Could+not+connect+to+database+login+failed+for+user+sa
After changing this setting and restarting the SQL Server everything appears to be running properly now.

Run SSIS package from SQL client

I deployed my working package on server which is enterprise edition, SSIS installed on it. When I tries to run package by connecting to integration services engine from my desktop SQL client (which doesn't have SSIS installed) I get error "The task "Send Mail Task" cannot run on this edition of Integration Services. It requires a higher level edition."
Does it mean that I need to login to the server (RDP) and then run the package?
Also, when I schedule the package thru SQL agent it fails saying login time out but my windos auth login works for everything from connecting, deployment. Any clue?
For your first problem - yes, you need to RDP into the server in order to use SSMS to start the package. When you start it using SSMS on your client, it's attempting to launch the DTExec process on your client machine. It's not running DTExec on the server.
Your second problem is likely a permissions issue. Possibility #1: The connections you have set up on your package require your authentication information, and they don't have it because they're running as the Agent account. You can fix that by creating a Proxy for your account and using that to run your job step. Possibility #2: The connections you have set up on your package are having their sensitive information stripped out due to the default encryption on the packages that prevents anyone but "you" from seeing it - including a SQL Agent job that isn't running "as you". The same resolution as above can help that (as well as others).