How can I avoid failure when running a job automatically with InteropServices

Jesus Cozatl 1 Reputation point
2021-01-04T22:54:45.437+00:00

I have a DTSX, it has C# code that runs Interop applications to do some tasks with excel files, but, I am not able to run correctly with an automatic schedule from job, before I tasted this locally and it worked ok, but on SQL Server no, I configured DCOM Config-> Microsoft Excel Application over tab Security and Identity and afterwards I was able to run correctly manually from the job, when I add a schedule to run this automatically, sometimes it runs ok, but a lot of times it runs with errors, I reviewed all permissions but I can't find the correct configuration, all other jobs run correctly, please give me support about it.
This is the error:
factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a The server process could not be started because the configured identity is incorrect. Check the username and password. (Exception from HRESULT: 0x8000401A).

This is SQL Server version:
Microsoft SQL Server Management Studio 13.0.16106.4

OS 64 bits

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,005 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,592 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalv-MSFT 5,901 Reputation points
    2021-01-05T06:09:28.577+00:00

    Hi @Jesus Cozatl ,

    1. Could you please share the example C# code ?
    2. Please refer to the following links:
      Troubleshooting "Error code 8000401A: The server process could not be started because the configured identify is incorrect. Check the username and password"
      a. Modify the COM+ user's password (in Active Directory) to a new (known) value. Then update the password on the IBMCOGNOSCONTROLLER COM+ application.
      b. Add the COM+ user to the local group "Administrators" which exists on the Controller application server.
      c. Modify both the local security policy and the domain (Active Directory GPO) security policy so that there are no restrictions placed on the COM+ user.
      d. Give the COM+ user account (for example "DOMAIN\Controller_system") the Windows security option "Log on as a batch job".

    Best Regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues in November--What can I do if my transaction log is full?
    Hot issues in November--How to convert Profiler trace into a SQL Server table?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.