ActiveX scipt: Permission denied on Wscript.shell

  • Hi,
     
    Windows Server 2003 Enterprise
    SQLServer 2000
     
     
    We have a series of dts packages that use an ini file to locate various properties for the packages at runtime e.g. UDLPath etc.
     
    This is running fine on four of our servers but in migrating it to a fifth we are receiving a permission denied error when the script tries to reference the windows scripting host shell ie
     
      Dim wshShell

      Set wshShell = CreateObject("WScript.Shell")

    We've tried this from an administrator account and still get the above error.
     
    Curiously when the task is execuetd in isolation from the dts design window it works but when teh package as a whole is run from the design window it fails. If we set the workflow properties for the task to execute on the main thread then it also works but as its working on other servers without doing this it seems to be some configuration issue.
     
    Any ideas ?
     
    cheers
    Mark 
  • Are the packages scheduled to execute as a job?  Does the SQL Agent have access to the directories that contain the INI files?  Are you using UNC paths?

  • Hi,

    Nope. Package not run as a scheduled job, just being activated through designer at the moment.

    Simple test to repeat the problem was to open a new package in DTS designer, add an activeX script task, add the lines

    dim oShell

    set oShell=createobject("wscript.shell")

    save and execute.

    If the task only was executed then it was successful, if the package was executed from the designer window then it failed with permission denied on createobject.

    if the createobject was switched to something else ie the msxml2.domdocument then all worked fine.

    due to time constraints we have reinstalled sql server - that did not resolve the issue so in the end we have rebuilt the server  and all is now ok.

    would like to know what the issue was for future reference, just seems weird that when working in the design window ( i understand the authentication rules with scheduled jobs ) the single task was successful but the package was not, even though there was nothing else in the package.

    am i to understand from this that authentication is different in these two instances?

    cheers

    Mark

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply