SQLSERVER2008R2 Database Mirroring configuration steps

Source: Internet
Author: User

The Sqlserver2008 mirroring feature ensures high availability of the database. Database mirroring maintains two copies of the database, which must be placed in separate instances of the SQL Server database. You can use two servers or a different instance of a server to host, but the instance must have a different data mirroring port. One of the databases for client access, acting as the "principal server" role, and the other based on the configuration and status of the mirroring session, acting as a hot standby server, the "mirror server Role", when the principal server fails, you can switch to the backup server to act as the principal server function, The process of switching can either be manual or automatic, and automatic switchover must be added a "Witness server role" to monitor whether the principal service supports automatic failover of database services.

The principle of synchronization between the principal server and the mirror server is not described here, see Microsoft Official website: http://msdn.microsoft.com/zh-cn/library/ms189852.aspx.

Setup steps:

1. Environment preparation

The database service SQLSERVER2008R2 must be installed with the same version.

Open the database service and Proxy service after installation.

The firewall opens database port 1433 and service port 5022.

Primary server ip:10.172.12.106

Mirror server ip:10.171.84.74

Witness Server ip:10.172.7.185

2. Modify the server host file

Open the host file that modifies these three servers, respectively, and add the following points to:

10.173.12.106 iz25mnky5m8z
10.171.83.74 IZ254PD4SIQZ
10.173.7.185 Iz25gj54e7pz

The machine name corresponding to the server behind

3. Backup and restore the database

The target database recovery model must be full.

Backup Database and BACKUP log select the same file.

When restoring on the mirror server, restore option Select Overwrite existing database recovery status Select Do not select any action for database ....

4. Start Mirroring operation

  

  

5. Status after completion

The principal server data is: Principal, synchronized,

Mirror Machine Server database is: Mirror, synchronized, restoring ...

SQLSERVER2008R2 Database Mirroring configuration steps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.