中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

[AlwaysOn] 創建SQL Server高可用性組T-SQL語法:PRIMARY_ROLE子句

發布時間:2020-08-16 05:14:24 來源:ITPUB博客 閱讀:180 作者:cow977 欄目:關系型數據庫

PRIMARY_ROLE ( ... )

指定當此可用性副本當前擁有主要角色(即,無論何時為主要副本)時生效的特定于角色的設置。Specifies role-specific settings that take effect if this availability replica currently owns the primary role (that is, whenever it is the primary replica). 在括號內,指定一個或兩個主要角色選項。Within the parentheses, specify either or both primary-role options. 如果兩者都指定,請使用逗號分隔的列表。If you specify both, use a comma-separated list.

主要角色選項如下:The primary role options are as follows:

ALLOW_CONNECTIONS = { READ_WRITE | ALL }

指定執行主要角色(即充當主要副本)的給定可用性副本的數據庫可以從客戶端接受的連接類型,其中之一:Specifies the type of connection that the databases of a given availability replica that is performing the primary role (that is, is acting as a primary replica) can accept from clients, one of:

READ_WRITE

不允許將應用程序意向連接屬性設置為只讀的連接。Connections where the Application Intent connection property is set to ReadOnly are disallowed. 當Application Intent屬性設置為ReadWrite或未設置Application Intent連接屬性時,允許進行連接。When the Application Intent property is set to ReadWrite or the Application Intent connection property is not set, the connection is allowed.有關應用程序意向連接屬性的詳細信息,請參閱將連接字符串關鍵字用于SQL Server本機客戶端。For more information about Application Intent connection property, see Using Connection String Keywords with SQL Server Native Client.

ALL

允許所有連接到主副本中的數據庫。All connections are allowed to the databases in the primary replica. 這是默認行為。This is the default behavior.

READ_ONLY_ROUTING_LIST = { ('<server_instance>' [ ,...n ] ) | NONE }

指定在輔助角色下運行時承載此可用性組的可用性副本并滿足以下要求的服務器實例的逗號分隔列表:Specifies a comma-separated list of server instances that host availability replicas for this availability group that meet the following requirements when running under the secondary role:

l   配置為允許所有連接或只讀連接(見上文輔助角色選項的“允許連接”參數)。Be configured to allow all connections or read-only connections (see the ALLOW_CONNECTIONS argument of the SECONDARY_ROLE option, above).

l   定義其只讀路由URL(見上文輔助角色選項的只讀路由URL參數)。Have their read-only routing URL defined (see the READ_ONLY_ROUTING_URL argument of the SECONDARY_ROLE option, above).

只讀路由列表值如下:The READ_ONLY_ROUTING_LIST values are as follows:

<server_instance> 指定作為副本主機的SQL Server實例的地址,該副本在輔助角色下運行時是可讀的輔助副本。<server_instance> Specifies the address of the instance of SQL Server that is the host for a replica that is a readable secondary replica when running under the secondary role.

使用逗號分隔的列表指定可能承載可讀的輔助副本的所有服務器實例。Use a comma-separated list to specify all the server instances that might host a readable secondary replica. 只讀路由遵循在列表中指定服務器實例的順序。Read-only routing follows the order in which server instances are specified in the list. 如果在副本的只讀路由列表中包含副本的主機服務器實例,那么將此服務器實例放在列表末尾通常是一個好的做法,這樣,如果有可用的話,讀意向連接將轉到輔助副本。If you include a replica's host server instance on the replica's read-only routing list, placing this server instance at the end of the list is typically a good practice, so that read-intent connections go to a secondary replica, if one is available.

從SQL Server 2016(13.x)開始,您可以在可讀的輔助副本之間負載平衡讀意向請求。Beginning with SQL Server 2016 (13.x), you can load-balance read-intent requests across readable secondary replicas. 您可以通過將副本放置在只讀路由列表中一組嵌套的圓括號中來指定這一點。You specify this by placing the replicas in a nested set of parentheses within the read-only routing list. 有關更多信息和示例,請參閱跨只讀副本配置負載平衡。For more information and examples, see Configure load-balancing across read-only replicas.

注釋 NONE

指定當此可用性副本是主副本時,不支持只讀路由。Specifies that when this availability replica is the primary replica, read-only routing is not supported.這是默認行為。This is the default behavior.

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

额尔古纳市| 东乌珠穆沁旗| 开化县| 峡江县| 马公市| 保定市| 四子王旗| 虎林市| 淮安市| 扎鲁特旗| 陈巴尔虎旗| 青田县| 涿州市| 陆丰市| 休宁县| 文安县| 台江县| 独山县| 天峨县| 沭阳县| 牡丹江市| 宁都县| 武乡县| 大厂| 原平市| 泸州市| 铜鼓县| 广宗县| 石屏县| 东乌| 建德市| 枣庄市| 新和县| 宣恩县| 三都| 乌拉特后旗| 罗江县| 从江县| 博乐市| 称多县| 霍林郭勒市|