Can't get SureBackup SQL test to not fail

VMware specific discussions

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby Geniek73 » Mon Oct 12, 2015 12:55 pm

I have the same problem with testing my SQL server using scritp. I always get en error code 2 - Unable to connect to SQL server.
I'm passing login credentials using customized script option as mentioned a few posts above. My arguments are: %log_path% %vm_ip% login pass
Does anyone got it working?
Geniek73
Novice
 
Posts: 6
Liked: never
Joined: Tue Feb 12, 2013 11:19 am

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby foggy » Mon Oct 12, 2015 3:42 pm

Please contact technical support for assistance with this.
foggy
Veeam Software
 
Posts: 14728
Liked: 1078 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby cffit » Wed Oct 21, 2015 5:48 pm

I'm following this with some of the same questions.

When I select the SQL server role checkbox for the server, does that run the Veeam.BackupSqlChecker.vbs file during SB? If the answer is yes, then should giving the Veeam service account public permissions to all the databases work?

When I manually set the Veeam.Backup.Sqlchecker.vbs file to run, and add the argument %log_path% %vm_ip%, where do the log files get saved? When I specify the log file to go to c:\logs, it doesn't create any files.

I love this feature, but it is a little difficult to get going.
cffit
Expert
 
Posts: 338
Liked: 33 times
Joined: Fri Jan 20, 2012 2:36 pm
Full Name: Christensen Farms

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby JaxIsland7575 » Wed Oct 21, 2015 6:03 pm

Christensen,
I had an issue with my SureBackup and SQL jobs and what I did was start up a SureBackup job, then logged into the server and used SQL Management Studio to run the .vbs file manually. That kicked out an access denied so I went into the database and added the user I was running Veeam under to each DB.I mapped them to each instance with public permissions. After that I retried the script and it work.

Cheers!
VMCE v9
JaxIsland7575
Veeam Vanguard
 
Posts: 364
Liked: 98 times
Joined: Mon Apr 27, 2015 1:59 pm
Location: NY, USA
Full Name: Ryan Jacksland

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby cffit » Wed Oct 21, 2015 7:23 pm

Yes, I have removed the SQL role check from the SB job, then booted the lab and I was able to run the script from a command prompt. It worked fine.

Did you just check the SQL role box and that's it? Or did you manually point to the vbs file and add arguments to it?
cffit
Expert
 
Posts: 338
Liked: 33 times
Joined: Fri Jan 20, 2012 2:36 pm
Full Name: Christensen Farms

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby JaxIsland7575 » Wed Oct 21, 2015 8:20 pm

Once I verified that SQL permissions were correct, I used the default SQL "check box" and added no manual arguments.
VMCE v9
JaxIsland7575
Veeam Vanguard
 
Posts: 364
Liked: 98 times
Joined: Mon Apr 27, 2015 1:59 pm
Location: NY, USA
Full Name: Ryan Jacksland

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby cffit » Wed Oct 21, 2015 9:11 pm

Thanks for the info Jax

After testing all day I have found that even if you run the script under a user context that has public access to all the databases it will still fail unless you either specify the instance (even if there is only one default instance you still have to specify mssqlserver) or you add the veeam backup service account to the local administrator group on the SQL server. The script uses the "sc" command to query the instance on the SQL server, and you need to be a local administrator on the SQL server to be able to run that. If you specify the instance, you avoid the script having the use "sc" to do a query and can get by without adding the veeam backup account to the local administrator group.

So my questions for Veeam moderators are:

Does checking the SQL role for a VM in an application group basically just run the Veeam.Backup.SqlChecker.vbs file? If not, what does it do? If so, what location does %log_path% reference?
cffit
Expert
 
Posts: 338
Liked: 33 times
Joined: Fri Jan 20, 2012 2:36 pm
Full Name: Christensen Farms

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby JaxIsland7575 » Wed Oct 21, 2015 9:14 pm

I did not have to add the Veeam user onto the local server, but I failed to mention this was SQL 2005 on a Win 2003 server. I am sure with the changes in how servers / SQL handle permissions in newer versions you will see some variation from my experience!
VMCE v9
JaxIsland7575
Veeam Vanguard
 
