Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels

Channel Catalog

Channel Description:

Product Support and Discussion
    0 0

    Hi Eddie

    first of all, thanks a lot for so detailed reply, I am very satisfy with redgate support as I am with your products, that's a hurray for all of you.

    what I mean by
    "wouldn't be redgate be VERY INTERESTED to have Microsoft implementing the SQL Backup Server Components on azure ?"
    is offering my help by asking (or begging) Microsoft to add this functionality, and I sure plenty of other users will follow.

    As said, looking forward be able to use your great products on Azure.

    0 0

    I believe I figured it out, after spending a lot more time with this. I'll post what I came up with here, just in case it helps someone else in the future:

    1. Added the -b switch when calling sqlcmd, which forces to terminate the batch if there is an error.

    2. Modified the restore script so that if the exitcode and sqlerrorcode are anything but 0, it will go to RAISERROR within the script (exact message does not appear to matter). Fortunately, the RedGate sqlbackup proc does allow for the exitcode and sqlerrorcode to be generated into a declared value, as such:

    DECLARE @exitcode INT
    DECLARE @sqlerrorcode INT

    3. Once sqlcmd processes RAISERROR in a script, with the -b switch, the $LASTEXITCODE in PowerShell appears to go from 0 to 1, which indicates a restore error. I can then have PowerShell stop the process there, or run an alternate process, which is what I needed.

    0 0


    Is it possible to preserve replication setting when backing up a database using SQL backup?

    Currenty when we make a full backup of a Subcriber database, the replication procedures are not restored.

    Using SQL Backup version:

    0 0


    There's a Microsoft feedback portal, for Azure SQL Database feature requests - this would be the place to make such a request, so please feel free to hassle them! Smile



    0 0

    Could you please create an empty subscriber database, back it up using SQL Server, restore it, and check if the replication settings exist in the restored database? Repeat the same tasks, but using SQL Backup to back up and restore the database. Do the replication settings exist in the restored database?

    0 0


    Did exactly that. Created a empty subscriber database, created replication to that database, backed up with normal SQL, restored and the replication procedures was there. (When restored I checked the option "PRESERVE REPLICATION SETTINGS", I don't see this option when restoring with Redgate.)

    Then backup up and restored the same database with Redgate SQL backup and the procedures were not there.

    0 0

    Can you try restoring the database using the SQL Backup extended stored procedure, using the KEEP_REPLICATION option e.g.

    EXEC master..sqlbackup '-sql "RESTORE DATABASE test FROM DISK = [g:\backups\test.sqb] WITH REPLACE, KEEP_REPLICATION" '

    0 0

    I restored using the extended stored procedure with WITH REPLACE, KEEP_REPLICATION' and the procedures were present.

    Where is the option in the UI to keep replication settings?

    0 0

    That option isn't available in the GUI. You will need to restore the database using the extended stored procedure manually with the KEEP_REPLICATION option.

    0 0

    I have admin access. sql server server 2005 installed in target machine.
    But it says denied administration access. I have all rights on that system . but it throws error and denied administration access

    0 0

    Could you please send me ( a screenshot of the error? Thanks.

    0 0

    Hey RG,

    I'm trying to perform an unattended install on a remote computer of the SQL Backup server components, version

    The documentation for installing the server components from the command line makes it look easy.


    To install the server components unattended, call SQBServerSetup.exe from the command line with /VERYSILENT and /SUPPRESSMESSAGEBOXES. For example:



    The server components will be installed on the local instance using the default settings unless you specify otherwise using the parameters described below.

    I've tried to run this command in four different ways, but they all fail. The error varies depending on the method.

    Is it a problem with the installer, or is there something missing from the documentaton?

    Here's what I've tried.

    1. PowerShell remote session

    First I tried the Invoke-Command cmdlet to install over a PowerShell remote session.


      Write-Verbose "Installing SQL Backup"
      Invoke-Command $TargetServer {
        G:\media\SQBServerSetup.exe /VERYSILENT /SUPPRESSMSGBOXES

    I copied the installer to G:\media on the remote computer before running the command.

    The variable $TargetServer contains the name of the remote server.

    It returns instantly without a value.The $LASTEXITCODE variable is null.

    2. psexec

    Next I tried psexec.

    psexec \\$TargetServer G:\media\SQBServerSetup.exe /VERYSILENT /SUPPRESSMSGBOXES

    It didn't work either, but it at least gave me some output.


    PsExec v1.98 - Execute processes remotely
    Copyright (C) 2001-2010 Mark Russinovich
    Sysinternals -
    Connecting to REMOTESERVER...Starting PsExec service on REMOTESERVER...Connecting with PsExec service on REMOTESERVER...Starting
    G:\media\SQBServerSetup.exe on REMOTESERVER...
    G:\media\SQBServerSetup.exe exited on REMOTESERVER with error code 6040.

    Error code 6040 means "The password for the SQL Backup Agent service user account was invalid."

    I haven't specified a user account. SQL Backup is supposed to use the SQL Server service account!

    3. PowerShell over RDP

    To rule out any weirdness caused by the remote execution, I opened an RDP connection and tried the PowerShell commands again.


    PS G:\media> $LASTEXITCODE

    Again, the command returned instantly and produced no output or exit code.

    4. cmd over RDP

    Maybe the installer just doesn't work in PowerShell.

    Does it work in plain old cmd?


    G:\media>echo %errorlevel%

    No. And error code 9009 is sadly undocumented.

    How do I make this work?


    0 0

    I can't install it using the GUI tools either.

    Any ideas what the root cause could be?

    5. Using the UI over RDP

    I double click to run the installer.

    I accept all the default settings and supply the correct password for the account that SQL Server runs as.

    When I click Next at 'Select SQL Server authenticaion mode', I see an error message.


    Failed to verify that the account (DEV\sqlservice) is a member of the SQL Server sysadmin fixed server role for the selected instance. SQL error: Login failed for user 'DEV\sqlservice'.

    This installation may not be able to install the SQL Backup extended stored procedures. User another login.

    The SQL Server error log shows no failed login attempts.

    6. Using SQL Backup UI on my workstation

    I run SQL Backup on my workstatation.

    I open the "Add SQL Server" dialog, supply the server name and the correct password for the SQL Server service account, and accept the defaults.

    I click finish, SQL Compare validates the options, then the installation starts.

    It fails at the first step "Copying and running SQBServerSetup".


    REMOTESERVER: Server Component Installation - Failed

    Copying and running SQBServerSetup - Failed

    Error running installer: exit code 6200
    The SQL Backup Agent service failed to connect to the SQL Server instance using the SQL login provided.

    Exit code 6200 means "SQL authenticated user name or password is invalid."

    Again, the SQL Server error log shows no failed login attempts.

    0 0

    We resolved the issue this morning.

    There were two issues here. One was my mistake; the other looks like a gap in the documentation.

    1. The SQL Server service account did not have a login on the server.

    For SQL Backup to use the account, it has to be sysadmin on the server.

    I added the service account DEV\sqlservice as a sysadmin on the server.

    The server did actually log the failed logins, but I was looking in the agent log rather than the server log. D'oh!

    The UI installer over RDP gave the clearest indication of this issue. It would be helpful if the error messages were more consistent.

    2. The command line installer requires a password for the service account.

    For SQL Backup to use the service account, it needs to know the password.

    In the end, a command like this worked for me:


    psexec \\$TargetServer G:\media\SQBServerSetup.exe /VERYSILENT /SUPPRESSMSGBOXES /SVCUSER $svcuser /SVCPW $svcpw

    It produced a result like this:


    PsExec v1.98 - Execute processes remotely
    Copyright (C) 2001-2010 Mark Russinovich
    Sysinternals -
    Connecting to REMOTESERVER...Starting PsExec service on REMOTESERVER...Connecting with PsExec service on REMOTESERVER...Starting
    G:\media\SQBServerSetup.exe on REMOTESERVER...
    G:\media\SQBServerSetup.exe exited on REMOTESERVER with error code 0.

    The SQL Backup UI now shows a yellow "Trial" icon next to the server. Success!

    The command line installer does not force you to provide a password, and the documentation suggests that one is unnecessary to use the server's account.

    I imagine this would work if the server is running under one the default Windows accounts, but we use dedicated service accounts with passwords.

    It would be helpful if the documentation was clearer on this point.

    As a security note, I don't recommend using my solution for a production deployment. psexec does not encrypt its connection to the remote server. Don't allow someone to sniff your production password over the network!

    0 0

    Thank you for your forum post.

    If you do not specify the /SVCUSER /SVCPW parameters SQL Backup server components installer default to the account the SQL Server instance is currently running as is used.

    I suspect if you included the /LOG parameter, the log file may have indicated the reason why login attempted failed.

    Good news that you were able to identify the cause and remedy the problem. Also thank you for sharing your experiences via the forum. I am sure other users will benefit from steps you have undertaken.

    Many Thanks