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.
User contributions licensed under CC BY-SA 3.0