首页 > 其他分享 >pdb做不完全恢复

pdb做不完全恢复

时间:2023-04-13 14:45:07浏览次数:27  
标签:database _% 完全恢复 backup pdb channel u01

1.数据库全备份

run
{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
backup as compressed backupset full filesperset 10 database format '/u01/rmanbak/fullbk_%d_%s_%u_%T.bak';
sql 'alter system archive log current';
backup as compressed backupset archivelog all format '/u01/rmanbak/daily_arch_%d_%s_%u_%T.bak' delete input;
backup current controlfile format '/u01/rmanbak/daily_ctl_%d_%s_%u_%T.bak';
backup spfile format '/u01/rmanbak/daily_spfile_%d_%s_%u_%T.bak';
release channel ch1;
release channel ch2;
release channel ch3;
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt obsolete;
}

或者是单个pdb备份

run
{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
backup as compressed backupset full filesperset 10 pluggable database pdb format '/u01/rmanbak/pdbbak/pdb_fullbk_%d_%s_%u_%T.bak';
sql 'alter system archive log current';
backup as compressed backupset archivelog all format '/u01/rmanbak/pdbbak/daily_arch_%d_%s_%u_%T.bak' delete input;
backup current controlfile format '/u01/rmanbak/pdbbak/daily_ctl_%d_%s_%u_%T.bak';
backup spfile format '/u01/rmanbak/pdbbak/daily_spfile_%d_%s_%u_%T.bak';
release channel ch1;
release channel ch2;
release channel ch3;
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt obsolete;
}

 

2.执行不完全恢复


关闭pdb
alter pluggable database pdb close immediate;

 

删除该pdb的数据文件
[oracle@19c pdbbak]$ cd /u01/app/oracle/oradata/ora19c/pdb
[oracle@19c pdb]$ rm *.dbf

 

创建辅佐目录
mkdir -p /u01/recover

执行不完全恢复
基于scn(可行)
run{
set until scn 1498061;
restore pluggable database pdb;
recover pluggable database pdb auxiliary destination '/u01/recover';
}

基于时间点(可行)
RMAN>
run{
set until time "TO_DATE('2023-04-12 22:11:00','YYYY-MM-DD HH24:MI:SS')";
restore pluggable database pdb;
recover pluggable database pdb auxiliary destination '/u01/recover';
}

基于sequence(执行报错)
RMAN>
run{
set until sequence 24 thread 1;
restore pluggable database pdb;
recover pluggable database pdb auxiliary destination '/u01/recover';
}

报错信息如下:
Starting recover at 12-APR-23
Segmentation fault (core dumped)

 

标签:database,_%,完全恢复,backup,pdb,channel,u01
From: https://www.cnblogs.com/hxlasky/p/17314763.html

相关文章

  • 新的pdb2mdb.exe
      之前做Unity3d脚本分离的时候遇到的问题,当pdb文件特别大或者其它一些未知情况时,会导致pdb无法正确转成mdb,这会导致mono脚本无法调试,报错为:Microsoft.Cci.Pdb.PdbDebugException:Invalidsignature.(sig=1919117645)inMicrosoft.Cci.Pdb.PdbFile.LoadFuncsFromDbiModul......
  • pdb备份和恢复
     1.备份单个pdbrun{allocatechannelch1devicetypedisk;allocatechannelch2devicetypedisk;allocatechannelch3devicetypedisk;backupascompressedbackupsetfullfilesperset10pluggabledatabasepdb1format'/u01/rmanbak/pdbbak/pdb1_fullbk......
  • oracle如何恢复被误误删除的pdb
    最近太忙,一直没时间写blog;加上前段时间blog空间除了点问题,因此整体迁移到阿里云并且重新备案了。后续有时间我会定期更新,保持写作习惯,不能把技术荒废了。这是去年底某客户的一个case,误删除了6个pdb且带了includingdatafiles参数;这是一个非常复杂的恢复;据说用户开始找了国内很多恢......
  • PDB文件解读
    1.在PDB文件中,ATOM模块是记录蛋白质分子中原子坐标信息的模块,每一行代表一个原子的坐标信息。如下图所示是pdb文件的部分内容:第一列:记录原子的标识号;第二列:原子序号;第三列:原子名称;第四列:残基名称;第五列:链ID;第六列:残基序号;第7-9列:原子坐标;第10列:occupancy,原子占位率;第11列:tempF......
  • WordPress 数据库操作WPDB对象($wpdb)用法详解
     使用wordpress的时候,如果想直接使用WP里封装的数据库操作的类(wp-db.php),将wp-blog-header.php包含到代码中就可以使用了。define(‘PATH’,dirname(dirname(__FILE__......
  • VS error C2471: 无法更新程序数据库vc90.pdb的解决办法
    修改项目属性右击项目-->"属性”  1.“C/C++”-->"常规”-->”调试信息格式”设置为“C7兼容(/Z7)”  2.“C/C++”-->"代码生成”-->”启用字符串池......
  • python 代码调试--pdb
    python代码调试--pdbhttps://www.jianshu.com/p/fb5f791fcb18https://learnku.com/docs/pymotw/pdb-interactive-debugger/3470......
  • tempdb重启不能收缩释放
    问题tempdb重启服务不能收缩释放dbcc和重启服务都不能释放空间原因使用dbccfreesystemcache('ALL'),然后使用dbccshrinkfile,但发现tempdb仍然无法收缩。遇到这样情......
  • 怎么在没有pdb的情况下,进行dmp的问题查看(可以定位到问题语句,但是暂时没办法看变量)
    不需要用到什么汇编知识,有能运行的,没修改过的源代码就行!首先使用vs打开dump文件,查看调用堆栈找到问题语句的内存地址然后打开自己的能运行的源代码,运行,进入断点调试状......
  • SQLServer TempDB迁移
    1.查询目前TempDB的位置select*FROMsys.master_filesWHEREdatabase_id=DB_ID('tempdb');  2.迁移的到目标的权限问题,需要赋予sqlserver服务启动账号的权限读......