Bài giảng Cơ sở dữ liệu nâng cao - Chapter 7: Maintaining high availability
Số trang: 33
Loại file: ppt
Dung lượng: 768.00 KB
Lượt xem: 1
Lượt tải: 0
Xem trước 4 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Bài giảng Cơ sở dữ liệu nâng cao - Chapter 7: Maintaining high availability. Chương 7 gồm có những nội dung chính sau đây: Availability, log shipping, data mirroring, clustering. Mời các bạn cùng tham khảo.
Nội dung trích xuất từ tài liệu:
Bài giảng Cơ sở dữ liệu nâng cao - Chapter 7: Maintaining high availabilityMaintainingHighAvailabilityAgenda1. Availability2. Logshipping3. Datamirroring4. Clustering1. AvailabilityHighavailabilityisn’talwaysaboutfulltimeoperations, but,aboutservicesbeingaccessibletoyouruserswhen theyneedthem2. Log shippingLogshippingis: Tosendtransactionlogsfromtheprimarydatabasetothe secondarydatabase. Tobackupthetransactionlogsfromaprimarydatabaseand thencopyandrestorethemtoasecondarydatabase,keep thesecondarydatabasenearlysynchronizedwiththe primarydatabase.Thedestinationserveractsasabackupserver.Logshippingcanbeusedwithdatabasesusingthefullor bulkloggedrecoverymodels.2. Log shippingLogshippingarchitecture:2. Log shippingLogshippingarchitecture: Primaryserver: TheSQLinstancethatneedstobeprotectedincaseof hardwarefailure,softwareerror,... TheprimaryserverisconfiguredtoexecuteaSQLAgent jobtobackupthetransactionlogtoafile Secondaryserver: ThebackupSQLServer2008instancethatmaintainsa copyoftheprimaryserverdatabase. ThesecondaryserverisconfiguredwithtwoSQLAgent jobs:onetocopythetransactionlogfilefromtheshared backupfolderandtheothertorestorethetransactionlog2. Log shippingLogshippingarchitecture: Monitorserver: Havingamonitorserveraspartoflogshippingis optionalbutrecommended. Whenthemonitorserverparticipatesinlogshipping,it managesthejobsthatproducemonitoringinformation (suchasthelasttimethetransactionlogwasbackedup ontheprimaryserver,thelasttransactionlogthatwas restoredonthesecondaryserver,…)2. Log shippingLogshippingprocess: Backupthetransactionlogontheprimaryserver.ASQL Agentjobontheprimaryserverbacksupthetransactionlog atauserconfigurabletimeintervaltoafileinabackup folder. Copythetransactionlogtothesecondaryserver.ASQL Agentjobonthesecondaryserveraccessesthebackup folderontheprimaryservertocopythetransactionlogfile toalocalfolderonthesecondaryserver. Restorethetransactionlogonsecondaryserver.ASQL Agentjobonthesecondaryserverrestoresthetransaction logonthesecondaryserver.2. Log shippingLogshippingdeployment: Beforebeginningthelogshippingprocess,needtodosome initialconfigurationfirst. Then,chooseregardinghowtodeploy:usingtheSQL Server2008ManagementStudioorusingTSQLscripts. Typically,aDBAusesSQLServer2008Management StudiotoconfigurelogshippingandthengeneratesSQL scriptsforfutureredeployment.2. Log shippingLogshippingdeployment: Initialconfiguration: Createabackupfolderthattheprimaryservercan access;shareit,andensurethatitisaccessiblebythe secondaryserver. Createadestinationfolderonthesecondaryserver,The secondaryserver’sSQLAgentaccountortheproxy accountexecutingthejobmusthavereadandwrite permissiontothisfolder. Therecoverymodelforthelogshippeddatabasemustbe settoeitherFullorbulk_logged2. Log shippingEnablinglogshippinginvolvesthefollowingbasicsteps: Chooseserversforyourprimaryserver,secondaryserver, andoptionalmonitorserver. Chosethebackupcompressionbehavioroflogbackupsif neccessary. Createafileshareforthetransactionlogbackups. Chooseabackupschedulefortheprimarydatabase. Createafolderforeachsecondaryserverintowhichthe transactionlogbackupfileswillbecopied.(Thesefolders areusuallylocatedonthesecondaryservers.) Configureoneormoresecondarydatabases.3. Database mirroringDatabasemirroringisaprimarilysoftwaresolutionfor increasingdatabaseavailability.Mirroringisimplementedonaperdatabasebasisand worksonlywithdatabasesthatusethefullrecovery model.Databasemirroringmaintainstwocopiesofasingle databasethatmustresideondifferentserverinstancesof SQLServerDatabaseEngine.3. Database mirroringOneserverinstanceservesthedatabasetoclients(the principalserver).Theotherinstanceactsasaserver(themirrorserver), dependingontheconfigurationandstateofthemirroring session.Whenadatabasemirroringsessionissynchronized, databasemirroringprovidesahotstandbyserverthat supportsrapidfailoverwithoutalossofdatafrom committedtransactions.Whenthesessionisnotsynchronized,themirrorserveris typicallyavailableasawarmstandbyserver(with possibledataloss).3. Database mirroringDatabasemirroringarchitecture:3. Database mirroringDatabasemirroringarchitecture: PrincipalServer—Theprincipalserverhoststhecopyofthe databasethatclientsconnecttoandinteractwith.As transactionsoccurontheprincipaldatabase,thetransaction logrecordsareforwardedtothemirrordatabase. MirrorServer—Themirrorserverhostsacopyofthe principaldatabaseandappliesthetransactionlogrecords sentbytheprincipaldatabasetokeepthemirroreddatabase insyncwiththeprincipaldatabase.3. Database mirroringDatabasemirroringarchitecture: WitnessServer(optional): Neededifautomaticfailovertothemirrorserverisrequiredinthe caseofaprincipaldatabasefailure. Thewitnessservermonitorsthestatusoftheprincipalandmirror serversinahighavailabilityconfiguration3. Database mirroringHowdatabasemirroringworks: Theprincipalandmirrorserverscommun ...
Nội dung trích xuất từ tài liệu:
Bài giảng Cơ sở dữ liệu nâng cao - Chapter 7: Maintaining high availabilityMaintainingHighAvailabilityAgenda1. Availability2. Logshipping3. Datamirroring4. Clustering1. AvailabilityHighavailabilityisn’talwaysaboutfulltimeoperations, but,aboutservicesbeingaccessibletoyouruserswhen theyneedthem2. Log shippingLogshippingis: Tosendtransactionlogsfromtheprimarydatabasetothe secondarydatabase. Tobackupthetransactionlogsfromaprimarydatabaseand thencopyandrestorethemtoasecondarydatabase,keep thesecondarydatabasenearlysynchronizedwiththe primarydatabase.Thedestinationserveractsasabackupserver.Logshippingcanbeusedwithdatabasesusingthefullor bulkloggedrecoverymodels.2. Log shippingLogshippingarchitecture:2. Log shippingLogshippingarchitecture: Primaryserver: TheSQLinstancethatneedstobeprotectedincaseof hardwarefailure,softwareerror,... TheprimaryserverisconfiguredtoexecuteaSQLAgent jobtobackupthetransactionlogtoafile Secondaryserver: ThebackupSQLServer2008instancethatmaintainsa copyoftheprimaryserverdatabase. ThesecondaryserverisconfiguredwithtwoSQLAgent jobs:onetocopythetransactionlogfilefromtheshared backupfolderandtheothertorestorethetransactionlog2. Log shippingLogshippingarchitecture: Monitorserver: Havingamonitorserveraspartoflogshippingis optionalbutrecommended. Whenthemonitorserverparticipatesinlogshipping,it managesthejobsthatproducemonitoringinformation (suchasthelasttimethetransactionlogwasbackedup ontheprimaryserver,thelasttransactionlogthatwas restoredonthesecondaryserver,…)2. Log shippingLogshippingprocess: Backupthetransactionlogontheprimaryserver.ASQL Agentjobontheprimaryserverbacksupthetransactionlog atauserconfigurabletimeintervaltoafileinabackup folder. Copythetransactionlogtothesecondaryserver.ASQL Agentjobonthesecondaryserveraccessesthebackup folderontheprimaryservertocopythetransactionlogfile toalocalfolderonthesecondaryserver. Restorethetransactionlogonsecondaryserver.ASQL Agentjobonthesecondaryserverrestoresthetransaction logonthesecondaryserver.2. Log shippingLogshippingdeployment: Beforebeginningthelogshippingprocess,needtodosome initialconfigurationfirst. Then,chooseregardinghowtodeploy:usingtheSQL Server2008ManagementStudioorusingTSQLscripts. Typically,aDBAusesSQLServer2008Management StudiotoconfigurelogshippingandthengeneratesSQL scriptsforfutureredeployment.2. Log shippingLogshippingdeployment: Initialconfiguration: Createabackupfolderthattheprimaryservercan access;shareit,andensurethatitisaccessiblebythe secondaryserver. Createadestinationfolderonthesecondaryserver,The secondaryserver’sSQLAgentaccountortheproxy accountexecutingthejobmusthavereadandwrite permissiontothisfolder. Therecoverymodelforthelogshippeddatabasemustbe settoeitherFullorbulk_logged2. Log shippingEnablinglogshippinginvolvesthefollowingbasicsteps: Chooseserversforyourprimaryserver,secondaryserver, andoptionalmonitorserver. Chosethebackupcompressionbehavioroflogbackupsif neccessary. Createafileshareforthetransactionlogbackups. Chooseabackupschedulefortheprimarydatabase. Createafolderforeachsecondaryserverintowhichthe transactionlogbackupfileswillbecopied.(Thesefolders areusuallylocatedonthesecondaryservers.) Configureoneormoresecondarydatabases.3. Database mirroringDatabasemirroringisaprimarilysoftwaresolutionfor increasingdatabaseavailability.Mirroringisimplementedonaperdatabasebasisand worksonlywithdatabasesthatusethefullrecovery model.Databasemirroringmaintainstwocopiesofasingle databasethatmustresideondifferentserverinstancesof SQLServerDatabaseEngine.3. Database mirroringOneserverinstanceservesthedatabasetoclients(the principalserver).Theotherinstanceactsasaserver(themirrorserver), dependingontheconfigurationandstateofthemirroring session.Whenadatabasemirroringsessionissynchronized, databasemirroringprovidesahotstandbyserverthat supportsrapidfailoverwithoutalossofdatafrom committedtransactions.Whenthesessionisnotsynchronized,themirrorserveris typicallyavailableasawarmstandbyserver(with possibledataloss).3. Database mirroringDatabasemirroringarchitecture:3. Database mirroringDatabasemirroringarchitecture: PrincipalServer—Theprincipalserverhoststhecopyofthe databasethatclientsconnecttoandinteractwith.As transactionsoccurontheprincipaldatabase,thetransaction logrecordsareforwardedtothemirrordatabase. MirrorServer—Themirrorserverhostsacopyofthe principaldatabaseandappliesthetransactionlogrecords sentbytheprincipaldatabasetokeepthemirroreddatabase insyncwiththeprincipaldatabase.3. Database mirroringDatabasemirroringarchitecture: WitnessServer(optional): Neededifautomaticfailovertothemirrorserverisrequiredinthe caseofaprincipaldatabasefailure. Thewitnessservermonitorsthestatusoftheprincipalandmirror serversinahighavailabilityconfiguration3. Database mirroringHowdatabasemirroringworks: Theprincipalandmirrorserverscommun ...
Tìm kiếm theo từ khóa liên quan:
Cơ sở dữ liệu nâng cao Cơ sở dữ liệu Bài giảng Cơ sở dữ liệu nâng cao High availability Maintaining high availability Log shipping Data mirroringGợi ý tài liệu liên quan:
-
62 trang 401 3 0
-
Đề thi kết thúc học phần học kì 2 môn Cơ sở dữ liệu năm 2019-2020 có đáp án - Trường ĐH Đồng Tháp
5 trang 376 6 0 -
13 trang 290 0 0
-
Giáo trình Cơ sở dữ liệu: Phần 2 - TS. Nguyễn Hoàng Sơn
158 trang 289 0 0 -
Phân tích thiết kế hệ thống - Biểu đồ trạng thái
20 trang 283 0 0 -
Tài liệu học tập Tin học văn phòng: Phần 2 - Vũ Thu Uyên
85 trang 254 1 0 -
Đề cương chi tiết học phần Quản trị cơ sở dữ liệu (Database Management Systems - DBMS)
14 trang 243 0 0 -
8 trang 186 0 0
-
Giáo trình về dữ liệu và các mô hình cơ sở dữ liệu
62 trang 181 0 0 -
Giáo trình Cơ sở dữ liệu: Phần 2 - Đại học Kinh tế TP. HCM
115 trang 175 0 0