In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. introduction to AlwaysOn
AlwaysOn availability groups are a new feature available in SQL Server 2012 to ensure the availability of application data and achieve zero data loss. AlwaysOn availability group technology combines the advantages of database clustering and database mirroring. one of the benefits of this technology is to provide non-shared storage, which can avoid the failure of the whole availability scheme caused by a single point of failure of storage.
AlwaysOn availability groups are based on the database (group) level and delimit a set of user databases (which can be one or more) into a group. Each set of availability databases is hosted by an availability copy. Availability copies include one primary copy and one to four secondary copies. The primary replica is used to host the primary database, and the secondary replica hosts a set of secondary databases and serves as a potential failover target for the availability group. The master copy makes the master database available for the read-write connection of the client, realizing the change operation to the database. Synchronization is also performed at the database level. The primary copy sends the transaction log records for each primary database to each secondary database. Each secondary copy caches transaction log records and then restores them to the corresponding secondary database. The primary database is independently synchronized with the secondary database of each connection. Therefore, a secondary database can hang or fail without affecting other secondary databases, and a primary database can hang or fail without affecting other primary databases.
A Windows Server failover cluster (WSFC) cluster is required to deploy AlwaysOn availability groups. Each availability copy of a given availability group must be on a different node of the same WSFC cluster. When you deploy AlwaysOn availability groups, one WSFC resource group is created for each availability group. The WSFC cluster monitors this resource group to determine the status between nodes in order to evaluate the health of the master replica. Fail-over occurs when a failure occurs, and arbitration for AlwaysOn availability groups is based on all nodes in the WSFC cluster, regardless of whether a given cluster node hosts any availability copies.
Users can provide client connections to the master copy of a given availability group by creating an availability group listener. The availability Group listener connects the resources of a given availability group with a DNS name to direct client connections to the appropriate availability copy.
AlwaysOn availability groups allow you to synchronize a set of databases to up to four read-only replicas, a new feature introduced by SQL Server 2012. SQL Server 2014 increases the number of read-only copies to 8
2. Deployment environment preparation 1. Deployment environment
Computer name
IP address
Operating system
Role
Remarks
DC01.contoso.com
10.0.0.2
Win2012R2
DC, DNS server
Provide arbitration folder
SQL01.contoso.com
10.0.0.3,20.0.0.2
Win2012R2
SQL Server 2014 WSFC cluster node
AlwaysOn availability group name SG01
SQL02.contoso.com
10.0.0.4,20.0.0.3
Win2012R2
SQL Server 2014 WSFC cluster node
SQLCluster
10.0.0.5
Failover cluster name
SQL
10.0.0.10
Listener name
two。 Create a failover cluster
Configure LAN and heartbeat networks for SQL01 and SQL02
Add roles and functionality wizards in SQL01 and SQL02 to select failover clusters
Create a failover cluster name computer SQLCluster
Add cluster nodes SQL01 and SQL0 to the security attribute and give full access
After the creation is completed, disable the account
Open failover Cluster Administrator and create a cluster
Add member server node
Enter the cluster computer account number SQLCluster before you create it.
After the cluster is created successfully, the computer account is automatically enabled and the dns record is created
Create an arbitration witness folder in the domain controller
Configure cluster quorum
III. Install SQL Server
Install a local stand-alone SQL on SQL01 and SQL02
IV. Enable AlwaysOn
Create a new database
The recovery model must be a full model
Back up this database
Enable folder sharing for Backup
Open the New availability Group Wizard
Enter availability group name
Select the databases that need to be added to the availability group
Add a copy and select Node 2 SQL02
Five. create a listener
Enter the name and IP of the listener. Later, we visit SQL and manage the access through this FQDN and IP address.
VI. Test cluster
The current SQL running node is SQL01
Shut down the LAN network card of SQL01 for testing
When the network card is disabled, SQL automatically switches to the SQL02 and becomes the active node
When we visit SQL at this time, we will find that the SQL02 secondary node is now the primary node.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.