What are the challenges you face when working across database platforms? Take the survey
Options

Problem with SQL Backup Agent

jens@apsisjens@apsis Posts: 5
edited October 31, 2011 7:40AM in SQL Backup Previous Versions
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

Comments

  • Options
    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
  • Options
    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
  • Options
    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]
  • Options
    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
  • Options
    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
  • Options
    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
  • Options
    peteypetey Posts: 2,358 New member
    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 8
  • Options
    peteypetey Posts: 2,358 New member
    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 8
  • Options
    peteypetey Posts: 2,358 New member
    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 8
  • Options
    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.
  • Options
    peteypetey Posts: 2,358 New member
    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.:
    EXEC master..sqlbackup '-sql "BACKUP DATABASE model TO DISK = &#91;&lt;AUTO&gt;&#93;"'
    

    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 8
  • Options
    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.
  • Options
    peteypetey Posts: 2,358 New member
    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 8
Sign In or Register to comment.