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

本文介绍了在Oracle 12c中查询和修改RMAN配置的步骤,包括如何查看`v$rman_configuration`视图,并通过RMAN命令行进行配置更改,如控制文件自动备份的开启和关闭。当RMAN配置为默认值时,`v$rman_configuration`可能没有输出,这属于正常情况。此外,还提到了在PDB下修改RMAN配置的限制以及如何重置所有配置到默认值。
摘要由CSDN通过智能技术生成

[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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值