有时候备库滞后于主库很长时间了,而主库的归档日志已经不存在了,此时的日志间隔如何消除那,很多人选择重建备库,这个是很麻烦
有时候备库滞后于主库很长时间了,而主库的归档日志已经不存在了,,此时的日志间隔如何消除那,很多人选择重建备库,这个是很麻烦的,尤其当主库数据量很大的时候,此时我们还有另外一种选择,那就是使用增量数据库备份来前滚备库,消除日志间隔。
具体作法如下:
1.备库查看丢失的归档时的scn号
idle> select current_scn from v$database;
CURRENT_SCN
-----------
96458277
2.主库创建基于丢失归档scn号为起始的增量备份(要确定主库和备库的目标目录有足够的空间,这里使用/tmp文件夹)
RMAN>
run{
BACKUP DEVICE TYPE DISK INCREMENTAL FROM SCN 96458277 DATABASE FORMAT '/tmp/stb_bk/%U_for_stb.bk' include current controlfile for standby;
}
3.备份好之后,从主库传到备份库的目录中,可以与上文的目录不同。
RMAN> CATALOG START WITH '/tmp/stb_bk/';
4.查看一下controlfile的位置,因为接下来要使用备份的控制文件。
idle> show parameter control
再查看一下standby_log文件的位置,因为接下来可能需要重建。
idle> select *from v$logfile ;
5.使用如下命令在rman中恢复
RMAN>
run{
restore standby controlfile to '/tmp/stb_controlfile01.ctl';
recover database noredo;
}
如果报如下错误,可能是recover managed standby命令正在执行:
ORA-19870: errorwhile restoring backup piece /tmp/stb_bk/05n5a31s_1_1_for_stb.bk
ORA-19573: cannotobtain exclusive enqueue for datafile 1
执行如下命令,或者重启数据库到mount状态:
idle>alter database recover managed standby database cancel ;
然后在rman中再次执行:
RMAN>
run{
restore standby controlfile to '/tmp/stb_controlfile01.ctl' ;
recover database noredo;
}
6.关闭数据库,将恢复出来的备份控制文件覆盖掉原有的控制文件。
在CentOS 6.4下安装Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虚拟机中安装步骤
Debian 下 安装 Oracle 11g XE R2
Oracle Data Guard 重要配置参数
基于同一主机配置 Oracle 11g Data Guard
探索Oracle之11g DataGuard
Oracle Data Guard (RAC+DG) 归档删除策略及脚本
Oracle Data Guard 的角色转换
Oracle Data Guard的日志FAL gap问题
Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby 处理方法
本文永久更新链接地址:

MySQLBLOBshavelimits:TINYBLOB(255bytes),BLOB(65,535bytes),MEDIUMBLOB(16,777,215bytes),andLONGBLOB(4,294,967,295bytes).TouseBLOBseffectively:1)ConsiderperformanceimpactsandstorelargeBLOBsexternally;2)Managebackupsandreplicationcarefully;3)Usepathsinst

The best tools and technologies for automating the creation of users in MySQL include: 1. MySQLWorkbench, suitable for small to medium-sized environments, easy to use but high resource consumption; 2. Ansible, suitable for multi-server environments, simple but steep learning curve; 3. Custom Python scripts, flexible but need to ensure script security; 4. Puppet and Chef, suitable for large-scale environments, complex but scalable. Scale, learning curve and integration needs should be considered when choosing.

Yes,youcansearchinsideaBLOBinMySQLusingspecifictechniques.1)ConverttheBLOBtoaUTF-8stringwithCONVERTfunctionandsearchusingLIKE.2)ForcompressedBLOBs,useUNCOMPRESSbeforeconversion.3)Considerperformanceimpactsanddataencoding.4)Forcomplexdata,externalproc

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,idealforconsistentlengthdatalikecountrycodes;2)VARCHARforvariable-lengthstrings,suitableforfieldslikenames;3)TEXTtypesforlargertext,goodforblogpostsbutcanimpactperformance;4)BINARYandVARB

TomasterMySQLBLOBs,followthesesteps:1)ChoosetheappropriateBLOBtype(TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB)basedondatasize.2)InsertdatausingLOAD_FILEforefficiency.3)Storefilereferencesinsteadoffilestoimproveperformance.4)UseDUMPFILEtoretrieveandsaveBLOBsco

BlobdatatypesinmysqlareusedforvoringLargebinarydatalikeImagesoraudio.1) Useblobtypes (tinyblobtolongblob) Basedondatasizeneeds. 2) Storeblobsin Perplate Petooptimize Performance.3) ConsidersxterNal Storage Forel Blob Romana DatabasesizerIndimprovebackupupe

ToadduserstoMySQLfromthecommandline,loginasroot,thenuseCREATEUSER'username'@'host'IDENTIFIEDBY'password';tocreateanewuser.GrantpermissionswithGRANTALLPRIVILEGESONdatabase.*TO'username'@'host';anduseFLUSHPRIVILEGES;toapplychanges.Alwaysusestrongpasswo

MySQLofferseightstringdatatypes:CHAR,VARCHAR,BINARY,VARBINARY,BLOB,TEXT,ENUM,andSET.1)CHARisfixed-length,idealforconsistentdatalikecountrycodes.2)VARCHARisvariable-length,efficientforvaryingdatalikenames.3)BINARYandVARBINARYstorebinarydata,similartoC


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download
The most popular open source editor

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools
