0

I'm using a PowerShell script to create a copy of an Azure SQL Database (Database1) using the New-AzSqlDatabaseCopy command. However, the runbook times out during execution. I'd like to know:

Does the database copy operation continue in the background even after the runbook times out?

If the copied database (Database1_2025050223) appears, how can I be sure it contains the full data from the source (Database1) and not a partial copy?

Here is the command I'm using:

New-AzSqlDatabaseCopy -ResourceGroupName 'RGName' -ServerName 'RGName' -DatabaseName 'Database1' -CopyResourceGroupName 'RGName' -CopyServerName 'RGName' -CopyDatabaseName 'Database1_2025050223'
1
  • Hi M.Tharun Kumar, The database copy is asynchronous. Once the request is accepted, the target DB is created and the copyStarts in the background. To verify: Log in to the new server/database. Compare the size of the source and copied DBs. Check if all tables are copied by querying them (e.g., SELECT * FROM dbo.TableName). Commented May 7 at 6:49

1 Answer 1

1

Powershell runbook is giving timeout error while copying the Azure SQL database

The database copy is asynchronous. Once the request is accepted, the target DB is created, and the copy continues in the background.

To verify the copy:

connect to the new server/database, compare DB sizes, and run queries

SELECT * FROM dbo.[YourTableName];

to confirm table and data consistency.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.