Problem with SQL Backup Agent

Forum for users of Red Gate SQL Backup tool

Moderator: Chris Auckland

Problem with SQL Backup Agent

Postby jens@apsis » Mon Oct 08, 2007 10:34 am

Hello,


I'm having a bit of a trouble when installing the SQL Backup Agent in SQL Backup version 5.

When the application tries to start the backup agent service I get the response: the service took to long time to start...

I have tried the following changes for the usersettings in the service: Administrator, local service and local system but still the same error.

My configuration:

WinXP Pro (logged in using administrator account)
SQL Server 2005 eval. version
SQL Backup 5.2.0.2824 demo version


Does someone have any ideas?

Best regards,
/Jens Lundstroem
jens@apsis
 
Posts: 4
Joined: Mon Oct 08, 2007 10:22 am

Postby Jason Cook » Mon Oct 08, 2007 12:34 pm

Hi,

If the SQL Backup Agent is not running, the SQL Backup 5 GUI will attempt to start it. However if there is a problem starting the agent or it takes too long, you will get the message quoted.

To investigate this further, open up the "Services" tool in Administrative Tools, and find the "SQL Backup Agent" service in the list (if you are working with a named instance, this name will be appended to the service name).

If the service is not running, attempt to start it - if an error occurs, it may give you enough information to resolve the issue yourself (e.g. the username or password are wrong), or it may require some more investigation.

If you can try the above and post the error message you get if you need more help, we can help to resolve the problem.

Thanks,
Jason
Jason Cook
 
Posts: 180
Joined: Thu Jun 01, 2006 9:59 am
Location: Cambridge, UK

Postby jens@apsis » Mon Oct 08, 2007 1:36 pm

Hi,

When the SQL Backup GUI tries to connect to the db the following error shows:

"Error opening mutex."

However, when looking at the service, the status says: "starting..."

And the event log only shows:

"the service SQL Backup Agent-SQLSRV05 received a start control" (translated from swedish...)

This is all the output I got.

would be greatful for help

/Jens
jens@apsis
 
Posts: 4
Joined: Mon Oct 08, 2007 10:22 am

Postby Jason Cook » Mon Oct 08, 2007 5:24 pm

Hi,
The "error opening mutex" problem occurs because the semaphore used by SQL Backup has been consumed in SQL Server, but cannot be recovered or recreated.

The solution should be as follows:

