1、DBCA创建数据库
2、配置监听文件listener.ora(服务器端创建)
3、配置远程连接字符串tnames.ora(客户端创建)
4、在数据库中创建表空间
create tablespace rmanca datafile '/u01/app/oracle/oradata/orclca/rmanca.dbf' size 10M;
5、创建用户并制定用户权限
create user rcuser identified by rcuser default tablespace rmanca temporary tablespace temp;
grant connect,resource,recovery_catalog_owner to rcuser;
6、创建catalog
[oracle@oracle-one admin]$ rman catalog rcuser/rcuser
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Mar 30 18:15:23 2019
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to recovery catalog database
RMAN> create catalog tablespace rmanca;
recovery catalog created
7、rman同时连接两个库,注册目标数据库
rman target sys/ziqiyuan catalog rcuser/rcuser@orclca
[oracle@oracle-one ~]$ rman target sys/ziqiyuan catalog rcuser/rcuser@orclca
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Mar 30 18:21:16 2019
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1516158697)
connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
RMAN> report schema;
Report of database schema for database with db_unique_name SORCL
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 760 SYSTEM YES /u01/app/oracle/oradata/orcl/system01.dbf
2 610 SYSAUX NO /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 330 UNDOTBS1 YES /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 5 USERS NO /u01/app/oracle/oradata/orcl/users01.dbf
5 10 RMAN NO /u01/app/oracle/oradata/orcl/rman01.dbf
6 136 OGG NO /u01/app/oracle/oradata/orcl/OGG.DBF
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 22 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf
8、创建备份脚本
RMAN> create script rmsc01
{allocate channel d1 device type disk;
backup incremental level 1 database ;
release channel d1;
}
created script rmsc01
RMAN> run {
execute script rmsc01;
};