Saturday , April 20 2024

How To Backup Only Availability Group Databases in an Instance

 

Sometimes we need to take backups on an AG basis. Finding databases that are included in individual AG and getting their individual backups will make our job more difficult.

With the help of the following script you can get the backup of the databases that are included in an AG using Cursor.

You must write the name of your availability group in place of AGNAME in Scrpt.

In Script, it takes backups into “C:\Backup” folder. Here you can change the folder to receive backup.

 

Loading

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories