Error 15404 showing when trying to run dtsx file SSIS? - sql-server

Can anyone help, I have a SQL table built in my database that feeds from an excel file that will be regularly updated. I got it working fine, but I need the data in SSMS to be updated upon refresh (ie: fetch the latest from the excel file).
I have created a dtsx file which I believe is what I need in order to update, but when I go to execute on SSMS I get this error message:
The job failed. Unable to determine if the owner (DESKTOP-DACFOFI\chris) of job UpdateCSKASubs has server access (reason: Could not obtain information about Windows NT group/user 'DESKTOP-DACFOFI\chris', error code 0x534. [SQLSTATE 42000] (Error 15404)).
I saw on other forums that the solution was to change Owner to "sa", but that gave me this error message:
Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility Version 15.0.2000.5 for 64-bit Copyright (C) 2019 Microsoft. All rights reserved. Started: 16:03:36 Error: 2021-04-03 16:03:36.61 Code: 0xC0011007 Source: {122CA6EC-6AEA-452B-95FC-516979E12E61} Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted. End Error Error: 2021-04-03 16:03:36.62 Code: 0xC0011002 Source: {122CA6EC-6AEA-452B-95FC-516979E12E61}
Description: Failed to open package file "C:\Users\chris\Google Drive\CSKA\ImportFromExcel.dtsx" due to error 0x80070005 "Access is denied.". This occurs when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of specifying an incorrect file name when calling LoadPackage or the specified XML file has an incorrect format. End Error Could not load package "C:\Users\chris\Google Drive\CSKA\ImportFromExcel.dtsx" because of error 0xC0011002. Description: Failed to open package file "C:\Users\chris\Google Drive\CSKA\ImportFromExcel.dtsx" due to error 0x80070005 "Access is denied.". This occurs when loading a package and the file cannot be opened or loaded correctly into the XML document.
This can be the result of specifying an incorrect file name when
calling LoadPackage or the specified XML file has an incorrect format.
Source: {122CA6EC-6AEA-452B-95FC-516979E12E61} Started: 16:03:36
Finished: 16:03:36 Elapsed: 0.016 seconds. The package could not be
found. The step failed.

When you run it as sa, the error message indicates that the SQL Agent process cannot access a package in your user space.
To resolve that, deploy the package to somewhere the sql agent can access. The DTS Package Store is likely as good as any. Your error message indicates "SQL Server Execute Package Utility Version 15" so v15 is also SQL Server 2019 so copy the file to
C:\Program Files\Microsoft SQL Server\150\DTS\Packages
Unless you need to run it in 32 bit mode, then copy to (I think - it's been a long while since I've dealt with file system deploys)
C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Packages
Depending on whether the Excel file is a local or network resource, you might then run into an issue with connecting to the UNC/mount path but that'll be an artifact of how you have SQL Server/Agent and the job (credentialed user?) set up.

Related

Why does SSIS package fail with invalid signature after migration?

My office just migrated from SQL Server 2008R2 to SQL Server 2017. We converted just under 100 SSIS packages to the 2017 format. We have many of these being triggered by SQL jobs. The large majority of these are running fine after the migration. However, we have a handful (maybe 10) that are sometimes failing with an invalid signature error. For those that are failing, I am not even seeing a consistent 100% failure rate.
Why are the packages failing intermittently with this error?
Below is an example of the full error text. One of the example packages was deployed to 4 different servers, and it runs fine on 3 of them. The only difference between the 4 versions is the path to the dtconfig file. We did not change anything about the jobs that call the packages.
I tried re-deploying the failing package for that example that I just mentioned, but it will still fail intermittently with an invalid signature error. In addition, I had our IT department confirm that the user under which the jobs execute has permissions to read the dtsx file.
Executed as user: domain\username. Microsoft (R) SQL Server Execute
Package Utility Version 14.0.3045.24 for 64-bit Copyright (C) 2017
Microsoft. All rights reserved. Started: 6:30:00 AM Error:
2018-12-18 06:30:00.82 Code: 0xC0011007 Source:
{5576F0C1-D470-418D-8FAB-9700612AEF76} Description: Unable to
load the package as XML because of package does not have a valid XML
format. A specific XML parser error will be posted. End Error Error:
2018-12-18 06:30:00.82 Code: 0xC0011002 Source:
{5576F0C1-D470-418D-8FAB-9700612AEF76} Description: Failed to
open package file "\\servername\sharename\mypackage.dtsx" due to error
0x80090006 "Invalid Signature.". This occurs when loading a package
and the file cannot be opened or loaded correctly into the XML
document. This can be the result of specifying an incorrect file name
when calling LoadPackage or the specified XML file has an incorrect
format. End Error Could not load package
"\\servername\sharename\mypackage.dtsx" because of error 0xC0011002.
Description: Failed to open package file
"\\servername\sharename\mypackage.dtsx" due to error 0x80090006
"Invalid Signature.". This occurs when loading a package and the file
cannot be opened or loaded correctly into the XML document. This can
be the result of specifying an incorrect file name when calling
LoadPackage or the specified XML file has an incorrect format.
Source: {5576F0C1-D470-418D-8FAB-9700612AEF76} Started: 6:30:00 AM
Finished: 6:30:00 AM Elapsed: 0.016 seconds. The package could not
be found. The step failed.
A co-worker found a solution that worked for us. We had to update the SQL Server jobs that called the SSIS packages. Instead of referencing UNC paths, these jobs are now referencing local paths. After making this change, we are no longer seeing the errors.
The same job definitions were working under SQL Server 2008R2. However, we did also update our server OS version at the same time, so perhaps that was a factor as well.

