Running An SSIS Package As A Scheduled Job Using The SQLAgent Service Account
Apr 28, 2006
Hi
Using SQL Server 2005 with SP1, I have successfully managed to schedule jobs to run SSIS packages. They connect to another SQLServer 2000 box, using SQLOLEDB connection manager, to extract data and import it into SQL 2005. The protection level for the packages is Server storage so that the job is run under the SQL Agent account. This is a specific domain account so that it can access other servers.
However, using the same setup for a scheduled job to to run an SSIS package which connects to another SQL Server 2000 box with connection manager SQL OLEDB, I get the following error message:
The AcquireConnection method call to the connection manager "xxx" failed with error code 0xC0202009.
As the both the successful and failed jobs seem to have been set up in the same way with the same protection levels and are both run under a domain sql agent account, is there anything else I should be checking that I don't know about?
I have a package on the default instance which runs and completes successfully. When that package is moved to the same SQL server, but a different instance, running under the same service account, it fails. The error is below with some specific stuff removed:
Delete Data from Level 1:Error: Executing the query "-- Variable to capture FileID's DECLARE @DeleteFil..." failed with the following error: "The DELETE permission was denied on the object '[name removed]', database '[]', schema '[]'.". Possible failure reasons:
Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
This makes me think that the package under the non-default instance ends up running under a different security context.
I am attempting to run an SSIS package from a web service. Right now both the service and package are on my local machine which is running XP. I have accessed the web service from a client application in debug mode. I am not sure if it is actually running under aspnet_wp.exe because it is XP and a development environment? (separate question)??? The package fails with a series of OnError messages similar to:
The result of the expression ""/c DEL /F /Q "" + @DeployFolder + "\catalog.diff.lz""" on property "Arguments" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
An initial supposition is that the permissions of the web service are inadequate for the package. I have the authentication as "Windows" and <identity impersonate="true" /> in the Web.Config file. When I break in the debugger the Environment.UserName and Environment.UserDomainName are mine and I am an Admin on the box. the authorization is 'deny users="?".
The article that describes basic implementation of this in a Web Service states:
With its default settings for authentication and authorization, a Web service generally does not have sufficient permissions to access SQL Server or the file system to load and execute packages. You may have to assign appropriate permissions to the Web service by configuring its authentication and authorization settings in the web.config file and assigning database and file system permissions as appropriate. A complete discussion of Web, database, and file system permissions is beyond the scope of this topic.
And how!
Note that the load is fine and that this is a run time error and that the package runs correctly when run manually from SQL Server using the 'run package' menu item in the Object Explorer tree of the SQL Server Management Console.
I need to know if this is an ASP.NET issue per se or XP or if this is even a security issue. And how to solve it! This is critical path so an expeditious reply with a solution would be greatly appreciated.
I've an SSIS packeage that genrates offline cube (.cub) files via an MDX query run against an Analysis Services cube. When I run the package through the Management Studio all runs fine and the cube files are generated and can be used by excel.
However when I run this package through a SQL Agent job the files are generated and the job completes successfully , but when I try to open them in Excel they appear to be corrupted and I the Data Link properties screen comes up. In looking at the files the ones generated by the SQL Agent are also a different size than those generated from running the package directly
Has anyone else seen this kind of behavior? As an FYI I'm adding the files to the SQL Agent step from the SSIS Package Store.
Microsoft recommends that you do not use the Network Service account to run the SQL Server service (see http://msdn2.microsoft.com/en-us/library/ms143504.aspx).
Can anyone tell me what the drawbacks are of doing this?
I have created a DTS package to read data from a SQL Server table and copy it to an Excel file on one sheet. I have tested the DTS package manually and it runs. I scheduled the package but it keeps failing giving the following error message. The path to the Excel file is valid and the SQL server is connected to the server where the Excel file resides.
... DTSRun: Executing... DTSRun OnStart: Copy Data from vw_Symbols to vw_Symbols$ Step DTSRun OnError: Copy Data from vw_Symbols to vw_Symbols$ Step, Error = -2147467259 (80004005) Error string: 'S:Mission Critical EnterprisesCurrent ProjectsJPMC Aperture Rollout 05-100-1-0001Symbol RequestsJPMC - Symbols Added.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Error source: Microsoft JET Database Engine Help file: Help context: 5003044 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -534774783 (E01FFC01) Error string: 'S:Mission Critical EnterprisesCurrent ProjectsJPMC Aperture Rollout 05-100-1-0001Symbol RequestsJPMC - Symbols Added.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Error sour... Process Exit Code 1. The step failed.
i had scheduled to run a package it failed but a part of the package still shows up on the integration system running packages. i tried to stop it or delete it nothing works. when i try toi run the package even in visual studio that part of the package fails.
I have a SQL Scheduled Job in SQL 2005 SP2 that executes a few different SSIS packages. When I update the SSIS Packages, SQL Agent runs the job and shows success; however, the underlying packages are not executed. The packages are located on the server but we are using UNC paths in the jobs since much of the time they are started manually from a remote workstation and the jobs seem to look at the initiating workstation's file server rather than that of the SQL Server. Is this a known issue?
I understand Sql Server Integration Services by default uses"NT AuthorityNetwork Service" account as service account. Is running SSIS using "NT AuthorityNetwork Service" account is good or should we create a domain account to run the SSIS service.
Hey, I've a few jobs which call SSIS packages. If I run the SSIS package, it runs fine but if I try to run the job which calls this package, it fails. Can someone help me troubleshoot this issue? None of my jobs that call an SSIS package work. All of them fail.
During install of SQL Server 2005, we can of course use a domain account or the built-in system account for running the services. I lean toward domain for obvious reaons but would like to know a +/- to each option and why I'd choose one over the other and what consequences or limitations one may encounter if I choose one over the other.
what is considered best practice for privileges etc on the sql agent service account and long term need for that account to run ssis packages? I tried to understand and appreciate the article at http://www.microsoft.com/technet/prodtechnol/sql/2005/newsqlagent.mspx but felt like either it was overkill or I wasnt getting it.
I have a SSIS package that consists of 3 Script Tasks, two Data Flow Tasks. Each script tasks executes a FTP command. The first one renames the file, the second gets the renamed file and third resets it back to original name for testing.
When I run via BIDS or DTSExec all work fine. When I schedule it, only the first script runs. It never downloads the file.
Setup - SQL 2005 SP2, SSIS is running, 32 bit OS, SQL Agent Account is local admin. Package protection level is DontSaveSensitive. PrecompileScriptIntoBinaryCode = True
I have 3 SSIS packages I had in a project and exported and scheduled via an SQL Agent job. 2 are working great and one is failing. I have noticed on this one its also having issues in BIDS. It runs sucessfully once then next day when I go in it fails. If I just go into the Data flow and open up the SQL Destimation and then hit ok and try re-running it works. It is like there is something that it doesn't remember.
Same thing happens in SQL Agent if before I promote I go into SQl destination editor hit ok save then
create my build run it via agent job it works 1st time but fails on the following time. I don't see anything different between this SSIS and the others but there must be something.
All of these are simple copy data from as/400 to SQL server with some data conversions.
Here is the error msg I am receiving.
Message Executed as user: PERFORMANCEstacyadmin. ....3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 5:55:11 AM Error: 2008-04-08 05:56:00.88 Code: 0xC0202009 Source: Load WeeklySalesHistory Current Week WeeklySalesHistory [184] Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "Reading from DTS buffer timed out.". End Error Error: 2... The package execution fa... The step failed.
I have a web service running on a sql server that I want to use to call a package on the same server. I create an application pool on IIS to use a configurable identity (IWAM_<ServerName>) and added this account to sql.
I have a question and problem.
Question:
Excluding specific tasks that I need the account to be able to run what are the minimum permissions this account needs to run a package (read access to MSDB?)?
Problem:
For the time being I have the IWAM account in sql added to the sysadmin server role and a server administrator. When I attempt to call the web service I receive "Object reference not set to an instance of an object". If I run the web service from my local machine the .Execute method of my package returns 1 (a constant of
DTSExecResult which indicates failure).
I have verbose logging on the package enabled but nothing gets logged. I looked in the server logs and don't see any relevent entries for application/security or system. Since the IWAM user has significant permissions I have no idea what else to look at.
I have an SSIS package created from a SQL 2000 DTS using the Migration Wizard. The package imports data from a MySQL database to a SQL 2005 64-bit database running on 64-bit windows server 2003. The package runs fine when executed from SQL Server Management Studio but when I schedule it as a job it fails with:
Executed as user: [the domain admin account]. The package execution failed. The step failed.
I've tried a lot of different ways to make this work including creating a new SSIS package. Again, the package ran fine except when it was scheduled as a job.
I have a SSIS package with an FTP task to download a Excel file and populate a table using an excel connection mnager and a SQL Server Destination and it always fails with the following error when scheduled:
The job failed. The Job was invoked by User sa. The last step to run was step 1 (FTP-DM-CRN_ALLOCATION_COMMENTS).
Executed as user: WEB-INTSQLSYSTEM. The package execution failed. The step failed.
The box on which SQL Server is installed is on a workgroup on the domain and the SQL Server is started up by the Local System user on the box.
I am thinking this has to do with windows security based on all the information that I have read on these kind of error messages. Any input on resolving this will be much appreciated.
HELP! I have been banging my head against a brick wall on this one all this morning AAAAAAGGGHHH!
1. I have an SSIS package that runs a simple SQL script and then updates a few tables by downloading some XML of the web. It runs fine when I kick it off manually under SSMS.
2. I created a SQL Server Agent job to run it every day. This always fails. The error information in the log is useless ("Executed as user: domainuser. The package execution failed. The step failed." - I had already figured that out!). It fails almost straight away, and when I enable logging for the SSIS package, no info is ever logged (text file, windows event log, whatever).
3. Out of desperation I have changed Agent to run under the same domain user account that I created the package with. No use.
My questions:
1. How can I get more detailed logging from SQL Server Agent?
2 Any ideas about why it's failing in the first place.
I have one SSIS package that fails on occasion. And I can then run this in the job by itself after it fails and it runs fine. Any ideas? Any ideas on what is causing this. It is not every day but about once a week lately but it just happened again today to this is 2nd time in 4 days this has happened. It is always on this same part in the SSIS that it fails when it does fail. 4 times in last 2 weeks.
This step it is on here has a OLE DB - DB2 source and SQL server as destination. It does a couple data conversion, derived columns and then just copies the data from the db2 table to the sql server table.
Message Executed as user: PERFORMANCEstacyadmin. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 6:06:12 AM Error: 2008-05-13 06:09:22.84 Code: 0xC0202071 Source: Copy SalesTender Retail TmpSalesTenderRetail [97] Description: Unable to prepare the SSIS bulk insert for data insertion. End Error Error: 2008-05-13 06:09:23.42 Code: 0xC004701A Source: Copy SalesTender Retail DTS.Pipeline Description: component "TmpSalesTenderRetail" (97) failed the pre-execute phase and returned error code 0xC0202071. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 6:06:12 AM Finished: 6:09:23 AM Elapsed: 191.157 seconds. The package execution failed. The step failed.
I have got a strange problem on runing SSIS package, please help me.
The package contains a Script Task which function is downloading files from a SFTP server with using psftp command line application. It will run successfully with using dtutil.exe and as a job with using a ssis execute proxy(domian account as credential), but fail runing the package as a job with using a ssis execute proxy(local windows account as credential, although has Administrator permission).
It seems a permission problem, but I try a lot and can't solve it.
I am in the process of moving from a 32-bit SQL Server 2005 Enterprise (9.0.3054) to a 64-bit SQL Server 2005 Enterprise (9.0.3054 with 4 CPUs and 8GB of memory on Win 2003 SP2) and the process has been very frustrating to say the least. I am having a problem with packages that I created on my 64-bit SQL Server. I am importing a few tables from the 32-SQL Server into the 64-bit SQL Server using the Task --> Import to create the package.
Sometimes when I am creating a package I get the following error in a message box:
SQL Server Import and Export Wizard
The SSIS Runtime object could not be created. Verify that DTS.dll is available and registered. The wizard cannot continue and it will terminate.
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (System.Windows.Forms)
Other times when I run a package that has run successfully before I get the following error:
Faulting application dtexecui.exe, version 9.0.3042.0, stamp 45cd726d, faulting module unknown, version 0.0.0.0, stamp 00000000, debug? 0, fault address 0x025d23f0.
The package appears to hang when running. By this I mean that the Package Execution Progress shows progress up to a point then it just stops. (The package takes about 17 seconds to run normally) CPU usage is at 1% and the package cannot be stopped.
I have deleted and re-created the package several times and I have also re-installed the service pack on the SQL Server (9.0.3054) but that did not help.
The master package has a configuration file, specifying the connect strings The master package passes these connect-strings to the child packages in a variable Both master package and child packages have connection managers, setup to use localhost. This is done deliberately to be able to test the packages on individual development pc€™s. We do not want to change anything inside the packages when deploying to test, and from test to production. All differences will be in the config files (which are pretty fixed, they very seldom change). That way we can be sure that we can deploy to production without any changes at all.
The package is run from the file system, through a job-schedule.
We experience the following when running on a not default sql-server instance (called dkms5253uedw)
Case 1: The master package starts by executing three sql-scripts (drop foreign key€™s, truncate tables, create foreign key€™s). This works fine.
The master package then executes the first child package. We then in the sysdtslog get:
Error - €ścannot connect to database xxx€? Info - €śpackage is preparing to get connection string from parent €¦€?
The child package then executes OK, does all it€™s work, and finish. Because there has been an error, the master package then stops with an error.
Case 2: When we run exactly the same, but with the connection strings in the config file pointing to the default instance (dkms5253), the everything works fine.
Case 3: When we run exactly the same, again against the dkms5253uedw instance, but now with the exact same databases defined in the default instance, it also works perfect.
Case 4: When we then stop the sql-server on the default instance, the package faults again, this time with
Error - €śtimeout when connect to database xxx€? Info - €śpackage is preparing to get connection string from parent €¦€?
And the continues as in the first case
From all this we conclude, that the child package tries to connect to the database before it knows the connection string it gets passed in the variable from the master package. It therefore tries to connect to the default instance, and this only works if the default instance is running and has the same databases defined. As far as we can see, the child package does no work against the default instance (no logging etc.).
We have tried delayed validation in the packages and in the connection managers, but with the same results (error).
So we are desperately hoping that someone can help us solve this problem.
I have one SSIS package which is written in Visual studio business intelligence tool. For that SSIS packages i have scheduled a job from SQL server management studio 2005. I mean i have scheduled a job in SQL server agent. This job which i have scheduled contains 6 SSIS packages and the other 5 SSIS packages executes successfully but this only fails giving sone com.Interop exception.
But it is failing giving some com.interop exception. Not sure what type of error is this?
It give following type error:
Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 11:00:00 PM Error: 2008-03-27 23:00:00.81 Code: 0x00000000 Source: Execute DTS 2000 Package Task Description: System.Runtime.InteropServices.COMException (0x80040427): Execution was canceled by user. at DTS.PackageClass.Execute() at Microsoft.SqlServer.Dts.Tasks.Exec80PackageTask.Exec80PackageTask.ExecuteThread() End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 11:00:00 PM Finished: 11:00:00 PM Elapsed: 0.579 seconds. The package execution failed. The step failed.
I get the same error when i try to execute the package from Visual studio Business Intelligence tool.
Can you please help me out as to what is this "System.Runtime.InteropServices.COMException" exception occuring when scheduling or executing the job.
I've created a SSIS package that calls the access dll and fires off 2003 access reports, saves them as PDF's and emails them off.
Now this works fine when I run it manually, but when I schedule and fire off a job I get a very vague error "exception has been thrown by the target of an invocation".
I have copied the access dll to the GAC and .net framework v2.0.50727 but still no luck.
I'm using Bull zip PDF printer and those DLL's are also in the GAC
We have a vendor who has an SSIS package that executes a DTS package. We've asked that they migrate the DTS code completely to SSIS, but that is something that will not be done in the near future. The package is scheduled to run every 5 minutes through a SQL Server scheduled job. 95% of the time the package executes without an error, but occassionally the following error is reported.
Date 10/2/2007 7:35:00 AM Log Job History (Pyxis - Data Load)
Step ID 1 Server DEVSQL1V5 Job Name Pyxis - Data Load Step Name Run SSIS Package Duration 00:00:03 Sql Severity 0 Sql Message ID 0 Operator Emailed Operator Net sent Operator Paged Retries Attempted 0
Message Executed as user: Domain_NameSQLService. The return value was unknown. The process exit code was -1073741819. The step failed.
When I look at the DTS and SSIS package logs no errors are reported and each log indicates the package completed successfully.
Any ideas what this exit code is indicating or how to further troubleshoot the problem?
I am trying to call a SSIS package from a web service hosted on the same machine as the package file is sitting. The package is running fine from the Agent and also by the "Integration Services Project" in VS.NET.
I had a lot of problems with permissions but they are resolved, at least I have no error messages to point to that direction. Now I am getting these results:
1. Error: -1073659874 / Description: The file name "\Diver-svrInputDataFilesdn_cust.txt" specified in the connection was not valid.
SQL Server 2012VS 2010 SQL Server data toolsFTP Connection Manager - port 21, chunk size 1kb, passive mode=false, saved plain text pwDownloads 1 csv file to local directory on SQL Server box.This always works when run from the package. And always gives a timeout error when scheduled.
Message Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Started:Â 11:04:59 AM Error: 2014-03-27 11:05:31.12 Â Â Code: 0xC001602A Â Â [code]...
SQL Server Agent is set to Logon As my domain account, and in the package history it says "logged on as " my account.
I have several DTS jobs that runs well as a job with my nt login account for the SQL agent service startup account, but if I use the System account they fail with this error. " Error opening datafile: Access is denied. Error source: Microsoft Data Transformation Services Flat File Rowset Provider"
The data has change access to the System account under the NT security.
I'm a SQL 2005 developer DBA with a 1.5 years experience with SQL Server 2005. It has been a while since I needed to use SSIS. I used it with no problems earlier this year when I was managing the team conversion to SQL Server 2005. Now it no longer appears on my START > Programs > SQL Server 2005 menus. I had to reinstall SQL Server 2005 and Visual Studio 2005 months ago and must have lost it then some how.
How do I get access to BIDS and SSIS again?
SQL Server Integrated Services shows up in my Services list as running. I've already tried Add/Remove Programs to drop that component from SQL Server 2005, reboot, Add it back, reboot. Still does not show up in my menus and the Service is running. The Setup Bootstraplog summary for this effort shows no failures and shows this:
Product : Microsoft SQL Server 2005 Integration Services Product Version : 9.00.1399.06 Install : Successful Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0021_xxxx-xxxx_DTS.log
My SQL Server level is 9.0.3054. The About Info is:
Microsoft SQL Server Management Studio 9.00.3042.00 Microsoft Analysis Services Client Tools 2005.090.3042.00 Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158) Microsoft MSXML 2.6 3.0 4.0 5.0 6.0 Microsoft Internet Explorer 7.0.5730.11 Microsoft .NET Framework 2.0.50727.832 Operating System 5.1.2600
My Visual Studio About Info is: Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .NET Framework Version 2.0.50727 Installed Edition: Professional Microsoft Visual Basic 2005 77626-009-0096213-41845 Microsoft Visual Basic 2005 Microsoft Visual C# 2005 77626-009-0096213-41845 Microsoft Visual C# 2005 Microsoft Visual C++ 2005 77626-009-0096213-41845 Microsoft Visual C++ 2005 Microsoft Visual J# 2005 77626-009-0096213-41845 Microsoft Visual J# 2005 Microsoft Visual Web Developer 2005 77626-009-0096213-41845 Microsoft Visual Web Developer 2005 Microsoft Web Application Projects 2005 77626-009-0096213-41845 Microsoft Web Application Projects 2005 Version 8.0.50727.762 Crystal Reports AAC60-G0CSA4B-V7000AY Crystal Reports for Visual Studio 2005
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601) Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB937061)
Also, in case it is relevant, I've NEVER installed SQL Server Express or had it installed. When I reinstalled, I installed SQL Server 2005 before VS 2005 since I know that has caused problems with some people.