Problem: default Veeam.Backup.SqlChecker.vbs script fails with error code 4 (EXIT_CODE_CANT_QUERY_DBS).
Solution:
- Copy Veeam Veeam.Backup.SqlChecker.vbs script to SQL2000Checker.vbs (for example)
- Edit SQL2000Checker.vbs
- replace line:
Code: Select all
Const SELECT_ALL_DBS = "SELECT [name] FROM [master].[sys].[databases]"
- with line:
Code: Select all
Const SELECT_ALL_DBS = "SELECT [name] FROM [master].[dbo].[sysdatabases]"
- Update the SureBackup application group entry for the VM.
- - Deselect role SQL Server (since you will be using a custom script)
- - On Test Scripts tab, select SQL2000Checker.vbs
- - For arguments, use: %vm_ip% instancename (for the default SQL instance, instancename will be the VM's computername)
This is because when 4 arguments are passed to the script (%vm_ip% instancename username password), the script is set to assume SQL authentication. To fix this, so Windows authentication is used instead:
- Edit SQL2000Checker.vbs
- replace last line of case 4:
Code: Select all
Case 4: sLogsFolder = WScript.Arguments(0) gsServer=WScript.Arguments(1) gLog.GenerateLog sLogsFolder,gsServer gsSqlUser=WScript.Arguments(2) gsPassword=WScript.Arguments(3) gbIsWindowsAuth=False
- with last line here:
Code: Select all
Case 4: sLogsFolder = WScript.Arguments(0) gsServer=WScript.Arguments(1) gLog.GenerateLog sLogsFolder,gsServer gsSqlUser=WScript.Arguments(2) gsPassword=WScript.Arguments(3) gbIsWindowsAuth=True
Hope this is helpful.