443 Chapter9.Database Mirroring

Database Mirroring
Lesson 1:  Overview of Database Mirroring
1. Database Mirroring Roles
(1) sample
(2) sample
2. Principal Role
(1) Sample
(2) sample
3. Mirror Role
4. Witness Server
5. Database Mirroring Endpoints
6. Operating Modes
All of above please refer the Chapter 5. SQL Server Endpoint
7. Caching
(1) Database mirroring, however, does not have caching issues. In addition to sending transactions to the mirror, Database Mirroring also performs periodic metadata transfers. The purpose of these metadata transfers is to cause the mirror to read pages into data cache. This purpose maintains the cache on the mirror in a “semihot” state.
(2) The cache on the mirror does not reflect the exact contents of the cache on the principal, but it does contain most of the pages. Thus, when the database mirroring session fails over, SQL Server does not have to completely rebuild the cache and application do not experience as larger a performance impacts as they do if you use the other availability technologies.
8. Transparent Client Redirect
(1) One of the most difficult processes of failing over when using either log shipping or replication involves application connections. Application must be redirected to the secondary server to continue processing. Database mirroring can avoid this necessity under a very particular configuration.
(2) MDAC, which ships with VS2005 contains a Database Mirroring-related feature within the connection objet call Transparent Client Redirect. When a client makes a connection to a principal, the connection object caches the principal as well as the mirror. This caching is transparent to the application, and developers do not need to write any code to implement this functionality.
9. Database Snapshots (Enterprise Edition only)
(1) The mirror database within a Database Mirroring session is in a constantly revering state and is inaccessible to users. However, you can create a database snapshot against a mirror database that provides point-in-time, read-only access
(2) TSQL.
CREATE DATABASE DB_Mirror_SnapShot ON
(
NAME = DB_Mirror_SnapShot_Data,
FILENAME='C:\TEST\DB_Mirror_SnapShot_Data.ds'
)
AS SNAPSHOT OF DB_Mirror_Sample

(3) SSMS
10. Practice: Establishing Endpoint for Database Mirroring


Lesson 2:  Initializing of Database Mirroring
1. Recovery Model : Full recovery model
2. Backup and Restore
3. Copy System Objects
4. Practice: Configuring Database Mirroring
See the chapter 5

Lesson 3:  Designing Failover and Failback Strategies
1. Designing Mirroring Session Failover
(1) Database mirroring session occur between databases. As such, a mirroring session does not account for cross-database transactions or any server objects external to the database being mirrored.
(2) Applications submitting transactions to multiple databases in a single instance are a concern only when data in one database in dependent upon data in another database.
(3) Migrating login and linked servers is the most important step you must take to ensure that applications continue to function following a failover.
(4) If your security access is denied using Windows accounts, no additional work is required following a failover, while SQL Server logins, you might need to perform additional steps following a failover.
(5) The other objects that you need to re-create on the mirror to ensure complete and proper failover for applications are SQL Server Agent jobs, SSIS packages, and customer error messages.
2. Designing Mirroring Session Failback
(1) Failback After Graceful Failover
① When the principal fails, the mirror is promoted, either manually or automatically. After the failed principal is brought back online, it is automatically demoted to a mirror. The automatic demotion of the principal to a mirror prevents applications from being able to connect to a database in an older state.
② Because Database Mirroring maintains each database within the session in lock-step with each other, a path is present to incrementally resynchronize the failed partner. Not only does a failed principal automatically demote to a mirror but the transaction flow also automatically reverses direction to bring the failed partner back up to data with all transaction.
③ If the event that a failed partner has been offline for a period time, transaction log backup could have been taken that would remove records from the transaction log. To make incremental resynchronization as smooth as possible, refer the following steps:
 Pause the transaction log backups on the principal.
 Bring the failed partner back online
 Restore all transaction log backups taken from the time of the failure to the present, ensuring that you always specify the NONRECOVERY option
 After the principal starts sending transaction to the mirror, restart the transaction log backups on the principal.
 When the principal and mirror are completely resynchronized, gracefully fail over the mirroring session and reconnect application to the principal.
(2) Failback After Forced Failover
① A forced failover occurs when the principal while the mirroring session is in an unsynchronized state, causing transactions that were committed on the principal to become lost. This situation is possible only for the high performance and high protection operating modes.
② Failover for high performance and high protection operating modes is manual.
ALTER DATABASE DB_SAMPLE_MIRROR SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS
③As is readily apparent from the ALTER DATABASE option, a forcible failover can cause transactions to be lost. This situation can create a gap in the LSN sequence between the two partners in the mirroring session.
ALTER DATABASE DB_SAMPLE_MIRROR SET PARTNER OFF

