This article was previously published under Q298725
This article has been archived. It is offered "as is" and will no longer be updated.
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
A Data Transformation Services (DTS) package containing a Microsoft Visual Basic Script task that calls CreateObject may fail when scheduled if the default access permissions in Dcomcnfg.exe have not been configured to include the SQLAgent account. These permissions are stored in the registry key HKLM/Software/Microsoft/Ole/DefaultAccessPermission. The log file for the DTS tasks will report:
Step Error Source: Microsoft Data Transformation Services (DTS) PackageStep Error Description:Error Code: 0Error Source= Microsoft VBScript runtime errorError Description: Permission denied: 'CreateObject'
Error on Line (xx)
Step Error code: 800403FEStep Error Help File:sqldts80.hlpStep Error Help Context ID:4500
This will only happen when the SQLAgent is running under a Windows NT logon account. This same package will run successfully interactively from the DTS designer or from DTSrun.exe or when scheduled if the SQLAgent service is running under the system account.
By default the registry value DefaultAccessPermission inHKLM\software\Microsoft\Ole does not exist. If an operator adds groups or users in default access permissions by using the DCOMcnfg utility, then the value DefaultAccessPermission is created.
If the account that SQL Agent is started with is not included in DCOMcnfg's default access permission, the package will return the error noted in the "Symptoms" section and the package execution will fail.
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
To resolve this problem do one of the following:
Use the DCOMcnfg utility to add the SQLAgent login account to allow access under DefaultAccessPermissions. To add an account, do the following:
Click the Default security tab.
Click Edit default in the Default Access Permissions window.
Add the users as desired.
Delete or rename the HKLM/Software/Microsoft/Ole/DefaultAccessPermission key. WARNING: Note that this will effect the default permissions for all users on the computer. Before making this change ensure that this will not negatively effect any other DCOM applications on the computer. Although this will resolve the problem, Microsoft strongly recommends that you use the other resolution, described previously.