SQL export job stuck

Henrik 40 Reputation points
2025-12-05T10:51:40.08+00:00

I'm trying to export an SQL-database hosted in Azure, but it gets stuck on 1% and does not seem possible to cancel the export and start again? How do I proceed?

Azure SQL Database
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-05T10:51:49.8033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    If your SQL database export in Azure is stuck at 1%, you can try to cancel the export request and start again. Here’s how you can proceed:

    1. Cancel the Export Request: You can use the PowerShell command Stop-AzSqlDatabaseActivity to cancel the export operation. Here’s an example command:
         Stop-AzSqlDatabaseActivity -ResourceGroupName $ResourceGroupName -ServerName $ServerName -DatabaseName $DatabaseName -OperationId $Operation.OperationId
      
      Make sure you have the necessary permissions, such as the SQL DB Contributor role, to cancel the operation.
    2. Check the Status: After canceling, you can check the status of the export request using the Get-AzSqlDatabaseImportExportStatus cmdlet to confirm that it has been successfully canceled.
    3. Retry the Export: Once the previous export request is canceled, you can initiate a new export request using the New-AzSqlDatabaseExport cmdlet.

    If you continue to experience issues, it may be worth checking for any limitations or errors related to disk space or other factors that could affect the export process.


    References:

    0 comments No comments

  2. Swapnesh Panchal 1,380 Reputation points Microsoft External Staff Moderator
    2025-12-05T19:14:56.32+00:00

    Hi Henrik,

    It sounds like you're facing an issue with your SQL database export getting stuck at 1%. Here are some steps you can take to troubleshoot and proceed with the export:

    1. Check Resource Limits: Ensure that your Azure SQL Database hasn’t hit its storage or performance limits. You can do so by checking the Database Transaction Units (DTUs) consumption in the Azure portal. If you’re maxing out on resources, consider upgrading your service tier.
    2. Export Methods: Rather than relying solely on the Azure Portal export, you might want to try exporting using other methods, such as:
      • Using the SQLPackage utility.
      • Azure Data Studio for exporting to a BACPAC file.
      • SQL Server Management Studio (SSMS), which often has better performance for exports.
    3. Monitor for Errors: If possible, check if there are any logs or messages that can provide more insight into what might be causing the export to hang. Sometimes, timeouts or errors related to storage issues are recorded in these logs.
    4. Cancel and Retry: If you can’t cancel the ongoing export job from the Azure Portal, you might be able to terminate it using PowerShell commands. However, if the cancellation is stuck, you may need to wait until the system processes the request or until it automatically cancels after the two-day limit.
    5. General Considerations:
      • Ensure large tables have clustered indexes, as exporting large tables without them can be slow.
      • Consider running export operations during off-peak hours to reduce competition for resources.
    6. Enable Access for Azure Services: Make sure that the Allow Azure services to access this server option is turned on for your SQL database server, as this can impact the functionality of the export process.

    I hope these tips help you get past that 1%! If things are still stuck after trying these, let me know and we can dig deeper.

    Follow-Up Questions:

    • What export method were you using (Azure Portal, SSMS, etc.)?
    • Have you checked to see if your database is hitting any storage limits?
    • Are there any specific error messages or logs available?

    References:

    Hope this helps! Let me know if you have any other questions or need further assistance.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.