rman create script and execute script

 backup as compressed backupset database format '/u01/oracle/rman/clean/compress_db_%U.dbf' ;

 

RMAN> create script lvl_1 { backup incremental level 1 database format '/u01/oracle/rman/ocm/db_%U.dbf' plus archivelog format '/u01/oracle/rman/ocm/log_%U.log' delete all input;}

created script lvl_1


RMAN> run { execute script lvl_1;}


executing script: lvl_1


http://blog.csdn.net/robinson_0612/article/details/6073020


SQL> create restore point initial_point guarantee flashback database;


Restore point created.

 

 

RMAN> backup as compressed backupset database format '/u01/app/oracle/rman/ocm/db-%U.dbf' plus archivelog format '/u01/app/oracle/rman/ocm/archivelog-%U.arc' delete input ;


Starting backup at 14-MAY-13
current log archived
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 05/14/2013 18:36:00
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /u01/app/oracle/arch/ocm/1_4_815408977.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3

RMAN> change archivelog all crosscheck;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=36 devtype=DISK
validation failed for archived log
archive log filename=/u01/app/oracle/arch/ocm/1_4_815408977.dbf recid=1 stamp=815409928
validation failed for archived log
archive log filename=/u01/app/oracle/arch/ocm/1_5_815408977.dbf recid=2 stamp=815410151
validation failed for archived log


 


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
create or replace auth_role
   authid current_user
is
   procedure set_role(role_name varchar2)
end ;
/
 
create or replace package body auth_role_pkg is
   procedure set_role(role_name varchar2) as
   begin
     if sys_context( 'userenv' , 'current_user' ) = 'QDL' then
       dbms_session.set_role(role_name);
     end if;
   end ;
end ;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值