ITPub博客

[20181010]v$rman_configuration没有输出.txt

原创 Oracle 作者:lfree 时间:2018-10-10 19:54:11 0 删除 编辑

[20181010]v$rman_configuration没有输出.txt

--//别人问的问题,查询v$rman_configuration没有输出,实际上这是正常的,如果rman全部使用是缺省值.
--//查询v$rman_configuration视图没有输出是正常的.简单的测试看看:

1.环境:
SCOTT@test01p> @ ver1
PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.2.0.1.0     Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0

SCOTT@test01p> select * from v$rman_configuration;
no rows selected

--//刚刚重新安装,rman配置也没有改动过.没有输出是正常的.

2.修改rman配置看看:

RMAN> show all;
RMAN configuration parameters for database with db_unique_name TEST are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\APP\ORACLE\PRODUCT\12.2.0\DBHOME_1\DATABASE\SNCFTEST.ORA'; # default
--//12c 数据库 现在 CONFIGURE CONTROLFILE AUTOBACKUP ON; # default

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters are successfully stored

SYS@test> select * from v$rman_configuration;
     CONF# NAME                           VALUE                    CON_ID
---------- ------------------------------ -------------------- ----------
         1 CONTROLFILE AUTOBACKUP         OFF                           0

3.还原看看:
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

SYS@test> select * from v$rman_configuration;
     CONF# NAME                           VALUE                    CON_ID
---------- ------------------------------ -------------------- ----------
         1 CONTROLFILE AUTOBACKUP         ON                            0

--//oracle有时候真奇怪,这样修改,oracle认为是用户修改的.

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP CLEAR;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN configuration parameters are successfully reset to default value

SYS@test> select * from v$rman_configuration;
no rows selected

--//再重复测试看看:
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

SYS@test> select * from v$rman_configuration;
     CONF# NAME                           VALUE                    CON_ID
---------- ------------------------------ -------------------- ----------
         1 CONTROLFILE AUTOBACKUP         ON                            0

4.如果rman配置改动太多.可以简单使用DBMS_BACKUP_RESTORE.RESETCONFIG还原:

SYS@test> EXECUTE DBMS_BACKUP_RESTORE.RESETCONFIG;
PL/SQL procedure successfully completed.

SYS@test> select * from v$rman_configuration;
no rows selected

5.另外12c 如果在pdb下修改rman配置会报错:

D:\tools\rlwrap>rman target sys/btbtms@test01p
Recovery Manager: Release 12.2.0.1.0 - Production on Wed Oct 10 19:51:28 2018
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TEST:TEST01P (DBID=2923790755)

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 10/10/2018 19:51:34
RMAN-07536: command not allowed when connected to a Pluggable Database

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-2215920/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-03

  • 博文量
    2164
  • 访问量
    5932231