ServiceBus 1.1: "The database (SbManagementDB) located at SQL Server (10.xx.xx.22) is already configured." error when running Restore-SBFarm command.
When using Restore-SBFarm command to restore a ServiceBus farm, you may get the the following error
Restore-SBFarm : Cannot validate argument on parameter
'SBFarmDBConnectionString'. The database (SbManagementDB) located at SQL
Server (10.xx.xx.22) is already configured.
The detailed error information can be found in the following MSDN post:
The reason of why you met the error is because Restore-SBFarm should be used in the following disaster recovery scenario only:
- The existing ServiceBus farm is corrupt but its databases are fine.
- You want to restore the ServiceBus farm to a NEW environment(ServiceBus is installed but not configured. There is no database yet.).
- In this case, the Restore-SBFarm command will read the configurations from the existing databases and use them to recreate the SBFarm on the new environment for you.
- After running Restore-SBFarm, you may also need to run other cmdlets like Add-SBHost to add hosts to the farm.
A successful running of the command can be found in the following screenshots below:
However, if the scenario is that the current ServiceBus farm’s database is corrupt and you want to restore everything back in the existing environment. Then you have to manually restore all SB related SQL databases first and then run different cmdlets like Restore-SBGateway
All the details about these different disaster recovery scenarios can be found in the following article: