RVY200952: VBS Script Changes for SQL Inventory Plugin in RayVentory 12.6

The SQL inventory plugin script (GetSQL.vbs) in RayVentory 12.6 has been updated to improve database connectivity and extend support for newer SQL Server versions. This article outlines the key changes made to the VBS script used as an inventory plugin.

Changes Overview

The primary modifications focus on updating the database connection string to use a more modern and supported OLE DB provider, along with enhanced SQL Server version support.

Key Changes

1. Extended SQL Server Version Support

  • Before: Loop range was For iCountConn = 10 to 15
  • After: Loop range is now For iCountConn = 10 to 16
  • Impact: Adds support for SQL Server 2022 (ComputerManagement16)
 

2. Updated OLE DB Provider

  • Before: Used deprecated SQLOLEDB provider
  • After: Now uses modern MSOLEDBSQL provider
  • Impact: Ensures compatibility with current and future SQL Server versions
 

3. Enhanced Connection Security

  • Before: sSQLSecurity = "Integrated Security=SSPI;"
  • After: sSQLSecurity = "Trusted_Connection=yes;TrustServerCertificate=yes;Encrypt=Optional;"
  • Impact: Improved security handling with certificate trust and encryption options
 

4. Updated Connection String

1 ' Before
2 sSQLConnectStr = "Provider=SQLOLEDB;Data Source=.;Database=master;" & sSQLSecurity
3
4 ' After  
5 sSQLConnectStr = "Provider=MSOLEDBSQL;Data Source=.;Database=master;" & sSQLSecurity
 

Version Information

  • Script Version: Updated from 1.3 to 1.4
  • Release Date: 29.07.2025 (previously 12.06.2019)
  • Change Log Entry: "26.05.2025 Change OLE-DB Connection String incl. Support of SQL 2022"

Impact and Benefits

Improved Compatibility: The MSOLEDBSQL provider is the current Microsoft-recommended driver for SQL Server connectivity, replacing the deprecated SQLOLEDB provider.

Extended Support: Addition of SQL Server 2022 support ensures inventory collection works with the latest SQL Server versions.

Enhanced Security: Updated connection parameters provide better handling of SSL/TLS connections and certificate validation.

Future-Proofing: Using the modern OLE DB provider ensures continued support and compatibility with Microsoft's roadmap.

Important Notes

  • The SQLOLEDB provider is deprecated and end-of-life
  • MSOLEDBSQL is the recommended replacement and actively maintained by Microsoft
  • The script maintains backward compatibility with existing SQL Server installations
  • All other functionality remains unchanged, ensuring existing inventory processes continue to work

Prerequisites

Ensure that the Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) is installed on systems where this updated script will be deployed. This driver is typically included with modern Windows installations and SQL Server client tools.

 

Comments

Powered by Zendesk