Hey All,
I've encountered the error message about B&R not being able to truncate SQL Logs today and managed to get it solved. I'm running SQL Server 2017 Express on Windows Server 2019 Standard running as a guest on a Hyper-V 2016 and Veeam B&R 9.5U4. My case precisely revolved around the error code 0x80004005 logged by the guest helper:
Code: Select all
7/23/2019 12:46:12 AM 5520 INFO Connecting to mssql, connection string: Provider='sqloledb';Data Source='server.domain.local\DBNAME';Integrated Security='SSPI';Persist Security Info=False, timeout: 15
7/23/2019 12:46:28 AM 5520 WARN Instance 'DBNAME' connection problem: Code = 0x80004005
7/23/2019 12:46:28 AM 5520 WARN Code meaning = Unspecified error
7/23/2019 12:46:28 AM 5520 WARN Source = Microsoft OLE DB Provider for SQL Server
7/23/2019 12:46:28 AM 5520 WARN Description = [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
7/23/2019 12:46:28 AM 5520 WARN
7/23/2019 12:46:28 AM 5520 WARN COM error: Code: 0x80004005.
I'm using a dedicated backup operator account which is a member of the Domain Admins group which in turn is assigned the "sysadmin" role on the SQL server instance. The problem actually turned out to be caused by the fact that the database listens for incoming connections on a non-standard port - TCP 63001 in my case. The Microsoft OLE DB Provider used by the guest helper interprets the Data Source field of the connection string and because it specifies no port, it attempts to connect to a database listening the default port - TCP 1433 and times out after 15 seconds. Enabling the SQL Server Browser service whose purpose is to direct SQL connection attempts to the right ports doesn't help, the provider doesn't seem to consult it. Unfortunately, Backup & Replication also doesn't seem to support specifying a non-standard port for the OLE DB Provider manually.
Fortunately, there is a way to work around this limitation. In SQL Server Configuration Manager, you can configure connection aliases which enable the connection attempts to be redirected to the corresponding ports based on the exact wording of the "Data Source" field specified in the connection string. Open up SQL Server Configuration Manager > SQL Native Client 11.0 Configuration > Aliases and add a new Alias:
Code: Select all
Alias name: server.domain.local\DBNAME
Port: *non-standard tcp port*
Protocol: TCP/IP
Server: 127.0.0.1
You also need to make sure the server actually listens on the loopback interface
in SQL Server Network Configuration > Protocols for DBNAME > TCP/IP
Save, then restart the affected SQL Server instance service. You can test the connection yourself using powershell (provided your account is authorized to connect to the instance):
Code: Select all
# $conn = New-Object System.Data.OleDb.OleDbConnection
# $conn.ConnectionString = "Provider=sqloledb;Data Source=server.domain.local\DBNAME;Integrated Security=SSPI;Persist Security Info=False"
# $conn.Open()
Cheers,
Vojtech