[AlwaysOn]创建SQLServer高可用性组T-SQL语法:DATABASE子句
DATABASE database_name
创新互联-专业网站定制、快速模板网站建设、高性价比昌都网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式昌都网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖昌都地区。费用合理售后完善,十载实体公司更值得信赖。
指定本地SQL Server实例(即创建可用性组的服务器实例)上一个或多个用户数据库的列表。Specifies a list of one or more user databases on the local SQL Server instance (that is, the server instance on which you are creating the availability group). 可以为一个可用性组指定多个数据库,但每个数据库只能属于一个可用性组。You can specify multiple databases for an availability group, but each database can belong to only one availability group. 有关可用性组可以支持的数据库类型的信息,请参阅“永不停机的可用性组(SQL Server)”的前提条件、限制和建议。For information about the type of databases that an availability group can support, see Prerequisites, Restrictions, and Recommendations for Always On Availability Groups (SQL Server). 要找出哪些本地数据库已经属于某个可用性组,请参阅sys.databases目录视图中的replica_id列。To find out which local databases already belong to an availability group, see the replica_id column in the sys.databases catalog view.
DATABASE 子句是可选的。The DATABASE clause is optional. 如果省略了它,则新的可用性组为空。If you omit it, the new availability group is empty.
创建可用性组之后,请连接到承载辅助副本的每个服务器实例,然后准备每个辅助数据库并将其加入到可用性组中。After you have created the availability group, connect to each server instance that hosts a secondary replica and then prepare each secondary database and join it to the availability group. 有关详细信息,请参阅在始终打开的辅助数据库(SQL Server)上启动数据移动。For more information, see Start Data Movement on an Always On Secondary Database (SQL Server).
注释 Note
稍后,您可以在承载当前主副本的服务器实例上向可用性组添加符合条件的数据库。Later, you can add eligible databases on the server instance that hosts the current primary replica to an availability group. 还可以从可用性组中删除数据库。有关详细信息,请参阅alter availability group(Transact-SQL)。You can also remove a database from an availability group. For more information, see ALTER AVAILABILITY GROUP (Transact-SQL).
网站标题:[AlwaysOn]创建SQLServer高可用性组T-SQL语法:DATABASE子句
链接地址:http://myzitong.com/article/jidihd.html