data mirror

    技术2022-05-11  151

    Mark,Ok .. it seems first of all that there is no way to do the setup using the GUI/Wizard. I always get the error described above even if the endpoints are already defined and started. I have discover that for strange reason if I create endpoint using three differents port (I have three independant server so according to the doc I should be able to use the same port) it works but only using command line:These are the steps I have to go through to have the mirror configured:1- backup on the principal2- restore on the mirror with norecovery3 - create endpoint      principal: state= started port=5022 role=partner      mirror: state=started port=5023 role=partner      witness: state=started port=5024 role=witness4 - setup the mirror      mirror site: alter db set partner='TCP://itanium8.sql.net:5022'      principal site:          alter db set partner='TCP://itanium9.sql.net:5023'         alter db set partner='TCP://itanium10.sql.net:5024'But again no way to set it up with the wizard....ThanksJerome

    如何建立一个使用WIN验证的数据镜像Witness服务器

    要为数据库指定witness,须设置witness服务器上的角色到数据库实例虽然witness服务器实例可以运行在主服务器或者镜像服务器上,但这样减少了灵活性我们推荐witness服务器分配到不同的机器上,为了保证安全,我们推荐设置SAFETY属性为FULL

    下面实例指点如何建立WIN验证的WITNESS

    1.在服务器上建立端点,监听在7022端口

    CREATE ENDPOINT Endpoint_Mirroring    STATE=STARTED     AS TCP (LISTENER_PORT=7022)     FOR DATABASE_MIRRORING (ROLE=WITNESS)GO

    2.为从服务器实例的用户帐号建立一个SQL登录,假设WITNESS运行在SOMEDOMAIN/witnessuser上,而从服务器运行在MYDOMAIN/dbousername上,那么为从服务器建立一个登录如下:--Create a login for the partner server instances,--which are both running as MYDOMAIN/dbousername:USE master ;GOCREATE LOGIN [MYDOMAIN/dbousername] FROM WINDOWS ;GO--Grant connect permissions on endpoint to login account --of partnersGRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [MYDOMAIN/dbousername];GO3.在每一个从服务器实例上,为WITNESS实例上用户建立一个登录,如下--Create a login for the witness server instance,--which is running as SOMEDOMAIN/witnessuser:USE master ;GOCREATE LOGIN [SOMEDOMAIN/witnessuser] FROM WINDOWS ;GO--Grant connect permissions on endpoint to login account --of partnersGRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [SOMEDOMAIN/witnessuser];GO4.在主服务器上,设置witness ALTER DATABASE AdventureWorks     SET WITNESS =     'TCP://WITNESSHOST4:7022'GO


    最新回复(0)