1/数据库在什么状态下可以用RMAN进行全备?
首先,我们测试,数据库关闭状态
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oracle ORCL]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jul 10 15:36:27 2019
Copyright © 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> backup database;
Starting backup at 10-JUL-19
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 07/10/2019 15:36:34
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
错误提示:oracle not available,证明数据库关闭状态下,根本没办法用RMAN 进行备份==
SQL> select status from v$instance;
STATUS
MOUNTED
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oracle ORCL]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jul 10 15:42:52 2019
Copyright © 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1531323087, not open)
RMAN> backup database;
Starting backup at 10-JUL-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 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=00006 name=/u01/app/oracle/oradata/orcl/back.dbf
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 10-JUL-19
channel ORA_DISK_1: finished piece 1 at 10-JUL-19
piece handle=/u01/app/oracle/fra/ORCL/backupset/2019_07_10/o1_mf_nnndf_TAG20190710T154301_glc5r5n1_.bkp tag=TAG20190710T154301 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:59
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 10-JUL-19
channel ORA_DISK_1: finished piece 1 at 10-JUL-19
piece handle=/u01/app/oracle/fra/ORCL/backupset/2019_07_10/o1_mf_ncsnf_TAG20190710T154301_glc5w0bm_.bkp tag=TAG20190710T154301 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-JUL-19
和表空间/数据文件备份?
=mount oracle后重新使用RMAN 全备数据库,显示成功,证明数据库在mount状态下肯定是可以使用RMAN全备的=========