We are running a monthly script for partition update. in the script we also run ALTER DATABASE ADD FILE and ALTER DATABASE REMOVE FILE. The script should be for running for about 20 minutes. when running the script we are getting an error:
Backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized. Reissue the statement after the current backup or file manipulation operation is completed.
This error appear because there is an ongoing backup at the same time . the backup is done automatically by sql azure managed instance.
Since we don’t know the times of the backups we need a solution to be able to run our script without this error