WEB开发网
开发学院数据库Oracle 建repository存放的表空间和rman用户 阅读

建repository存放的表空间和rman用户

 2008-09-09 12:55:02 来源:WEB开发网   
核心提示: 2、建repository存放的表空间和rman用户$more createrman_db4.shconnect internalcreate tablespace rman_tsdatafile '/export/home/oracle/oradata/rman_data/rma

2、建repository存放的表空间和rman用户

$more createrman_db4.sh
connect internal
create tablespace rman_ts
datafile '/export/home/oracle/oradata/rman_data/rman_ts.dbf'
size 20M default storage (initial 100K next 100K pctincrease 0);
create user rman_hainan identified by rman_hainan
temporary tablespace TEMP
default tablespace rman_ts quota unlimited on
rman_ts;
grant recovery_catalog_owner to rman_hainan;
grant connect ,resource to rman_hainan;

3、建catalog,注册目标数据库

$more createrman_db5.sh
rman catalog rman_hainan/rman_hainan@rman msglog=rman.log
create catalog ;
exit;
rman target sys/oracle@db1
connect catalog rman_hainan/rman_hainan@rman
register database;
exit;

4、可以开始做备份了。

5、做全备

$more rmanshell
. /export/home/oracle/.profile
rman rcvcat rman_hainan/rman_hainan@rman target / cmdfile /export/home/oracle/ba
ckup_level0.rcv log /export/home/oracle/backup.log
$more backup_level0.rcv
resync catalog;
run {
allocate channel t1 type disk;
backup
incremental level 0
skip inaccessible
tag hot_db_bk_level0
filesperset 3
format '/export/home/oracle/bk_%s_%p_%t.bk'
(database);
sql 'alter system archive log current';
backup
filesperset 10
format '/export/home/oracle/a1_%s_%p_%t.ac'
(archivelog all delete input);
backup
format '/export/home/oracle/df_t%t_s%s_p%p.ct'
current controlfile ;
}

上一页  1 2 3 4 5  下一页

Tags:repository 存放 空间

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接