Hello @Mohamed jihad bayali Thank you for contacting on Microsoft Q&A platform. Happy to assist!
To restore a SQL database on another server in another subscription, you can follow these steps:
- Go to the Backup center in the Azure portal.
- Click Restore.
- Select SQL in Azure VM as the data source type.
- Select the database you want to restore.
- In the Restore Configuration menu, under Where to Restore, select Alternate Location.
- Select the SQL Server name and instance to which you want to restore the database.
- In the Restored DB Name box, enter the name of the target database.
- If applicable, select Overwrite if the DB with the same name already exists on the selected SQL instance.
- Select Restore Point, and select whether to restore to a specific point in time or to restore to a specific recovery point.
Reference guide: https://learn.microsoft.com/en-us/azure/backup/restore-sql-database-azure-vm#restore-to-an-alternate-location
Let us know if you need further assistance in this matter!
Update:
@Mohamed jihad bayali The destination server must be registered to the same vault as the source.
Only option is to restore as files and then copy the .bak file to the correct VM for restore.
Restore SQL Server databases on an Azure VM - Azure Backup | Microsoft Learn
Any idea how can i register my server to the vault?
The destination server must be registered to the same vault as the source.
I don't think it is possible to register a VM to a vault which is hosted on another sub different from the vault?
Yes, you cannot register a VM to a vault in another subscription.
If the response helped, do "Accept Answer" and up-vote it