Using the tool "Process Explorer" from SysInternals (available from http://www.microsoft.com/technet/sysint ... lorer.mspx)

* Click "Find", then "Find Handle or DLL"
* In the box, type "SQBMutex" (without the quotes), and click Search.

This should show the following:

For an instance that is functioning correctly, the handle "\\BaseNamedObjects\\SQBMutex_" and "\\BaseNamedObjects\\SQBMutex_data_" will exist, and be part of the process called "SQBCoreService.exe" (the SQL Backup Agent).

If the instance is not the local one, these names will be appended with the name of the instance (e.g. "SQBMutex_SQL2005")

For the problematic instance, click on the entry in the list (which will likely be linked to "sqlservr.exe" or similar), which will highlight the entry in the main window. Right click this entry and select "Close Handle". Repeat this for the corresponding 'data' handle as well.

You should now be able to start the SQL Backup Agent again.

If that doesn't resolve the situation, please let us know.

Thanks,
Jason[/list]
Jason Cook
 
Posts: 180
Joined: Thu Jun 01, 2006 9:59 am
Location: Cambridge, UK

Postby jens@apsis » Wed Oct 10, 2007 8:58 am

Hi,

I used Process Explorer and searched for SQBMutex but did not find anything, however when analyzing SQBCoreService.exe the only mutex associated was:

\\BaseNamedObjects\\madToolsMsgHandlerMutex$c74$40d374

Could this have something to do with the installtion of the agent which gives the error log:

APSIS10\\SQLSRV05: Server Component Installation - Failed
========================================================

Copy SQBServerSetup.exe to server - Successful
----------------------------------------------

This operation completed successfully.


Run setup on server - Successful
--------------------------------

This operation completed successfully.


Start SQL Backup Agent service - Failed
---------------------------------------

The SQL Backup Agent service cannot start, or is taking too long to start up.

Click 'Retry' to reinstall the server components. If this problem persists, it may be necessary to uninstall the server components manually, and then reinstall by running SQBServerSetup.exe on the server.



Check installed versions - Failed
---------------------------------

Error opening mutex.


Check SQLBackup extended stored procedures - Successful
-------------------------------------------------------

This operation completed successfully.


Delete setup file from server - Successful
------------------------------------------

This operation completed successfully.


Updating SQL Server information - Failed
----------------------------------------

Error opening mutex.


still very greatful for further help.

best regards
/Jens Lundstroem
jens@apsis
 
Posts: 4
Joined: Mon Oct 08, 2007 10:22 am

Postby Jason Cook » Wed Oct 10, 2007 11:38 am

Rather than looking at the list of "mutex" objects, you need to look at the list of "semaphor" objects (while it's confusingly called "SQBMutex", the object is actually a semaphor).

The madToolsMsgHandlerMutex mutex object is expected to be part of the SQBCoreService.

If the semaphor is not listed under the SQBCoreService.exe process, but the SQBCoreService process is running, it means that something else has control of the semaphor when it shouldn't - usually the SQL Server instance.

If you can find the SQBMutex references, you can remove them using the right click options and it should resolve the issue. Alternatively a restart of the SQL Server instance should also resolve it.

Hope that helps,
Jason
Jason Cook
 
Posts: 180
Joined: Thu Jun 01, 2006 9:59 am
Location: Cambridge, UK

Postby jens@apsis » Tue Oct 16, 2007 3:39 pm

Hi again,

As you said I tried to find any SQBMutex but did not find any: both automatic & manual. When I manually search in the SQBCoreService.exe the following "semaphores" is shown:

\\BaseNamedObjects\\shell.{A48F1A32-A340-11D1-BC6B-00A0C90312E1}
\\BaseNamedObjects\\shell.{210A4BA0-3AEA-1069-A2D9-08002B30309D}
\\BaseNamedObjects\\shell.{A48F1A32-A340-11D1-BC6B-00A0C90312E1}
\\BaseNamedObjects\\shell.{7CB834F0-527B-11D2-9D1F-0000F805CA57}

plus three unnamed semaphores and no sign of SQBMutex.

How can this be?

greatful for help,
best regards
/Jens
jens@apsis
 
Posts: 4
Joined: Mon Oct 08, 2007 10:22 am

Postby petey » Wed Oct 17, 2007 3:12 am

I've sent you a private message to turn on the debug logging function for the SQL Backup Agent service. Could you please send me the resulting log file? Thanks.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2233
Joined: Sun Apr 24, 2005 12:34 pm

Postby petey » Wed Oct 17, 2007 8:43 am

Is the SQL Server instance you are trying to connect to, a named instance or a default instance? Thanks.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2233
Joined: Sun Apr 24, 2005 12:34 pm

Postby petey » Wed Oct 17, 2007 11:43 am

The issue was due to the SQL Backup installer not appending the -I parameter to the SQL Backup Agent service startup parameter for the named instance.

The SQL Backup Agent service startup parameters can be found in the registry value HKLM\\System\\CurrentControlSet\\Services\\SQLBackupAgent_<instance name>\\ImagePath. For a named SQL Server instance, the -I parameter should be present, together with the instance name e.g.

C:\\Program Files\\Red Gate\\SQL Backup\\(LOCAL)\\SQBCoreService.exe -I INSTANCE2
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2233
Joined: Sun Apr 24, 2005 12:34 pm

Error opening mutex

Postby Lee Mellor » Thu Oct 27, 2011 6:02 pm

Hi,

I'm having a similar error to the above thread whenever I try to connect to a server registered in the backup pro frontend. I also get the error if i try and run a backup from query analyzer (yes this is a sql 2000 box!)

I have tried resinstalling the server components with no change. Im running SQL Backup v6.3.0.48.

I have tried using process explorer to close the handles for the baseobjectsnames (both were present), restarted the backup agent and it didnt make a difference. it is a default instance.

this server is a virtual that was cloned, the server was renamed and then renamed back again to its original name. it then has had all system and user databases restored from the server from which it was cloned. this was done using the redgate backup agent so it was functioning ok but only after a reboot of the server as initially the backup agent wouldnt start.

other wise sql seems to function without any issues. native backups work for example.

i would reboot again but other users are now using the server so this could be difficult.

regards,

Lee.
Lee Mellor
 
Posts: 11
Joined: Mon Oct 26, 2009 2:33 pm

Postby petey » Sun Oct 30, 2011 2:39 pm

Try stopping the SQL Backup Agent service, change the startup account to Local Admin, start the service, and run a backup via the Query Analyzer, e.g.:

Code: Select all
EXEC master..sqlbackup '-sql "BACKUP DATABASE model TO DISK = [<AUTO>]"'


Please post the exact error message that's displayed.

Thanks.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2233
Joined: Sun Apr 24, 2005 12:34 pm

Error

Postby Lee Mellor » Mon Oct 31, 2011 12:28 pm

Hi Peter,

the error returned is as follows;

SQL Backup v6.3.0.48
ERRSQB: 5150 (Error opening mutex.) (Global\\SQBMutex_): 5 (Access is denied.)

(1 row(s) affected)

name|value
exitcode|5150
sqlerrorcode|0

(2 row(s) affected)

Regards,

Lee.
Lee Mellor
 
Posts: 11
Joined: Mon Oct 26, 2009 2:33 pm

Postby petey » Mon Oct 31, 2011 12:40 pm

What is the service startup accounts that the SQL Server instance, and the SQL Backup Agent, are using?

Thanks.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2233
Joined: Sun Apr 24, 2005 12:34 pm


Return to SQL Backup Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests