All of us know Azure Data Studio is new Microsoft tool like SQL Server Management Studio but with highly advanced features like Azure Data Studio Notebook, one of the features that you can PowerShell extension on Azure data Studio to connect to your Azure Portal and do your homework easily, Azure data studio PowerShell extension supported PowerShell and Cloud Shell (CLI) AZ Command, did you imagine this powerful tool from one place you can write your T-SQL, PowerShell, and CLI and you can manage your SQL Server on Premises and your Azure SQL and the other Azure services, all of these services and these languages from one place Using Microsoft Azure data Studio 🚀💪😱
We talked before about Storage and the types of storage and how to manage the storage but today we will talk about the file share that’s one of the types of azure storage and the questions now after creating the file share how I can sync my files from my V-Center VM to Azure File share, Microsoft provided us services called Azure file sync so to let us know how we can configure it and what is the prerequisites we should configure it on the V-Center VM
As I explained before on my last article [Virtual Machine (VM) Backup and Restore (Vault)] that we can use the Azure recovery services vault for taking backup and doing a restore from azure VM using recovery services vault also the same services can be used to migrate your local VM from V-center to Azure using (Recovery services vault site recovery) and in this post, we will explain how to use this services recovery vault to Move VM between two rejoin and to do failover easily for the VM. Let’s go for technical steps
Azure Recovery service vault It is azure built in services doesn’t required any infrastructure preparation and it is supported multiple types of backup (VM , File , Disk and SQL Database) it is one of the built options in the VM , so easily when you open Azure virtual machines and select your VM you will find in the left side Backup from this point and this place you can start to manage your backup and restore process as well you can keep monitoring your backup jobs and restore jobs let us go for demo and how to do VM backup and restore it and what is the restore types supported.
Azure backup Process.
Azure backup hints
How to start to take backup from VM
Azure Recovery Services vault
Azure Restore Options
Azure Restore Hints
How to do VM restore from Azure recovery services vault
I think all of us know how to move files for SQL Server databases from disk to another disk but today I will explain how we can do it on SQL Server always on to reduce the downtime and taking new backup to return the database to always-on again. Let us start on the technical steps.
Check the current DB Files locations
Check Always on Health Status
Disable all backup jobs on Primary and secondary servers
Suspend the data movement on Secondary server
Remove Database from Primary server
Update DB files by new disk location on secondary server
Stop SQL Server instance on Secondary server
Move (CUT) DB Files from old location to new Location (Past)
Start the SQL Server instance again
Verify the DB File Location Using T-SQL on the post
Join the DB to availability group from Primary server
Check SQL Server always on Health Status Using T-SQL on the post
Enable the SQL Server Jobs\
Failover the SQL Server for Primary (X) to Secondary Server (Y) and do the same steps on (X)
One of the common tasks as an azure administrator you should know it when you deployed azure resource on resource group related for testing as example and you need to move it to new resource group or resource group of production we can do this activity with one PowerShell command and if you are not interested in PowerShell don’t worry you can do also from Azure Portal.
Alert 💣:Moving Azure resource will create new resource id this meaning if you any subscription or APP referencing this resource-id it will break be caution ✍ (Read More, Document the Steps, Test the Steps ) then do your implementation
Open Microsoft Azure Portal select the source resource group and from the top, you have two option (Move or Change) both you will direct you to move your resource by the selecting the resource you need to move it then the new resource group (Destination) during this steps you can create new resource group easily.
Monitoring Azure Storage activities depend on Azure activity log services and to access this activity log we have three options and to know more information about Azure Storage account check below posts and for all of my posts in azure check this link (Latest Microsoft Azure Articles and Posts)
Activity log: it is like the event viewer in windows when you open the storage account you will find in the left side activity log if you open it you will find all of the activities you do it and when and who do it
Log analytics: Search about log analytics on the Azure portal search and create new work space then on the left you will find container call “Work space data source” under it you will find Azure activity log if you click on it you will find your azure subscription just only connect the subscription to the log analytics then Go for the left side again and select Log and from here you can query your activity log using KQL query (Kusto Query Language). Look at this post to know more information about (Microsoft Azure Log Analytics).
Log Analytics on Activity log: we can add Log analytics as a solution on the activity log on Azure storage account to do that ( You Should Create first step 2 Log Analytics workspace > open Storage account > in the left side select activity log > on the top right side click on log > add > Select the log analytics Workspace you created it > then save > the refresh) IF you return to Log Analytics workspace in the left side select solution you will find the solution you created it.