Posts: 364
Liked: 98 times
Joined: Mon Apr 27, 2015 1:59 pm
Location: NY, USA
Full Name: Ryan Jacksland

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby cffit » Wed Oct 21, 2015 9:21 pm

This was SQL 2008 R2, so I'm not sure if that matters maybe. I could be mistaken, but I did a lot of testing and this was what I found. It would not work unless I specified the instance, and I only had the default instance on the SQL server. I tried running the sc commands on the Veeam Backup server under the veeam backup account context and it would get access denied error unless that account was a local admin on the SQL server. Because of that alone, the script would instantly fail.
cffit
Expert
 
Posts: 338
Liked: 33 times
Joined: Fri Jan 20, 2012 2:36 pm
Full Name: Christensen Farms

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby foggy » Thu Oct 22, 2015 5:18 pm

cffit wrote:Does checking the SQL role for a VM in an application group basically just run the Veeam.Backup.SqlChecker.vbs file? If not, what does it do?

Sets some timeouts to a more extended values.

cffit wrote: If so, what location does %log_path% reference?

By default, it is something like: %programdata%\Veeam\Backup\<name of the job>\<VM name>_SQLChecker.log (the exact file name could be different).
foggy
Veeam Software
 
Posts: 14728
Liked: 1078 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

[MERGED]: Feature Request: USer Credentials for Surebackup-J

Veeam Logoby westCPS » Tue Dec 15, 2015 1:19 pm

Hello!

As we opened a Support case (01130515) in the cp of veeam, because of not working sure backup Jobs (SQL & Exchange). We found out that Veeam use for the build-in SQL-Surebackup-Job the account of the veeam backup Service. So the error with the SQL-Surebackup solved by changing the Veeam Backup Service from local Service to a Domainaccount with Access-rights on the SQL-Server. In veeam gui it was not possible to Setup the build-in script with other credentials. :?


It would be nice for future use of Surebackup, to use the GUI to Setup the Credentials (same method as in the Backup-Jobs). :wink:

Best regards
Werner St.
westCPS
Service Provider
 
Posts: 7
Liked: never
Joined: Wed Aug 28, 2013 10:44 am
Full Name: Werner Steinegger

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby foggy » Thu Dec 17, 2015 3:00 pm

Werner, the ability to specify credentials for the script will be available in the upcoming v9. Currently you can pass the credentials as script arguments, please see above for details.
foggy
Veeam Software
 
Posts: 14728
Liked: 1078 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby bg.ranken » Fri Oct 14, 2016 4:49 pm

Hi foggy,

I've checked around v9 and I can't see a way to pass credentials to the script. Was this feature not implemented?
bg.ranken
Enthusiast
 
Posts: 55
Liked: 10 times
Joined: Wed Feb 18, 2015 8:13 pm
Full Name: Randall Kender

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby foggy » Fri Oct 14, 2016 5:01 pm

Hi Randall, have you checked verification options in the SureBackup job?
foggy
Veeam Software
 
Posts: 14728
Liked: 1078 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Re: Can't get SureBackup SQL test to not fail

Veeam Logoby bg.ranken » Fri Oct 14, 2016 7:14 pm

Ah, I see that. I guess I was hoping that you meant passing one of the credentials stored in the credential manager, something similar to selecting the Guest OS credentials in a regular job. Even if there was just a drop down to select the credentials and then you could use %username% %password% in the argument line.

I guess I'm just not a huge fan of typing an actual password in the argument line. Is there any chance this might be something that I could request get added in for a future version, just for security reasons? For SQL it's not too big of a deal since the permissions you give on the SQL server are so low, but I have another script I have been working on where I need to supply domain credentials since my Veeam server is off the domain. I know it's still not 100% secure since someone could edit the script to get the actual password however in my case we limit who has access to the physical Veeam server, but more people have access to the console and I don't want those people to be able to see the credentials I'm using.
bg.ranken
Enthusiast
 
Posts: 55
Liked: 10 times
Joined: Wed Feb 18, 2015 8:13 pm
Full Name: Randall Kender

PreviousNext

Return to VMware vSphere



Who is online

Users browsing this forum: No registered users and 15 guests