Tuesday, August 5, 2014

Error in running SQL Query having VBScript and Excel Containers

Error 1 :  Event ID 10016 DistributedCOM
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
{00024500-0000-0000-C000-000000000046}
 and APPID
{00020812-0000-0000-C000-000000000046}
 to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.



Error 2 : Microsoft VBScript Runtime Error: Permission Denied 'CreateObject'
Error 3 :


Solution : 
1) Open Component Services.

2) Add Local Launch and Local Activation permission to Network Service Account (Or whichever is getting used by SQL Server to execure the SQL Query. In our case SQL Services are running via Network Service Account) on Microsoft Excel Application (Component Services > Computer > My Computer > DCOM Config)



3) Under Identity Tap, select "The Interactive User"

Thats it. You are ready to execute your command from SQL Server.

Let me know about you view on this article. Please comment if you have any query.

No comments:

Post a Comment

Solved : The user profile failed to attach. The process cannot access the file becase it is being used by another process

Issue :  The user profile failed to attach. Please contact Support. Status : 0x0000000B, Message: Cannot open virtual disk Error Code: 0x000...