Not able to deploy existing azure DB through sitecore azure module

223 views Asked by At

I am doing some azure based deployment of my custom sitecore solution which has the custom databases, I am able to deploy already CE or content editing farm in staging mode, but while deploying to CD farm I am getting following error.

I have followed KB article and tried every other article but it's keep failing at following exception. MY machine is able to access the server stated in connection string patch and SQL Server node. don't know why it is happening.

Can please someone help

3/13/2015, 11:44:33 AMPGPaaSEvalWeCd01Role01SSc37eStaging [S] Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer failed System.ApplicationException: PGPaaSEvalWeCd01Role01SSc37eStaging [S] Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer failed ---> System.ApplicationException: Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer is failed ---> Microsoft.SqlServer.Management.Common.SqlServerManagementException: Trying to create new server from a database that alreay has a database server. New server name 'crqvr4t4sk' is not the same as existing 'auztwghdj8' at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(String subscriptionID, AzureSqlDatabase database, String login, String password) at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(AzureSqlDatabase azureSqlDatabase, String login, String password) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.ResolveServer(AzureSqlDatabase azureSqlDb, List`1 resolvedServers, Dictionary`2 preferServer, String contextLanguage) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.Action(RolePipelineArgsBase args) at Sitecore.Azure.Pipelines.BasePipeline.RolePipelineProcessor.Process(RolePipelineArgsBase args) --- End of inner exception stack trace --- --- End of inner exception stack trace ---
3/13/2015, 11:44:33 AMPGPaaSEvalWeCd01Role01SSc37eStaging [S] Failed getting Database server System.ApplicationException: PGPaaSEvalWeCd01Role01SSc37eStaging [S] Failed getting Database server ---> Microsoft.SqlServer.Management.Common.SqlServerManagementException: Trying to create new server from a database that alreay has a database server. New server name 'crqvr4t4sk' is not the same as existing 'auztwghdj8' at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(String subscriptionID, AzureSqlDatabase database, String login, String password) at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(AzureSqlDatabase azureSqlDatabase, String login, String password) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.ResolveServer(AzureSqlDatabase azureSqlDb, List`1 resolvedServers, Dictionary`2 preferServer, String contextLanguage) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.Action(RolePipelineArgsBase args) at Sitecore.Azure.Pipelines.BasePipeline.RolePipelineProcessor.Process(RolePipelineArgsBase args) --- End of inner exception stack trace ---
3/13/2015, 11:44:33 AMPGPaaSEvalWeCd01Role01SSc37eStaging [S] Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer failed System.ApplicationException: PGPaaSEvalWeCd01Role01SSc37eStaging [S] Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer failed ---> System.ApplicationException: Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer is failed ---> Microsoft.SqlServer.Management.Common.SqlServerManagementException: Trying to create new server from a database that alreay has a database server. New server name 'crqvr4t4sk' is not the same as existing 'auztwghdj8' at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(String subscriptionID, AzureSqlDatabase database, String login, String password) at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(AzureSqlDatabase azureSqlDatabase, String login, String password) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.ResolveServer(AzureSqlDatabase azureSqlDb, List`1 resolvedServers, Dictionary`2 preferServer, String contextLanguage) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.Action(RolePipelineArgsBase args) at Sitecore.Azure.Pipelines.BasePipeline.RolePipelineProcessor.Process(RolePipelineArgsBase args) --- End of inner exception stack trace --- --- End of inner exception stack trace ---
3/13/2015, 11:44:33 AMPGPaaSEvalWeCd01Role01SSc37eStaging [S] Failed getting Database server System.ApplicationException: PGPaaSEvalWeCd01Role01SSc37eStaging [S] Failed getting Database server ---> Microsoft.SqlServer.Management.Common.SqlServerManagementException: Trying to create new server from a database that alreay has a database server. New server name 'crqvr4t4sk' is not the same as existing 'auztwghdj8' at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(String subscriptionID, AzureSqlDatabase database, String login, String password) at Sitecore.Azure.Managers.AzureManagers.AzureSqlManager.CreateDataBaseServer(AzureSqlDatabase azureSqlDatabase, String login, String password) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.ResolveServer(AzureSqlDatabase azureSqlDb, List`1 resolvedServers, Dictionary`2 preferServer, String contextLanguage) at Sitecore.Azure.Pipelines.Automation.Azure.SqlAzureDatabaseServer.Action(RolePipelineArgsBase args) at Sitecore.Azure.Pipelines.BasePipeline.RolePipelineProcessor.Process(RolePipelineArgsBase args) --- End of inner exception stack trace ---
1

There are 1 answers

1
ob1dev On BEST ANSWER

As best I understand it, you are having a problem with the following:

  1. Create a custom Azure SQL Database service to host Sitecore database and custom database.
  2. Sitecore Content Delivery (Delivery Farm) and/or Sitecore Content Management (Editing Farm) should connect to databases in this custom service.
  3. Therefore, Sitecore Azure module must use the custom Azure SQL Database service, instead of creating a new one.

If I am right, the reason of the issue could be due to missed step #16 from the Sitecore KB article you mentioned before.

16. Recycle the Sitecore Application Pool or reset Internet Information Services (IIS). 

The reason of this step is to force Sitecore Azure module takes Azure SQL Database service name from the Server Name field in a Sql01 item. See step #11 for details in Sitecore KB article.