数据库做不完全恢复198

 

1.数据库处于mount模式

SQL>start mount

 

2.执行不完全恢复

复制代码
#!/bin/bash
. /etc/profile
. ~/.bash_profile

export ORACLE_SID=mydb
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1
rman target / log=/home/oracle/my_scripts/restore_database.log<<EOF
run
{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
allocate channel ch4 device type disk;
allocate channel ch5 device type disk;
set until time "to_date('2024-06-17 11:40:00','YYYY-MM-DD HH24:MI:SS')";
restore database;
recover database;
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
release channel ch5;
}
EOF
复制代码

 

3.打开数据库

alter database open resetlogs;

posted @   slnngk  阅读(9)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示