av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

手把手教你學(xué)會(huì)SQLServer鏡像操作

MSSQL 從 2005 開(kāi)始推出鏡像功能.

我們提供的服務(wù)有:做網(wǎng)站、成都做網(wǎng)站、微信公眾號(hào)開(kāi)發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、朗縣ssl等。為上千余家企事業(yè)單位解決了網(wǎng)站和推廣的問(wèn)題。提供周到的售前咨詢(xún)和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的朗縣網(wǎng)站制作公司

SQL Server鏡像是不可讀的.整個(gè)庫(kù)在個(gè) norecovery模式.

SQL Server鏡像只能是1對(duì)1 但可以用鏡像+logshipping 混合實(shí)現(xiàn)一對(duì)多和鏡像鏈.

SQL Server鏡像認(rèn)證分為 證書(shū) 和windows驗(yàn)證.windows驗(yàn)證必須在一個(gè)域里面實(shí)現(xiàn).

并不是每個(gè)公司的生產(chǎn)環(huán)境都是一個(gè)域.域的好處是可以做故障轉(zhuǎn)移群集+鏡像混合實(shí)現(xiàn)保障.

下面就說(shuō)下認(rèn)證方式的鏡像

環(huán)境:win2008 +mssql2008 

1 在主庫(kù)上面創(chuàng)建數(shù)據(jù)庫(kù)主密鑰

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

2 創(chuàng)建證書(shū)

 
 
 
 
  1. create certificate host_105with subject='host_105_c' 

3創(chuàng)建端點(diǎn)

 
 
 
 
  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 備份證書(shū)并把證書(shū)復(fù)制到鏡像服務(wù)器上

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

5  在備份機(jī)上面重復(fù)1-4步驟 (證書(shū)名不一樣 把 所有帶 host_105替換成host_106)

6 在主機(jī)上創(chuàng)建sql驗(yàn)證賬戶(hù)并和證書(shū)綁定

 
 
 
 
  1. create login mirror_b with password='xwj1234!@#$'
  2. create user mirror_b 
  3. for login mirror_bcreate certificate host_106
  4. authorization mirror_bfrom file='c:\host_106.cer'grant 
  5. connect on endpoint:: endport_mirror to mirror_b  

7 在鏡像機(jī)上創(chuàng)建sql驗(yàn)證賬戶(hù)并和證書(shū)綁定

 
 
 
 
  1. create login mirror_a with password;='xwj1234!@#$'    
  2. create user mirror_a for login mirror_a;    
  3. grant connect on endpoint::   
  4. endport_mirror to mirror_a;  
  5. create certificate host_105authorization mirror_afrom file='c:\host_105.cer'; 

8 在主庫(kù)新建mirror_test數(shù)據(jù)庫(kù) 日志模式設(shè)置為完全模式 并在鏡像庫(kù)上面還原,還原模式為 norecovery

9 同步鏡像

 
 
 
 
  1. --- 在鏡像服務(wù)器上運(yùn)行alter database mirror_test  
  2. set partner='TCP://192.168.1.105:1522' 
  3. ---在主機(jī)上面運(yùn)行alter database mirror_test  
  4. set partner='TCP://192.168.1.106:1522' 
  5. ---設(shè)置為高性能模式alter database mirror_testset safety off 

10 測(cè)試

 
 
 
 
  1. --在主機(jī)執(zhí)行  
  2. create table test(id int);  
  3. insert into test select 1;  
  4. --在鏡像庫(kù)上執(zhí)行  
  5. create database mirror_test_snp  
  6. on primary 
  7. (name='mirror_test',filename='c:\mirror_test.mdf')   
  8. as snapshot of mirror_test;  
  9. use mirror_testselect * from test 

11 打開(kāi)鏡像監(jiān)控器

11 mirror+logshipping


當(dāng)前名稱(chēng):手把手教你學(xué)會(huì)SQLServer鏡像操作
標(biāo)題鏈接:http://uogjgqi.cn/article/dhgoscp.html
掃二維碼與項(xiàng)目經(jīng)理溝通

我們?cè)谖⑿派?4小時(shí)期待你的聲音

解答本文疑問(wèn)/技術(shù)咨詢(xún)/運(yùn)營(yíng)咨詢(xún)/技術(shù)建議/互聯(lián)網(wǎng)交流