概述
rman target /
RMAN> show all;
SQL> alter database archivelog;
SQL> select log_mode from v$database;
RMAN> backup database;
RMAN> list backup of database summary;
List of Backups
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
备份 类型 备份 设备 完成时间 片数 镜像数 是否压缩 标签
片号 级别 类型
1 B F A DISK 17-JAN-21 1 1 NO TAG20210117T201351
2 B F A DISK 17-JAN-21 1 1 NO TAG20210117T201351
3 B F A DISK 17-JAN-21 1 1 NO TAG20210117T201351
RMAN> list backup of database;
List of Backup Sets
BS Key Type LV Size Device Type Elapsed Time Completion Time
备份集号 备份类型 备份级别
1级备、0级份
1 Full 1.19G DISK 00:00:31 17-JAN-21
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20210117T201351
##BP Key:备份片号 Status: 备份状态,AVAILABLE代表可用 Compressed: 是否压缩,YES代表已经压缩
##Tag:标签,默认会以时间格式列出
Piece Name: /u01/app/oracle/product/19.3.0/dbhome_1/dbs/01vksojv_1_1
##Piece Name: 备份片的物理路径
List of Datafiles in backup set 1
##List of Datafilesin backup set 1:列出1号备份片备份的数据文件信息
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
##Ckp SCN:数据文件的scn号
##Ckp Time:生产检查点时间
1 Full 2398632 17-JAN-21 NO /u01/app/oracle/oradata/ORCL/system01.dbf
3 Full 2398632 17-JAN-21 NO /u01/app/oracle/oradata/ORCL/sysaux01.dbf
4 Full 2398632 17-JAN-21 NO /u01/app/oracle/oradata/ORCL/undotbs01.dbf
7 Full 2398632 17-JAN-21 NO /u01/app/oracle/oradata/ORCL/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
2 Full 499.68M DISK 00:00:13 17-JAN-21
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20210117T201351
Piece Name: /u01/app/oracle/product/19.3.0/dbhome_1/dbs/02vksol3_1_1
List of Datafiles in backup set 2
Container ID: 3, PDB Name: PDB
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
9 Full 2398652 17-JAN-21 NO /u01/app/oracle/oradata/ORCL/pdb/system01.dbf
10 Full 2398652 17-JAN-21 NO /u01/app/oracle/oradata/ORCL/pdb/sysaux01.dbf
11 Full 2398652 17-JAN-21 NO /u01/app/oracle/oradata/ORCL/pdb/undotbs01.dbf
12 Full 2398652 17-JAN-21 NO /u01/app/oracle/oradata/ORCL/pdb/users01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
3 Full 554.86M DISK 00:00:18 17-JAN-21
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20210117T201351
Piece Name: /u01/app/oracle/product/19.3.0/dbhome_1/dbs/03vksoli_1_1
List of Datafiles in backup set 3
Container ID: 2, PDB Name: PDB$SEED
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
5 Full 2156315 11-JUL-20 NO /u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf
6 Full 2156315 11-JUL-20 NO /u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf
8 Full 2156315 11-JUL-20 NO /u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf
SQL> alter session set container=PDB;
SQL> create table scott.emp1 as select * from scott.emp;
SQL> insert into scott.emp1 select * from scott.emp1;
14 rows created.
SQL> /
28 rows created.
SQL> /
56 rows created.
SQL> /
112 rows created.
SQL> commit;
Commit complete.
SQL> select GROUP#,THREAD#,SEQUENCE#,BYTES/1024/1024,ARCHIVED,STATUS,FIRST_CHANGE# from v$log;
SQL> alter system switch logfile;
alter system switch logfile
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database
SQL> conn / as sysdba
SQL> alter system switch logfile;
SQL> alter system archive log current;
RMAN> backup archivelog all;
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;
RMAN> list backup of archivelog all;
RMAN> list backup of controlfile;
RMAN> list copy;
RMAN> list backup of spfile;
RMAN> report schema;
RMAN> report need backup;
RMAN> report obsolete;
RMAN> list backup of archivelog untiltime =‘sysdate-3’;
RMAN> backup tablespace SYSTEM;
RMAN> list backup of tablespace system;
RMAN> list backup of datafile 1;
最后
以上就是高兴水池为你收集整理的Oracle 19c rman 备份命令汇总List of BackupsList of Backup Sets的全部内容,希望文章能够帮你解决Oracle 19c rman 备份命令汇总List of BackupsList of Backup Sets所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复