sql server高可用

In this article, we will discuss a number of interview questions that you could be asked about the SQL Server Always On Availability Groups feature when attending an interview for the SQL Server database administrator role.

在本文中,我们将讨论有关SQL Server数据库管理员角色的访谈时可能会询问您的有关SQL Server Always On可用性组功能的许多访谈问题。

Being interviewed for a SQL Server Database Administrator position, and now interviewing candidates for that role, questions related to the High Availability and Disaster Recovery solutions in SQL Server take the large weight of the overall interview questions, as it reflects your advanced knowledge and experience in the SQL Server administration field.

正在接受SQL Server数据库管理员职位的面试,现在正在面试该职位的候选人,与SQL Server中的高可用性和灾难恢复解决方案有关的问题在整个面试问题中占了很大比重,因为它反映了您在以下方面的高级知识和经验SQL Server管理字段。

Q1: Why we need to establish a High Availability and Disaster Recovery Plan in large companies?

问题1:为什么我们需要在大型公司中建立高可用性和灾难恢复计划?

The High Availability and Disaster Recovery plan help in making sure that our database servers that host the company’s critical operational data and serve the main company systems will be available for the longest possible time with the least possible downtime.

高可用性和灾难恢复计划有助于确保承载公司关键运营数据并服务于公司主要系统的数据库服务器在尽可能长的时间内,最少的停机时间内可用。

Q2: List five of the High Availability and Disaster Recovery solutions that are available in Microsoft SQL Server.

Q2:列出Microsoft SQL Server中可用的五个高可用性和灾难恢复解决方案。

  • Log Shipping 日志传送
  • Transactional Replication 事务复制
  • Database Mirroring 数据库镜像
  • Always On Failover Cluster 始终处于故障转移群集
  • SQL Server Always On Availability Groups SQL Server始终在线可用性组

Q3: What are the main differences between the SQL Server Always On Failover Cluster and the SQL Server Always On Availability Groups?

Q3:SQL Server始终启用故障转移群集和SQL Server始终启用可用性组之间的主要区别是什么?

  • In the Always On Failover Cluster, the resources such as the storage, the network name, and the virtual IPs, are shared and can be owned only by one of the cluster nodes at a given time 在Always On故障转移群集中,存储,网络名称和虚拟IP等资源是共享的,并且在给定时间只能由群集节点之一拥有

But in the Always On Availability Groups, each node will have its own resources, with no resource sharing concept

但是在Always On可用性组中,每个节点将拥有自己的资源,没有资源共享的概念

  • In the Always On Failover Cluster, there is no option to read from the secondary server, as there are no database copies hosted in these secondary nodes 在Always On故障转移群集中,没有选择要从辅助服务器读取的选项,因为这些辅助节点中没有托管数据库副本

But the Always On Availability Groups supports up to eight secondary replicas, from where you can easily perform read operations or route the read-only workload

但是Always On可用性组最多支持八个辅助副本,从中您可以轻松地执行读取操作或路由只读工作负载

  • Always On Failover Cluster can be used as a High Availability solution only, but the Always On Availability Groups can be used as a High Availability and Disaster Recovery solution Always On故障转移群集只能用作高可用性解决方案,而Always On可用性组可以用作高可用性和灾难恢复解决方案
  • The Always On Failover Cluster is configured at the instance level and the failover is performed at the instance level Always On故障转移群集是在实例级别配置的,而故障转移是在实例级别执行的

But the Always On Availability Groups is configured at the database level and the failover is performed at the databases group level

但是Always On可用性组是在数据库级别配置的,而故障转移是在数据库组级别执行的

Q4: What are the differences between the SQL Server Database Mirroring and the SQL Server Always On Availability Groups?