Error 0xC0011008 the package failed to load

I'm facing a strange behavior of SQL Server Agent when executing SSIS packages.
I have a job that includes many steps (mainly SSIS packages). Some steps fail mostly every day even the configuration is the same for all the steps.
I tried to delete/create the job, delete/create the SQL Server Agent Proxy but with no sucess.
I can't find any difference between the steps that fail and the ones that succeed.
This is the error returned by SQL Server Agent :
The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information
SQL Server version : 2014
SSIS version : 2014
EDIT :
In the Event Log I found an Information Message from User Profile Service that says :
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards
Process 5924 (\Device\HarddiskVolume2\Program Files\Microsoft SQL Server\120\DTS\Binn\DTExec.exe) has opened key \REGISTRY\USER\S-X-X-XX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX\Control Panel\International
Process 5924 (\Device\HarddiskVolume2\Program Files\Microsoft SQL Server\120\DTS\Binn\DTExec.exe) has opened key \REGISTRY\USER\S-X-X-XX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX\Software\Microsoft\Windows\CurrentVersion
The SID corresponds to the Proxy User used to execute the SQL Job steps. And the timestamp corresponds is the same when the error occures in SQL Agent.
I think this is what causes the steps to fail.
Could we prevent Windows unloading this registry ?
The error was indeed caused by the fact that the User Profile Service forces the unloading of the Registry.
The solution that worked for me was to change the policy setting Do not forcefully unload the user registry at user logoff from "Not Configured" to Enabled.
Start the Local Group Policy Editor (gpedit.msc)
Go to Computer Configuration > Administrative Templates > System > User Profiles
Set "Do not forcefully unload the user registry at user logoff" to Enabled
Run gpupdate command.
Details can be found here : https://support.microsoft.com/en-us/help/2287297/a-com-application-may-stop-working-on-windows-server-2008-when-a-user

SSIS 08 job runs a SSRS 08 report but fails when ran in SQL Server

I have created an SSIS package (08) that has a script task which runs an SSRS report (08) with given parameters. The report creates a pdf version of the file on a file share drive of my choosing.
When I run the SSIS manually it works perfectly, however, when I upload SSIS into SQL and then run it from the job agent it fails. It gives a long error message but the basic piece is;
(0xC0016016 Source: Description: Failed to decrypt
protected XML node "DTS:Property" 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: 2018-01-15 16:09:58.28 Code: 0xC001600C
Source:
PackageSchedule Connection manager "ReportServer08"
Description:
Server authentication failed. This error occurs when login credentials
are not provided, or the credentials are incorrect. )
I have tried to change the "ProtectionLevel" to "EncryptSensitiveWithPassword" and also "Donset upSensitive".
I setup a subscription to the report just to make sure it wasn't a read/write error to the specific folder and the subscription ran without error as well.
Any help on this would be greatly appreciated.
According to this SO answer the issue was related to a date type issue. You could be experiencing the same thing
Thank-you for the feedback. I was able to figure it out. On Import of the package to SQL itself I changed the 'Protection Level' to 'Rely on server storage and roles for access control'. This allowed the job to execute successfully and everything looks great!

SSIS - Create Batch File to Run Package

