Error while deploying SQL Database on Azure

Jose de Jesus Rodriguez Hernandez 0 Puntos de reputación
2025-01-23T17:13:11.4466667+00:00

I am facing an error while trying to deploy a database using SQL Database on Azure. Most of the presets are set to their default options, and I am only modifying the collation. Here is the error I am encountering. After checking the deployment logs to gather more information about the failure, It takes 30 minutes trying to deploy the database and when it reaches the 30 minutes shows the error mesasge that the deployment failed.
Does anybody know how to fix it?

{
  
  
  
  
    {
      
      
      
    }
  ]
}

{
    "status": "Failed",
    "error": {
        "code": "OperationTimedOut",
        "message": "The operation timed out and automatically rolled back. Please retry the operation."
    }
}

Azure
Azure
Plataforma e infraestructura de informática en la nube para crear, implementar y administrar aplicaciones y servicios a través de una red mundial de centros de datos administrados por Microsoft.
538 preguntas
SQL Server
SQL Server
Familia de sistemas de análisis y administración de bases de datos relacionales de Microsoft para soluciones de comercio electrónico, línea de negocio y almacenamiento de datos.
128 preguntas
0 comentarios No hay comentarios
{count} votos

1 respuesta

Ordenar por: Muy útil
  1. Gao Chen 5,690 Puntos de reputación Proveedor de Microsoft
    2025-01-23T19:37:55.8+00:00

    Hello Jose de Jesus Rodriguez Hernandez,

    Welcome to Microsoft Q&A!

    I understand you cannot deply your SQL Database, in this case, please try to run the following PowerShell script (Please modify the information for it to match your database):

    # Define the SQL command to run
    $sqlCommand = new-object System.Data.SqlClient.SqlCommand
    $sqlCommand.CommandTimeout = 120
    $sqlCommand.Connection = $sqlConnection
    Write-Output "Issuing command to scale down database"
    # Execute the SQL command
    $sqlCommand.CommandText= "ALTER DATABASE [YourDatabase] MODIFY (EDITION = 'Premium', MAXSIZE = 1024 GB, SERVICE_OBJECTIVE = 'P6');"
    $result = $sqlCommand.ExecuteNonQuery()
    
    

    In case it doesn't work here are a few steps you can take to troubleshoot and potentially resolve this issue:

    • Ensure that your Azure subscription and resource group have sufficient quotas and limits for the deployment. Sometimes, hitting resource limits can cause timeouts.
    • If possible, try increasing the timeout settings for the deployment operation. This can sometimes help if the deployment is taking longer due to resource constraints or network issues.
    • Since you mentioned modifying the collation, double-check that the collation setting is valid and supported by Azure SQL Database. An unsupported collation could potentially cause issues.
    • Verify that there are no network issues or firewall rules blocking the deployment process. Verify that the necessary ports (e.g., 1433 for SQL Server) are open and accessible.
    • Implement retry logic in your deployment script. Azure services can experience transient faults, and retrying the operation after a short delay can often resolve these issues

    I hope the information provided was useful!

    Regards,

    Gao


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Su respuesta

Las respuestas se pueden marcar como respuestas aceptadas por el autor de la pregunta, lo que ayuda a los usuarios a conocer la respuesta que resolvió el problema del autor.