Backup of enterprise applications (Microsoft stack, IBM Db2, MongoDB, Oracle, PostgreSQL, SAP)
Post Reply
mwgbr
Lurker
Posts: 1
Liked: never
Joined: May 22, 2024 9:45 pm
Full Name: Robert Müller
Contact:

SQL Checker Script TLS 1.2 Compatibility Fix - SQLOLEDB.1 to MSOLEDBSQL Provider Update

Post by mwgbr »

Hi,

these are our findings after some successful troubleshooting.

Problem:
When using the built-in Veeam.Backup.SqlChecker.vbs script in SureBackup with SQL Authentication on SQL Servers that have disabled legacy protocols (SSL, TLS 1.0), the connection fails with:

Error:
[DBNETLIB][ConnectionOpen (SECCreateCredentials()).]SSL Sicherheitsfehler

Root Cause:
The script uses the outdated SQLOLEDB.1 provider which doesn't properly support TLS 1.2.

Solution:
Modify the CheckInstance subroutine in the script to use the modern MSOLEDBSQL provider:

Find this line (around line 159):

Code: Select all

sConnString = "Provider=SQLOLEDB.1;Initial Catalog=master;Server=" & sInstance
Replace with:

Code: Select all

sConnString = "Provider=MSOLEDBSQL;Initial Catalog=master;Server=" & sInstance & ";TrustServerCertificate=true;Encrypt=false"
Prerequisites:
Microsoft OLE DB Driver 19 for SQL Server must be installed on the Veeam server

Tested Configuration:
Veeam B&R 12
SQL Server 2014/2016+ with TLS 1.0/SSL disabled
Custom Application Group script with SQL Authentication
Works with both named instances (SERVER\INSTANCE) and default instances

Usage in SureBackup:
Configure as Custom Script in Application Group:
Path: %ProgramFiles%\Veeam\Backup and Replication\Backup\ModifiedSqlChecker.vbs
Arguments: %log_path% %vm_ip%\INSTANCENAME username password

Using the instance name also solves the sc problem, when connecting with a user whithout local admin rights on the SQL Server.
PetrM
Veeam Software
Posts: 3871
Liked: 654 times
Joined: Aug 28, 2013 8:23 am
Full Name: Petr Makarov
Location: Prague, Czech Republic
Contact:

Re: SQL Checker Script TLS 1.2 Compatibility Fix - SQLOLEDB.1 to MSOLEDBSQL Provider Update

Post by PetrM »

Hi Robert and Welcome to Veeam R&D Forums!

Many thanks for your feedback. I will pass this information to our R&D team to improve the behavior in future releases.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest