Correct Answer:
Explanation/Reference:
Note:
* The following table lists the basic tasks involved in creating and configuring an availability group and indicates which Transact-SQL statements to use for these tasks. The AlwaysOn Availability Groups tasks must be performed in the sequence in which they are presented in the table.
(step 2) Create database mirroring endpoint (once per SQL Server instance)
CREATE ENDPOINT endpointName … FOR DATABASE_MIRRORING
(step 3) Create availability group
CREATE AVAILABILITY GROUP
(step 4) Join secondary replica to availability group
ALTER AVAILABILITY GROUP group_name JOIN
(step 5-6)
Prepare the secondary database
BACKUP and RESTORE.
Create backups on the server instance that hosts the primary replica.
Restore backups on each server instance that hosts a secondary replica, using RESTORE WITH NORECOVERY.
(step 7)
Start data synchronization by joining each secondary database to availability group
ALTER DATABASE database_name SET HADR AVAILABILITY GROUP = group_name
Reference: Create an Availability Group (Transact-SQL)