Hello,
I have some questions about SQL Server 2012 Availability Groups.
I created/configured four VM machines and they are all Windows 2012 R2. Let's say the VM's are
DC, N1, N2 and C1. I created an Availability Group (AG1) between the two nodes (N1 & N2). N1, N2
and C1 are in the domain - DC. N1 is the primary replica and N1 is the secondary. N1 already has two
databases (dept and employee) and they got synced during the setup.
This is what I did to test my AG1:
1. Logged on to C1 (client).
2. Connected to N1.
3. Added some records to dept and employee.
4. Saw the records on N2.
Things worked as expected.
5. Manually failed over from N1 to N2.
Operation was successful. N2 is now the Primary and N1 is the secondary.
6. Connected to N1 from C1, I added more records to both dept and employee db's.
7. Logged on N2 and saw the new records.
I did not expect to see these new records on the db's on N2 since I used the secondary replica (N1)
to insert more records the second time. I was under the impression that data flows from the
Primary to Secondary SQL instances. My questions are:
Q1 - Is this the way it should be working? Data flows in a bi-directional manner.
Q2 - Can someone elaborate the purpose of having a sql instance defined as a "primary" and sql instance(s)
defined as "secondary"? What are their functions?
The AlwaysOn HA is new to me and trying to exploring this technology in my home lab.
Thank you