*****Update*** Also, I have tested utilizing the same database. (extract from one table into another in the same database and it was successful)
New error: Code 0xc029303
Source: Package Connection Manager "Rpt"
Description: The request OLEDB provider ORAOLEDB.1 is not registered. IF the 64-bit driver is not installed, run the package in 32-bit moded
Perhaps it has to do with the multiple connections from Oracle db to SQL db?
FYI: First time creating a Batch file and trying to auto run a SSIS package
Project:
Extract data (one table) from one database (Oracle) to SQL Server, auto execution update, daily.
Short term goal:
Create Batch file and have file execute SSIS package. The SSIS package runs in SSIS with no warnings or errors.
Properties I have changed:
Max Error Count 10
Delay Validation = True
Force Exec Type = Int64
Run 64 BtRunTime = False
I have created a Batch file, see below
"C:\Program Files\Microsoft SQL Server\110 \DTS\Binn\DTExec.exe" /f "C:\Users\J\Desktop\Si\Si\Package.dtsx"
From the CMD I receive the below error:
Code: 0xc0047017
Source: Data Flow Task SSIS.Pipeline
Description: RPT Vendor Data failed Validation and returned error code 0xc020801c
End Error
Progress: 2017-03-20
Source Data Flow Task
Validating: 50% complete
End Progress.
Error: 2017-03-20
Code: 0xc004700c
Source Data Flow Task SSIS.Pipeline
Description: One or more components failed validation
End Error
Error: 2017-03-20
Code:0xc0024107
Source Data Flow Task
Desc There were errors during task validation
End Error
DTExec: The pacakge execution returned DTSER_SUCCES <0>
I was able to adjust the Batch file to relect 32 bit (x86). File below:
"C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe" /f "C:\Users\J\Desktop\lth\Package.dtsx"

SSIS Package runs from SSIS but not from Job

I have built an SSIS Packaage that imports data on a daily basis.
i have tested it in BIDS and it runs fine, i have deployed it to the the SSIS server and it runs fine, but when i schedule it to run as a job it Errors out. i get the errors below. i've added the srvSQLagent account to the the correct group to have access to the folder that causing the problem.. am i missing something stupid here?
===================================================================
Date 03/07/2013 14:55:06
Log Job History (Import SN2 Data)
Step ID 1
Server STX-RPT
Job Name Import SN2 Data
Step Name Run Import Package
Duration 00:00:09
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: INT\srvSQLagent. Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 14:55:06
Error: 2013-07-03 14:55:15.69
Code: 0xC001401E
Source: Servicenet Data Import Connection manager "Downloaded"
Description: The file name "\\FILE\Groups\ISG\England\Servicenet Data\Downloaded" specified in the connection was not valid. End Error
Error: 2013-07-03 14:55:15.69
Code: 0xC0202070
Source: Servicenet Data Import Connection manager "Downloaded"
Description: The file name property is not valid. The file name is a device or contains invalid characters. End Error
Error: 2013-07-03 14:55:15.69
Code: 0xC0029163
Source: File System Task File System Task
Description: File or directory "\\FILE\Groups\ISG\England\Servicenet Data\Downloaded" represented by connection "Downloaded" does not exist. End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 14:55:06
Finished: 14:55:15
Elapsed: 9 seconds.
The package execution failed.
The step failed.
The issue had arisen from using a File system task to clear a folder of all Files.
I never got to the bottom of the problem, i simply found a different method of deleting the required files.
It's definitely folder permission issue.
Please give proper rights for everyone.
Alpesh Dhori
Software Professional
I suppose that next solution will help you:
Assume that we need to write
\\serv\share\dir1..\dirN\targetDir\somefile.txt using SSIS throught SQL Agent Job and nonadmin proxy account MyDomain\TestAccount
1) MyDomain\TestAccount need read/write access to share \\serv\share
2) MyDomain\TestAccount needed at least FILE_READ_DATA permission for all folders (share,dir1,..dirN)
3) MyDomain\TestAccount needed the CHANGE rights + FILE_DELETE_CHILD permission for folder targetDir
(cacls should show this permissions as following:
DELETE
READ_CONTROL
SYNCHRONIZE
FILE_GENERIC_READ
FILE_GENERIC_WRITE
FILE_GENERIC_EXECUTE
FILE_READ_DATA
FILE_WRITE_DATA
FILE_APPEND_DATA
FILE_READ_EA
FILE_WRITE_EA
FILE_EXECUTE
FILE_DELETE_CHILD
FILE_READ_ATTRIBUTES
FILE_WRITE_ATTRIBUTES
)
Of course the full rights for targetDir are enough.
If targetDir doesn't has FILE_DELETE_CHILD permission then we see such strange behavior of flat file connection in SSIS. User MyDomain\TestAccount may doing anything with file somefile.txt (read,write,delete) using standard Windows tools. But SSIS Job can't overwrite this file and fail.

Resources