3. Practice: Failover a Database Mirroring Session

 

转载于:https://www.cnblogs.com/yang_sy/archive/2009/04/16/1437403.html

Blender三渲二全流程实战:从建模到输出的完整管线 三渲二是非真实感渲染(NPR)的重要分支,通过三维建模、卡通材质、硬朗灯光与描边技术,输出具有手绘质感的画面。其核心原理在于使用Shader to RGB与ColorRamp构建色阶过渡,配合壳模型描边模拟动画线条。该技术可在动漫、游戏CG、广告等场景复用三维资产,兼顾手绘风格与制作效率。对于希望掌握卡通渲染流程的开发者而言,Blender提供了从建模、材质、灯光到渲染合成的全套工具链。本文以一把太刀展示动画为例,完整演示低模搭建、Toon材质节点、壳模型描边、三点布光、序列帧输出与视频合成,帮助读者建立一 阅读详情

相关推荐

【计算机视觉】pyrealsense2:Intel RealSense 深度相机的 Python 接口实战指南

pyrealsense2:Intel RealSense 深度相机的 Python 接口实战

weixin_43988131的博客 4353

因缺失增量信息而导致recoverseg恢复失败的情况

因缺失增量信息而导致recoverseg恢复失败的情况,报错信息为Failed to inform primary segment of updatedmirroring state. Segment:sdw2:/data1/primary/gpseg1:content=1:dbid=3:mode=r:status=u: REASON: Conversionfailed. stdout:"" stderr:"failure: Error: MirroringFailurefailure: Error:

aabc012的博客 4546

【AutoDL + Langchain-Chatchat】从零构建高效本地 RAG 知识库问答系统:实战保姆级教程(含避坑指南)

本文详细阐述如何在AutoDL云平台,如何利用Langchain-Chatchat构建高效的本地RAG知识库问答系统,并深入解析RAG架构。从环境搭建到实战部署,从问题排查到性能优化,提供一份全面实用的指南,助力开发者快速构建智能问答应用。

拾光夕拾的博客 1805

数据库镜像怎么还原数据库_如何创建数据库镜像

数据库镜像怎么还原数据库 Sometimes our Database fails and we need to reestablish the Database services immediately. Is there a SQL Server solution for high availability? 有时我们的数据库失败,我们需要立即重新建立数据库服务。 是否有用于高可...

culuo4781的博客 1113

Metal 一、初识 Metal 及其语言规范

游戏开发者的新的技术平台,该技术能够为3D图像提高 10 倍的渲染性能。苹果2018年推出 Metal,在此之前一直使用OpenGL ES。1图形渲染;2高并发计算。苹果文档给出的 Metal 优化:CPU 低消耗、GPU 高利用、连续处理器并行、有效的资源利用Metal 官方文档。

irainsa的博客 1225

【重启后nvidia-smi 命令出现错误】

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

qq_44769377的博客 5217

Greenplum failed segment的恢复方法

转载自:li0924的博客《Greenplum failed segment的恢复方法》 【前记】 Segment检测及故障切换机制 GP Master首先会检测Primary状态,如果Primary不可连通,那么将会检测Mirror状态,Primary/Mirror状态总共有4种: 1. Primary活着,Mirror活着。GP Master探测Primary成功之后直接返回,进行下一

皓月如我的专栏 6043

华硕电脑Win10改Win7系统:BIOS设置详解

通过上述步骤,华硕电脑用户可以将系统从Windows 10更改为Windows 7。虽然这个过程可能涉及一些技术细节和潜在的风险(如数据丢失和驱动不兼容),但只要按照指南仔细操作并做好准备工作,大多数用户应该能够成功完成系统回滚。请记住,在进行任何系统更改之前都要备份重要数据,并确保已了解所有潜在的风险和限制。希望本文能够帮助到需要回滚到Windows 7的华硕电脑用户!

nntxthml的博客 2262

sqlserver关于always on的总结

官方文档https://docs.microsoft.com/zh-cn/sql/database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server?view=sql-server-2017 Alwayson相对于数据库镜像最大的优势就是可读副本,带来可读副本的同时还添加了一个新的功能就是配置只读路由实现读写分离 AlwaysOn技术集中了故障转移群集、数据库镜像和日志传送三者的优点

lusklusklusk的博客 7547

基于 YOLOv26 的陶瓷产品缺陷检测系统:智能视觉质检方案

