VBscript not running on windows server 2019

MasterSQL 0 Reputation points
2024-10-01T22:49:57.54+00:00

Hi All,

Our VB Script has been integrated with SSIS package as script task and it work in fine in visual studio IDE . However, it is getting failed to run same VB script block in windows server 2019 environment inside SSISB as a SSIS Package.

Please suggest if any specific dependency check we are missing to successfull run on windows servers

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,947 questions
SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
537 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,733 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jiale Xue - MSFT 46,296 Reputation points Microsoft Vendor
    2024-10-02T03:08:03.13+00:00

    Hi @MasterSQL , Welcome to Microsoft Q&A,

    Check Windows Script Host (WSH): Make sure Windows Script Host (WSH) is enabled on the server. VBScript requires WSH to run.

    • To check if WSH is enabled, run the following command in a command prompt:
    
    cscript //h:cscript
    
    
    • You can also run a test VBScript file directly with cscript or wscript to verify that WSH is working properly.

    Make sure script execution is allowed on the server. Some servers have restrictions on executing scripts. - Make sure there are no Group Policy settings or security policies that block script execution on the server.

    Make sure the account running the SSIS package on the server has sufficient permissions to execute the script. - Verify that the script can access the file system, registry, or any required resources on the server. - Permissions may be different if the package is running under a different user context than Visual Studio.

    The VBScript may depend on external COM objects or libraries that are not registered on the server.

    • Verify that any third-party components or DLLs used by the VBScript are installed and properly registered using regsvr32.
    • Compare COM registrations (such as ActiveX or other dependencies) between the development machine and the server.

    Enable verbose logging for SSIS packages to capture error messages or stack traces during execution on the server. This will provide more information about why the script failed.

    You can modify the VBScript to capture errors using On Error Resume Next and log or display error details using Err.Description and Err.Number.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    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.


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.