Unhandled Exception: System.Runtime.InteropServices.COMException (0x800A03EC)

前端 未结 1 1483
不知归路
不知归路 2021-01-02 10:57

I have a C# application that exports an Excel file. When I run it from Visual Studio, it is working fine. However, when I schedule it to run from SQL Server Agent, it failed

相关标签:
1条回答
  • 2021-01-02 11:47

    I tried this and it worked. I found "Microsoft Excel Application" is missing in DCOM Config. So, I did the following steps:

    1. Start
    2. Run
    3. mmc -32
    4. File
    5. Add Remove Snap-in
    6. Component Services
    7. Add
    8. OK
    9. Console Root
    10. Component Services
    11. Computers
    12. My Computer
    13. DCOM Config
    14. Microsoft Excel Application -> Right click -> Properties
    15. On Security tab, give full permissions to the domain user and NT SERVICE\SQLSERVERAGENT on: a. Launch and Active Permissions b. Access Permissions c. Configuration Permissions
    16. On Identiy tab -> change to Interactive User

    That's it. I ran the SQL job and it succeeded.

    0 讨论(0)
提交回复
热议问题