search
HomeDatabaseMysql TutorialSqlserver2008R2 数据库镜像配置步骤

Sqlserver2008 镜像 功能可以保障 数据库 的高可用性。 数据库 镜像 维护着 数据库 的两个副本,这两个副本必须分别放置在不同的SQL Server 数据库 实例中。可以用两台服务器也可以用一台服务器的不同实例来承载,但实例必须具有不同的数据 镜像 端口。其中

Sqlserver2008镜像功能可以保障数据库的高可用性。数据库镜像维护着数据库的两个副本,这两个副本必须分别放置在不同的SQL Server数据库实例中。可以用两台服务器也可以用一台服务器的不同实例来承载,但实例必须具有不同的数据镜像端口。其中一台上的数据库用于客户端访问,充当“主体服务器”角色;而另一台则根据镜像会话的配置和状态,充当热备份服务器,即“镜像服务器角色”,当主体服务器发生故障时,可以切换到备份服务器来充当主体服务器的功能,切换的过程可以使手动,也可以自动切换,自动切换必须添加一个“见证服务器角色”,用于监视主体服务是否支持数据库服务自动故障转移。

主体服务器与镜像服务器之间同步的原理在此不在描述,请参见微软官网:http://msdn.microsoft.com/zh-cn/library/ms189852.aspx。

设置步骤

1、环境准备

  安装数据库服务Sqlserver2008R2,必须具有相同的版本。

  安装后开启数据库服务和代理服务。

  防火墙开启数据库端口1433和服务端口5022。

  主服务器IP:       10.102.12.106

  镜像服务器IP:    10.101.84.74

  见证服务器IP:    10.102.7.185

2、修改服务器Host文件

  分别打开修改这三个服务器的HOST文件,添加以下指向:

  10.102.12.106        iZ27mnaky5m8Z
  10.101.83.74          iZ274pad4siqZab
  10.102.7.185          iZ27gj5a4e7pZcd

  后面服务器对应的机器名

3、备份以及恢复数据库

  目标数据库恢复模式必须为“完整”。

  备份数据库和备份日志选择同一文件。

  在镜像服务器上进行恢复时,还原选项选择“覆盖现有数据库” 恢复状态选择“不对数据库选择任何操作.......”

4、开始镜像操作

  Sqlserver2008R2 数据库镜像配置步骤

  Sqlserver2008R2 数据库镜像配置步骤

5、完成后状态

  主体服务器数据为:主体,已同步,

  镜机服务器数据库为:镜像,已同步,正在还原...

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools