0

We have a Azure SQL Database (PAAS) that acts like a master database for testing new code.

The goal is to set up a pipeline that creates a writeable copy of the master database to test new builds continuously during the day. All the data in the database is needed to be able to perform tests.

Backup/Restore/Copy(?) is a too slow operation for this scenario since the database is too big. Contaniners is not an option.

Is there any other smart way to create a writeable copy/snapshot of a Azure SQL Database?

3
  • Define "too big" Jan 3, 2023 at 10:26
  • I don't have the numbers, only that a copy database operation takes too much time. This also created problems in the pipeline. They are looking for alternate methods of doing it.
    – Raadee
    Jan 4, 2023 at 11:05
  • So, @Stephen Morris reply is correct Jan 5, 2023 at 8:31

1 Answer 1

2

fastest way I know to get a database copy in Azure is to use the TSQL syntax

CREATE DATABASE ... AS COPY OF ... 

see the official docs

https://learn.microsoft.com/en-us/sql/t-sql/statements/create-database-transact-sql?view=azuresqldb-current&preserve-view=true&tabs=sqlpool#copy-a-database

1
  • Ok thanks. Maybe I should look into an alternative like moving the master database to a VM and use File Snapshot-backups/restore if Copy is the fastest process for the PAAS database.
    – Raadee
    Jan 2, 2023 at 15:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.