-1

I have to create a new database for a company wide printing application.Since there is not much overhead, we are planning to use an existing SQL Setup for the same. Can someone suggest when can I actually move the db to the AAG group once created?

Can I do it immediately after creating the database, or can I do it once the application is installed on it? Also, for configuring the secondary database, if full initial synchronization is enabled, will it be created automatically? Please clarify

Md Haidar Ali Khan
  • 6,523
  • 9
  • 40
  • 62
buddinggeek
  • 623
  • 4
  • 24

4 Answers4

1

From here we can choose two kind of scenario

 1. alwayson for high availability 

 2. Read replica

If it is for HA then add the database to AG after created the database.

If it is for Read replica you can add it to AG after installed and verified the application.

Md Haidar Ali Khan
  • 6,523
  • 9
  • 40
  • 62
TheDataGuy
  • 1,986
  • 5
  • 36
  • 67
1

I have to create a new database for a company wide printing application.Since there is not much overhead, we are planning to use an existing SQL Setup for the same. Can someone suggest when can I actually move the db to the AAG group once created?

Yes, You can add the database in AAG immediately after creating the database. But there is condition, First you have to take the 'Full Backup' of that database(which database you want to add in AAG, and that Database Recovery model should be 'Full Recovery model' . otherwise that database will not available to add in AAG, untill unless whenever you shall not take full backup.

Also, for configuring the secondary database, if full initial synchronization is enabled, will it be created automatically?

If your have configure properly 'primary & secondary replicas' in 'availability groups' . And if you shall add your 'Primary Replica Server' database in 'Availability Databases' . It's automatically comes that database in your 'Secondary Replica Server'. After successfully adding the database both server (Primary Replica Server & Secondary Replica Server ) the status of that database would be "Synchronous commit or Asynchronous commit". Whatever you shall choose during 'Availability Mode' configuration in your Availability Groups.

Hope it will help out to you.

For Ref :- Here

Md Haidar Ali Khan
  • 6,523
  • 9
  • 40
  • 62
1

Can I do it immediately after creating the database

Yes.

or can I do it once the application is installed on it

If it's your in-house application and you know it will work on an empty database in an AG, then do it immediately after creating the database.

If it was an off-the-shelf application you'd normally wait until the application has deployed its schema before adding it to the group. For some reason a lot of Enterprise apps check whether a database is in mirroring mode and will refuse to install until it's removed.

Also, for configuring the secondary database, if full initial synchronization is enabled, will it be created automatically?

Yes.

Cody Konior
  • 3,538
  • 14
  • 23
0

Haider, the db which I created is on the primary node outside the AAG. For installing the application should I be giving the server ip or the cluster ip ? Thanks

buddinggeek
  • 623
  • 4
  • 24