Run the script to make full backups and tlog backups.
1 2 3 4 5 6 7 8 9 10 11 12 13
--Full Backups BACKUP DATABASE [WideWorldImporters] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL15.SQL1\MSSQL\Backup\WideWorldImporters_FullBackup_20220608.bak' WITH NOFORMAT, NOINIT, NAME = N'WideWorldImporters-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS =10, CHECKSUM GO
--Tlog Backups BACKUP LOG [WideWorldImporters] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL15.SQL1\MSSQL\Backup\WideWorldImporters_TlogBackup_20220608.trn' WITH NOFORMAT, NOINIT, NAME = N'WideWorldImporters-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS =10, CHECKSUM GO
In the Properties page of the AG, add the name of
the database, then click on OK, if there is no warning,
then we successfully added an additional database to the AG.