Q4:SQL Server数据库镜像和SQL Server Always On可用性组之间有什么区别?

  • In the Database Mirroring you cannot read from the secondary database, where you can read from the secondary databases in the Always On Availability Groups 在数据库镜像中,您无法从辅助数据库中读取,而在辅助数据库中可以从Always On可用性组中的辅助数据库中读取
  • You can configure the mirroring between two servers only, where you can configure up to eight secondary replicas in the Always On Availability Groups 您只能在两台服务器之间配置镜像,您可以在Always On可用性组中最多配置八个辅助副本。
  • You can perform automatic failover in the Database Mirroring only if there is a witness server configured, but the automatic failover is always possible between the primary and secondary replicas in the Always On Availability Groups 仅当配置了见证服务器时,才可以在数据库镜像中执行自动故障转移,但是始终可用可用性组中的主副本和辅助副本之间始终可以进行自动故障转移。
  • Database Mirroring is configured for each database separately, and the failover is performed at the database level, where you can configure the Always On Availability Group to involve multiple databases at the same time using a single wizard and perform the failover at the databases group level 为每个数据库分别配置了数据库镜像,并且故障转移是在数据库级别执行的,您可以在其中使用一个向导将Always On Availability组配置为同时包含多个数据库,并在数据库组级别执行故障转移

Q5: How does the synchronization process performed in the SQL Server Always On Availability Groups between the different replicas?

Q5:如何在不同副本之间SQL Server Always On可用性组中执行同步过程?

  • sends the transaction log record from the primary database to the secondary database 将事务日志记录从主数据库发送到辅助数据库
  • At the secondary side, the transaction logs will be written to the secondary database transaction log file for caching, in order to redo the transactions in the secondary database 在辅助方面,事务日志将被写入辅助数据库事务日志文件以进行缓存,以便在辅助数据库中重做事务
  • With the asynchronous-commit availability mode, no need for the primary replica to wait for the secondary replica to write transaction log records to disk 使用异步提交可用性模式,无需主副本等待副副本将事务日志记录写入磁盘

Q6: What is the Availability Group stands for?

Q6:可用性组代表什么?

A group of databases hosted in a SQL Server instance called primary replica that is copied to and synchronized with up to eight servers, called secondary replicas.

SQL Server实例(称为主副本)中承载的一组数据库,可复制到最多8个服务器并与之同步,这些服务器称为辅助副本。

Q7: What are the availability modes that are used in the SQL Server Availability Group to synchronize between the replicas?

Q7:在SQL Server可用性组中用于副本之间同步的可用性模式是什么?

  • Synchronous-commit mode, in which the primary replica will wait until getting confirmation from the secondary replicas, that the logs are written to the database transaction log file before committing that transaction at the primary side
  • 同步提交模式 ,在该模式下 ,主副本将等待直到从辅助副本获得确认,然后才将日志写入数据库事务日志文件,然后再在主端提交该事务
  • Asynchronous-commit mode, in which the primary replica will commit the transaction directly without waiting to receive the confirmation from the secondary replicas that the logs are written to the transaction log file of the secondary database
  • 异步提交模式 ,在该模式下 ,主副本将直接提交事务,而无需等待从辅助副本接收到将日志写入辅助数据库的事务日志文件的确认

Q8: What is the failover process and when will the SQL Server decide to perform failover in the SQL Server Always On Availability Group?

Q8:什么是故障转移过程?SQL Server何时决定在SQL Server Always On可用性组中执行故障转移?

The failover is a process in which the primary role and the secondary role are interchangeable between the availability replicas.

故障转移是一个过程,其中主要角色和次要角色在可用性副本之间可互换。

The failover process will be issued in case of any server-level failure.

如果发生任何服务器级别的故障,将发出故障转移过程。

No failover process will be performed in case of any database issue, such as data loss or database corruption, unless the Database Level Health Detection feature is enabled.

除非启用了数据库级运行状况检测功能,否则在发生任何数据库问题(例如数据丢失或数据库损坏)的情况下,将不会执行故障转移过程。

Q9: What is the Availability Group Listener?

Q9:什么是可用性组侦听器?

