Learn how to operate SQL Server Image _ MySQL

Source: Internet
Author: User
MSSQL has launched the image function since 2005. SQLServer images are unreadable. the entire library is in the norecovery mode. SQLServer images can only be 1-to-1, but images and logshipping can be used to achieve one-to-many and image chains. SQLServer Image Authentication is divided into certificates and w SQL Server

MSSQL has launched the image function since 2005.

The SQL Server image is unreadable. the entire database is in the norecovery mode.

SQL Server images can only be 1-to-1 images, but images and logshipping can be used to achieve one-to-many and image chains.

SQL Server Image Authentication is divided into certificates and windows Authentication. windows Authentication must be implemented in one domain.

Not every company's production environment is a domain. the advantage of the domain is that it can implement failover clustering + image hybrid implementation.

The following describes the authentication method image.

Environment: win2008 + mssql2008

1. create a database master key on the master database

 
 
  1. create master key encryption by password ='123!@#abc';

2. create a certificate

 
 
  1. create certificate host_105with subject='host_105_c'

3. create an endpoint

 
 
  1. create endpoint endport_mirrorstate=started
  2. as tcp(listener_port=1522, listener_ip=all)
  3. for database_mirroring(authentication=certificate host_105,
  4. encryption=required algorithm AES, role=all );

4. back up the certificate and copy the certificate to the backup server.

 
 
  1. backup certificate host_105 to file='c:\host_105.cer';

5. Repeat steps 1-4 on the backup machine (replace all the certificates with host_105 with host_106)

6. create an SQL verification account on the host and bind it with the certificate

 
 
  1. create login mirror_b with password='xwj1234!@#

7. create an SQL verification account on the image machine and bind it with the certificate

 
 
  1. create login mirror_a with password;='xwj1234!@#

8. create the mongo_test database log mode in the master database and set it to full mode and restore it on the mirror database. the restore mode is norecovery.

9. synchronize images

 
 
  1. --- Run alter database pai_test on the backup storage.
  2. SetPartner = 'tcp: // 192.168.1.105: 8080'
  3. --- Run alter database pai_test on the host
  4. SetPartner = 'tcp: // 192.168.1.106: 8080'
  5. --- Set to high-performance mode alter database pai_testset safety off

10 tests

 
 
  1. -- Run on host
  2. Create TableTest (idInt);
  3. Insert IntoTestSelect1;
  4. -- Execute
  5. Create DatabasePerformance_test_snp
  6. On Primary
  7. (Name= 'Mirror _ test', filename = 'C: \ pai_test.mdf ')
  8. AsSnapshotOfPerformance_test;
  9. Use cmd_testselect *FromTest

11 open the image monitor

498) this. style. width = 498; "/>

11. mirror + logshipping

498) this. style. width = 498; "/>

Original article title: MSSQLMiRROR

Link: http://www.cnblogs.com/xwj1985/archive/2010/08/08/1795225.html

  • CreateUser created _ B
  • ForLogin cmd_bcreate certificate host_106
  • Authorization _bfrom file = 'C: \ host_106.cer'Grant
  • Connect OnEndpoint: endport_mirrorToPerformance_ B
  • 7. create an SQL verification account on the image machine and bind it with the certificate

    ___FCKpd___5

    8. create the mongo_test database log mode in the master database and set it to full mode and restore it on the mirror database. the restore mode is norecovery.

    9. synchronize images

    ___FCKpd___6

    10 tests

    ___FCKpd___7

    11 open the image monitor

    498) this. style. width = 498; "/>

    11. mirror + logshipping

    498) this. style. width = 498; "/>

    Original article title: MSSQLMiRROR

    Link: http://www.cnblogs.com/xwj1985/archive/2010/08/08/1795225.html

  • CreateUser performance_aForLogin logs _a;
  • Grant Connect OnEndpoint ::
  • Endport_mirrorToPerformance_a;
  • CreateCertificate host_105authorization pai_afrom file = 'C: \ host_105.cer ';
  • 8. create the mongo_test database log mode in the master database and set it to full mode and restore it on the mirror database. the restore mode is norecovery.

    9. synchronize images

    ___FCKpd___6

    10 tests

    ___FCKpd___7

    11 open the image monitor

    498) this. style. width = 498; "/>

    11. mirror + logshipping

    498) this. style. width = 498; "/>

    Original article title: MSSQLMiRROR

    Link: http://www.cnblogs.com/xwj1985/archive/2010/08/08/1795225.html

  • CreateUser created _ B
  • ForLogin cmd_bcreate certificate host_106
  • Authorization _bfrom file = 'C: \ host_106.cer'Grant
  • Connect OnEndpoint: endport_mirrorToPerformance_ B
  • 7. create an SQL verification account on the image machine and bind it with the certificate

    ___FCKpd___5

    8. create the mongo_test database log mode in the master database and set it to full mode and restore it on the mirror database. the restore mode is norecovery.

    9. synchronize images

    ___FCKpd___6

    10 tests

    ___FCKpd___7

    11 open the image monitor

    498) this. style. width = 498; "/>

    11. mirror + logshipping

    498) this. style. width = 498; "/>

    Original article title: MSSQLMiRROR

    Link: http://www.cnblogs.com/xwj1985/archive/2010/08/08/1795225.html

    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.