RMAN 登入方式
rman target /
rman target / nocatalog
rman target / catalog weisi_catalog/weisi_catalog@weisi
rman target / cmdfile=/home/oracle/weisi/shell/rman.txt log=/home/oracle/weisi/shell/rman.log
rman target / catalog weisi_catalog/weisi_catalog@weisi cmdfile=/home/oracle/weisi/shell/rman.txt log=/home/oracle/weisi/shell/rman.log
cmdfile=/home/oracle/weisi/shell/rman.txt
run
{allocate channel weisi_1 type disk;
backup tablespace users;
release channel weisi_1;
}
list bakup;
1:使用恢复目录
1)创建恢复目录
1.1恢复目录数据库
1.2创建恢复目录用户
create tablespace weisi_catalog datafile '/opt/oracle/oradata/ORCL/weisi_catalog_01.dbf' size 100M;
create user weisi_catalog identified by weisi_catalog default tablespace weisi_catalog;
1.3给恢复目录用户赋予角色权限
grant recovery_catalog_owner to weisi_catalog;
grant resource,connect to weisi_catalog;
1.4创建恢复目录
rman target /
RMAN> connect catalog weisi_catalog/weisi_catalog@weisi
rman>create catalog;
1.5在恢复目录中注册数据库
rman> register database;
1.6
run
{allocate channel wzx_1 type disk;
backup tablespace users;
}