A virtual network name that allows the users to connect to the Primary or the secondary replicas.

一个虚拟网络名称,允许用户连接到主副本或辅助副本。

Q10: When defining a Windows Failover Cluster to build an SQL Server Always On Availability Group over it, will we use this cluster option “Add all eligible storage to the cluster”? why?

问题10:在定义Windows故障转移群集以在其上构建SQL Server始终可用组时,我们将使用此群集选项“将所有符合条件的存储添加到群集”吗? 为什么?

No. We need to uncheck the Add all eligible storage to the cluster option.

否。我们需要取消选中“ 将所有符合条件的存储添加到群集”选项。

This is due to the fact that Always On Availability Group feature works based on having dedicated storage for each replica without having shared storage between the replicas.

这是由于“始终在线可用性组”功能基于每个副本具有专用存储而副本之间没有共享存储这一事实而工作。

Q11: What are the quorum configuration modes that are available in Windows Failover Clustering?

Q11:Windows故障转移群集中有哪些仲裁配置模式?

  • Node Majority Quorum configuration mode in the Windows Failover Cluster, with each cluster node, gives one Vote. This option fits a cluster with an odd number of nodes Windows故障转移群集中的节点多数仲裁配置模式,每个群集节点都有一个投票。 此选项适合具有奇数个节点的集群
  • Node & Disk Majority Quorum configuration mode in the Windows Failover Cluster, with each cluster node, gives one vote, with an additional vote for the cluster quorum disk. This option fits the clusters with an even number of nodes Windows故障转移群集中的“节点和磁盘多数仲裁”配置模式对每个群集节点进行一票表决,并对群集仲裁磁盘进行附加表决。 此选项适合具有偶数节点的集群
  • Node & File Share Majority Quorum configuration mode in the Windows Failover Cluster, with each cluster node, gives one vote, with an additional vote for a shared file Windows故障转移群集中的“节点和文件共享多数仲裁”配置模式,每个群集节点都进行一票表决,并为共享文件另外投票
  • No Majority, where the status of the cluster depends completely on the availability of the Quorum disk 不占多数,群集的状态完全取决于仲裁磁盘的可用性

Q12: Is it considered as a best practice to create a SQL Server Always On Availability Group with two replicas and configure the quorum using Node Majority mode? Why?

问题12:是否将创建具有两个副本SQL Server永远在线可用性组并使用“节点多数”模式配置仲裁是最佳实践? 为什么?

No. with each node has one vote, the cluster will be down when one of the nodes goes down, losing the advantages of the high availability concept.

否,每个节点都有一票表决权,当其中一个节点发生故障时,群集将关闭,从而失去了高可用性概念的优势。

Q13: How could we enable the Always On Availability Group for a specific SQL Server instance?

问题13:如何为特定SQL Server实例启用Always On可用性组?

Using the SQL Server Configuration Manager, expand the SQL Server Services and browse for the SQL Server Database Engine service -> right-click on the service and select the Properties option. Move to the Always On Availability page under the SQL Server Service properties window, check the “Enable Always On Availability Groups” option, then restart the service to take effect.

使用SQL Server配置管理器,展开SQL Server服务并浏览以找到SQL Server数据库引擎服务->右键单击该服务,然后选择“属性”选项。 移至SQL Server服务属性窗口下的Always On可用性页面,选中“ 启用Always On可用性组 ”选项,然后重新启动服务以使其生效。

Q14: List some of the pre-requisites that the SQL Server Engine will check before adding a database to the Availability Group?

Q14:列出将数据库添加到可用性组之前SQL Server引擎将检查的一些先决条件?

  • The database is configured with a Full recovery model 数据库配置有完全恢复模型
  • A full backup is taken from that database 从该数据库获取完整备份
  • The database is not participating in another Availability Group 该数据库未参与另一个可用性组

Q15: What is the backup preference options that are supported in SQL Server Always On Availability Group?

