2

I have a SSIS package which is used to exported SQL Server data to an Excel file through Interop.

When I executed the package from stored procedure, the execution failed and showed following error.

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

And here is my stored procedure cmd.

create PROCEDURE [dbo].[sp_test_SSIS]
AS
begin
DECLARE @cmd varchar(1000)
set @cmd= 'dtexec /f "D:\project\toExcel.dtsx"'
exec xp_cmdshell @cmd
end

I've search a lot to see others fixes but most of them are related to IIS settings. Those are not the answer I want because I do not use web service. Can anyone help? Thanks.

4
  • Are you sure that you have read and write permissions for destination folder? Commented May 10, 2021 at 15:00
  • Can you post the definition of your Stored Procedure call?
    – billinkc
    Commented May 10, 2021 at 18:08
  • Have you checked which Windows account the SSIS package is getting executed under? You may need to give that account Launch and Activation Permissions on the {00024500-0000-0000-C000-000000000046} class ID (Microsoft Excel Application) in Component Services's DCOM Config. Commented May 19, 2021 at 4:10
  • @AlwaysLearning Yes I give my computer windows acoount Launch and Activation Permissions in DCOM Config. But it did not work.
    – varen
    Commented May 20, 2021 at 12:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.