本文提出了一种基于YOLOv26深度学习模型的陶瓷产品智能缺陷检测系统。该系统针对陶瓷生产中的裂纹、气泡、釉面缺陷等8类常见质量问题,采用YOLOv26目标检测算法实现高精度自动化检测。系统架构包含数据采集、预处理、YOLOv26检测和后处理四个模块,具有多类别分类、实时推理和强鲁棒性等技术优势。文章详细介绍了数据预处理与增强方法,并提供了Python代码实现示例。该方案可显著提升陶瓷产品质量检测效率,替代传统人工检测方式,为陶瓷制造业提供智能化质检解决方案。

一键难忘的博客 794

Python 爬虫实战:美团大众点评餐厅数据爬取与分析

本文摘要:美团/大众点评餐厅数据爬虫实战指南 本文详细介绍了如何开发一个完整的餐厅数据爬虫系统,涵盖从环境配置到数据可视化的全流程。主要内容包括: 项目目标:爬取餐厅基本信息(名称、评分、价格等)及详情数据,支持市场分析和商业决策 技术方案:使用Python生态工具(Requests、Playwright、Pandas等)构建爬虫系统 核心挑战:破解大众点评的字体反爬机制和美团的API签名验证 实现细节:提供完整的代码示例,包括字体解析、签名生成、请求重试等关键功能 数据应用:支持将结果导出为CSV/Exc

u014481728的博客 326

sql镜像断开的解决

一、现象 主体,已断开 二、查看日志 主机查看错误日志D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG 错误: 1474,严重性: 16,状态: 1。 Database mirroring connection error 4 '64(指定的网络名不再可用。)' for

ikmb的专栏 5370

《RT-DETR魔术师》专栏介绍 & 优快云独家改进创新实战 & 专栏目录

通过本专栏的阅读,后续你也可以自己魔改网络,在网络不同位置(Backbone、head、neck、loss等)进行魔改,实现创新!!!

①答疑群聊服务;②YOLO大模型知识问答系统;③计算机视觉论文生成智能体; 7383

镜像 主库备库问题

今天在重启服务器的时候,发现一个数据库XXXX(镜像主库)一直处于恢复状态,查看日志,错误如下:         Bypassing recovery for database 'XXXX because it is marked as an inaccessible datab

生活是一种态度 1078

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

DatabaseMirroring搭建

1.    概述数据库镜像维护一个数据库的两个副本,这两个副本必须驻留在不同的 SQL Server 数据库引擎 服务器实例上。通常,这些服务器实例驻留在不同位置的计算机上。启动数据库上的数据库镜像操作时,在这些服务器实例之间形成一种关系,称为“数据库镜像会话”。其中一个服务器实例使数据库服务于客户端(“主体服务器”),另一个服务器实例则根据镜像会话的配置和状态,充当热备用或温备用服务器(“镜像服

水族杰纶 2806

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

Reason 442: Failed to Enable Virtual Adapter

Problem When you try to connect with the Cisco *** client in Windows Vista, you receive the following error: Reason 442: Failed to Enable Virtual Adapter This error prevents you from connecting wit...

weixin_33738578的博客 463

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn)

从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www.cnblogs.com/lyhabc/p/4682028.html第三篇http://www.cnblogs.com/lyhabc/p/4682986.html第四篇http://w...

dingshen2767的博客 662

根据sys.database_mirroring查询镜像数据库同步状态

SELECT * FROM sys.database_mirroring WHERE database_id =DB_ID('dbname') 主要查看mirroring_state字段和值和mirroring_end_of_log_lsn字段的值 实例 SQL Server 中的每个数据库在表中占一行。如果数据库未联机,或未启用数据库镜像,则除database_id以外的所有...

weixin_30273175的博客 485

Mirroring

这个task描述Istio的流量隐蔽/监控能力。流量监控是一个强大的概念,它允许功能团队尽可能减少生产变化带来的风险。监控将实时流量的副本带入监控服务,这发生在主要服务的关键请求路径带外部。 Before you begin 安装Istio 开启能访问日志的 httpbin 服务的两个版本。 httpbin-v1: cat <<EOF | istioctl kube-i...

Ybt_c_index的博客 490

Register Model -- Mirroring

The register model maintains a mirror of what it thinks the current value of registers is inside the DUT. The mirrored value is not guaranteed to be correct because the only information the register m...

漫漫学IC 429

Greenplum failed segment恢复方法

1、启动数据服务 [gpadmin@mdw ~]$ gpstart 2、生成恢复配置文件 [gpadmin@mdw ~]$ gprecoverseg -o ./recov [gpadmin@mdw ~]$ cat recov filespaceOrder= sdw2:50000:/home/data/gpdata/mirror/gpseg0 sdw2:50001:/home/data/gpda...

weixin_43315211的博客 1248
上一篇: 443 Chapter7.Planning for High Availability in the Enterprise
下一篇: 一个权限的设置,你会混淆么
aoding8407
博客等级 码龄11年 2粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值