Q15:SQL Server Always On可用性组支持哪些备份首选项?

  • Preferred Secondary 首选中学
  • Secondary only 仅中学
  • Primary 主
  • Any replica 任何副本

Q16: How many secondary replicas could we configure in SQL Server 2016?

Q16:我们可以在SQL Server 2016中配置多少个辅助副本?

SQL Server 2016 supports up to eight replicas.

SQL Server 2016最多支持八个副本。

Q17: What is the difference between configuring the secondary replica as readable or read-intent only?

Q17:将辅助副本配置为仅可读或读意图有什么区别?

  • The readable secondary allows read-only access to the secondary databases 可读的辅助数据库允许对辅助数据库的只读访问
  • Read-Intent Only secondary replica allows the secondary server to serve the read-only workload ONLY, where the connection string of the application should explicitly mention the Application Intent=Readonly parameter “只读只读”辅助副本允许辅助服务器仅服务于只读工作负载,其中应用程序的连接字符串应显式提及Application Intent = Readonly参数

Q18: What is SQL Server Always On Availability Group Read-Only Routing List?

Q18:什么是SQL Server始终可用性组只读路由列表?

A new option introduced in SQL Server 2014 version, in which the read-only workload will be redirected to the first available secondary replica specified in a predefined routing list, taking into consideration that the application explicitly mentions the Application Intent=Readonly parameter.

考虑到应用程序显式提及Application Intent = Readonly参数,SQL Server 2014版本中引入了一个新选项,其中只读工作负载将重定向到预定义路由列表中指定的第一个可用辅助副本。

Q19: What is the difference between the Direct Seeding and Full Backup and Log Backup initial synchronization processes in Always On Availability Group?

Q19:Always On可用性组中的直接播种,完全备份和日志备份初始同步过程有什么区别?

In the Full backup and log backup method, the initial synchronization between the primary and secondary replicas is performed by taking full and transaction log backups of the primary database to a predefined shared folder then restore it to the secondary replicas.

在完全备份和日志备份方法中,通过将主数据库的完整日志和事务日志备份到预定义的共享文件夹中,然后将其还原到辅助副本,来执行主副本和辅助副本之间的初始同步。

The Direct Seeding method, introduced in SQL Server 2016, the secondary databases will be initialized automatically using Microsoft SQL Server Virtual Device Interface (VDI) backup that is performed to the secondary replica over the network without the need for any network share.

在SQL Server 2016中引入的直接播种方法,将使用Microsoft SQL Server虚拟设备接口(VDI)备份自动初始化辅助数据库,该备份是通过网络对辅助副本执行的,不需要任何网络共享。

Q20: How Could we configure an SQL Server Always On Availability Group with a multi-subnet network?

问题20:如何配置具有多子网网络SQL Server永远在线可用性组?

We need to configure the Availability Group listener with one IP from each subnet.

我们需要为每个子网的一个IP配置可用性组侦听器。

翻译自: https://www.sqlshack.com/sql-server-always-on-availability-groups-interview-questions-answers/

sql server高可用

