make archive log mode
startup mount
alter database archivelog;
alter database open;
-----
RMAN
select open_mode from v$database;
archive log list
alter system set log_archive_dest_1='location=/apps/oracle/arch' scope=both;
show parameter db_recovery_file_dest
rman target /
configure controlfile autobackup on;
configure backup optimization on;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
select global_name from global_name;
setup catalog
create tablespace catalogtbs datafile '/oradata/oimdev/catalogtbs.dbf' size 100M autoextend on maxsize unlimited;
create user recoim identified by recoim;
alter user recoim default tablespace catalogtbs temporary tablespace temp;
grant recovery_catalog_owner to recoim;
grant connect,resource to recoim;
rman target / catalog recoim/recoim@oimdev
create catalog;
sqlplus "recoim/recoim@oimdev"
show user
select table_name from user_tables;
rman target /
RMAN> CONNECT CATALOG recoim/recoim@oimdev
register database;
recoim/recoim@oimdev
RMAN> report schema;
Report of database schema for database with db_unique_name OIMDEV
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 760 SYSTEM YES /oradata/oimdev/system01.dbf
2 540 SYSAUX NO /oradata/oimdev/sysaux01.dbf
3 105 UNDOTBS1 YES /oradata/oimdev/undotbs01.dbf
4 5 USERS NO /oradata/oimdev/users01.dbf
5 346 EXAMPLE NO /oradata/oimdev/example01.dbf
6 100 CATALOGTBS NO /oradata/oimdev/catalogtbs.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 29 TEMP 32767 /oradata/oimdev/temp01.dbf
RMAN backup database;
Starting backup at 14-NOV-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=547 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oradata/oimdev/system01.dbf
input datafile file number=00002 name=/oradata/oimdev/sysaux01.dbf
input datafile file number=00005 name=/oradata/oimdev/example01.dbf
input datafile file number=00003 name=/oradata/oimdev/undotbs01.dbf
input datafile file number=00006 name=/oradata/oimdev/catalogtbs1.dbf
input datafile file number=00004 name=/oradata/oimdev/users01.dbf
channel ORA_DISK_1: starting piece 1 at 14-NOV-17
channel ORA_DISK_1: finished piece 1 at 14-NOV-17
piece handle=/orafra/OIMDEV/backupset/2017_11_14/o1_mf_nnndf_TAG20171114T222015_f0qdmhr2_.bkp tag=TAG20171114T222015 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 14-NOV-17
Starting Control File and SPFILE Autobackup at 14-NOV-17
piece handle=/orafra/OIMDEV/autobackup/2017_11_14/o1_mf_s_960070831_f0qdmzfp_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-NOV-17
RMAN
Share your knowledge, that will help someone.
startup mount
alter database archivelog;
alter database open;
-----
RMAN
select open_mode from v$database;
archive log list
alter system set log_archive_dest_1='location=/apps/oracle/arch' scope=both;
show parameter db_recovery_file_dest
rman target /
configure controlfile autobackup on;
configure backup optimization on;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
select global_name from global_name;
setup catalog
create tablespace catalogtbs datafile '/oradata/oimdev/catalogtbs.dbf' size 100M autoextend on maxsize unlimited;
create user recoim identified by recoim;
alter user recoim default tablespace catalogtbs temporary tablespace temp;
grant recovery_catalog_owner to recoim;
grant connect,resource to recoim;
rman target / catalog recoim/recoim@oimdev
create catalog;
sqlplus "recoim/recoim@oimdev"
show user
select table_name from user_tables;
rman target /
RMAN> CONNECT CATALOG recoim/recoim@oimdev
register database;
recoim/recoim@oimdev
RMAN> report schema;
Report of database schema for database with db_unique_name OIMDEV
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 760 SYSTEM YES /oradata/oimdev/system01.dbf
2 540 SYSAUX NO /oradata/oimdev/sysaux01.dbf
3 105 UNDOTBS1 YES /oradata/oimdev/undotbs01.dbf
4 5 USERS NO /oradata/oimdev/users01.dbf
5 346 EXAMPLE NO /oradata/oimdev/example01.dbf
6 100 CATALOGTBS NO /oradata/oimdev/catalogtbs.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 29 TEMP 32767 /oradata/oimdev/temp01.dbf
RMAN backup database;
Starting backup at 14-NOV-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=547 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oradata/oimdev/system01.dbf
input datafile file number=00002 name=/oradata/oimdev/sysaux01.dbf
input datafile file number=00005 name=/oradata/oimdev/example01.dbf
input datafile file number=00003 name=/oradata/oimdev/undotbs01.dbf
input datafile file number=00006 name=/oradata/oimdev/catalogtbs1.dbf
input datafile file number=00004 name=/oradata/oimdev/users01.dbf
channel ORA_DISK_1: starting piece 1 at 14-NOV-17
channel ORA_DISK_1: finished piece 1 at 14-NOV-17
piece handle=/orafra/OIMDEV/backupset/2017_11_14/o1_mf_nnndf_TAG20171114T222015_f0qdmhr2_.bkp tag=TAG20171114T222015 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 14-NOV-17
Starting Control File and SPFILE Autobackup at 14-NOV-17
piece handle=/orafra/OIMDEV/autobackup/2017_11_14/o1_mf_s_960070831_f0qdmzfp_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-NOV-17
RMAN
Share your knowledge, that will help someone.
No comments:
Post a Comment