sql server高可用_SQL Server始终在线可用性组采访问题与解答相关推荐

  1. sql server高可用_SQL Server 2019常规可用性和安装概述

    sql server高可用 介绍 (Introduction) On November 4th, 2019, during the Ignite conference at Orlando, Micr ...

  2. SQL Server 2012 AlwaysOn高可用配置之八:新建可用性组

    8. 新建可用性组 8.1 在SQL01服务器,右键"可用性组",选择"新建可用性组向导" 8.2 下一步 8.3 输入可用性组名称,下一步 8.4 勾选对应的 ...

  3. SQL Server - 高可用与灾难恢复(HADR)技术 -- AlwaysOn可用性组(理论篇)

    因为篇幅原因,AlwaysOn可用性组被拆成了两部分:理论部分和实战部分.而实战部分又被拆成了准备工作和AlwaysOn可用性组搭建. 三篇文章各自的链接: SQL Server ->> ...

  4. 谈谈SQL Server高可用的常见问题

    谈谈SQL Server高可用的常见问题 每次谈到SQL Server的高可用,很多的DBA,特别是SQL Server DBA心里一痛:因为大家都认为SQL Server无法或者很难实现SQL Se ...

  5. SQL Server 高可用方案

    SQL Server 高可用方案 方案一:Asynchronous Mirror + Alias 方案介绍 数据库服务器配置异步镜像关系,程序客户端连接串配置别名连接. 1. 在SQL Server客 ...

  6. sql server 高可用故障转移(6)

    原文:sql server 高可用故障转移(6) 创建分布式事务处理DTC群集服务 在hsr3 ip 49上继续 \ 输入一个没有冲突的ip地址用作SQL-CL的DTC解析地址:192.168.2.1 ...

  7. sql server 高可用故障转移(1)

    sql server 高可用故障转移(1) 原文:sql server 高可用故障转移(1) 群集准备工作 个人电脑 内存12G,处理器 AMD A6-3650CPU主频2.6GHz 虚拟机 VMwa ...

  8. 京东云mysql镜像_京东云数据库RDS SQL Server高可用概述

    数据库的高可用是指在硬件.软件故障发生时,可以将业务从发生故障的数据库节点迁移至备用节点.本文主要讲述SQL Server高可用方案,以及京东云RDS数据库的高可用实现. 一.高可用解决方案总览 1. ...

  9. sql查看数据库线程数_SQL Server始终在可用性组数据库上的最大辅助线程

    sql查看数据库线程数 This article gives an overview of the Max Worker Threads for the SQL Server Always On Av ...

最新文章

  1. 超市购物打印小票的简单程序 记录下来
  2. LeetCode 673. Number of Longest Increasing Subsequence--O(N log N )--Java,C++,Python解法
  3. php使用fputcsv进行大数据的导出
  4. 程序员面试100题之八:不要被阶乘吓倒(二进制表示中最低位1的位置 )
  5. CAN总线技术在船舶监控系统的应用
  6. c++远征之多态篇——异常处理
  7. linux重定向文件被修改后,Linux服务器修改.htaccess文件实现301重定向
  8. object对象进行深拷贝
  9. 如何有效使用OpenPower720(上)
  10. C++递归方法实现全排列
  11. openlayer右键菜单_AE中实现右键菜单的属性表的打开
  12. html制作摩天轮,LED幻彩摩天轮的制作方法
  13. ctfmon是什么启动项_Windows7系统启动项里没有ctfmon.exe怎么办?
  14. (转载)高速ADC的关键指标:量化误差、offset/gain error、DNL、INL、ENOB、分辨率、RMS、SFDR、THD、SINAD、dBFS、TWO-TONE IMD...
  15. 浅解一下BS和CS的区别
  16. GitHub Universe 2019 Keynote 回顾
  17. 网站增加百度收录最有效的方法!!!!!!
  18. cocos中如何让背景模糊_Cocos Creator Shader Effect 系列 - 8 - 高斯模糊
  19. 【Unity后期渲染】Post Processing 后处理插件最全使用说明
  20. ASEMI整流桥KBP410参数,KBP410厂家,KBP410货源

热门文章

  1. oracle按数据条件进行更新_SQL 基础教程, 创建表,按条件选取数据,数据更新,删除...
  2. 利用jQuery点击DIV变颜色的小例子
  3. 数组02 - 零基础入门学习C语言24
  4. 最新剑指offer刷题笔记js(含新旧俩版所有题)
  5. LeetCode(821)——字符的最短距离(JavaScript)
  6. Web存储—获取Cookie
  7. python虚拟cpu性能_基于Tensorflow:CPU性能分析
  8. 智能手机上最没有用的功能是什么?
  9. 支付宝借呗还款利息为什么都不一样?
  10. 艺术美的价值是什么?