oracle12cR2 静默安装不自动创建flash

    技术2022-07-11  130

    oracle12cR2 静默安装不自动创建flash_recovery_area

    在静默安装oracle12cR2过程中,按照11g安装的方法,完成后发现没有快速恢复区,当然我们可以自己创建,但是本着发现问题就要搞明白的原则,研究了一番:

    [oracle@localhost ~]$ sqlplus / as sysdba

    SQL*Plus: Release 12.2.0.1.0 Production on Wed Jul 1 13:56:59 2020

    Copyright (c) 1982, 2016, Oracle.  All rights reserved.

    Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

    SQL> show parameter recover

    NAME                     TYPE     VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest             string db_recovery_file_dest_size         big integer 2G db_unrecoverable_scn_tracking         boolean     TRUE recovery_parallelism             integer     0 remote_recovery_file_dest         string SQL>  可以看到db_recovery_file_dest 为空string

    在创建实例时,我们可以发现12c响应文件dbca.rsp和11g不同

    例如在11g:

    #----------------------------------------------------------------------------- # Name          : DATAFILEDESTINATION  # Datatype      : String # Description   : Location of the data file's # Valid values  : Directory for all the database files # Default value : $ORACLE_BASE/oradata # Mandatory     : No #----------------------------------------------------------------------------- #DATAFILEDESTINATION =

    #----------------------------------------------------------------------------- # Name          : RECOVERYAREADESTINATION # Datatype      : String # Description   : Location of the data file's # Valid values  : Recovery Area location # Default value : $ORACLE_BASE/flash_recovery_area # Mandatory     : No #----------------------------------------------------------------------------- #RECOVERYAREADESTINATION=

    这些参数都是读取的默认值

    但在12c中:

    #----------------------------------------------------------------------------- # Name          : datafileDestination  # Datatype      : String # Description   : Location of the data file's # Valid values  : Directory for all the database files # Default value : $ORACLE_BASE/oradata # Mandatory     : No #----------------------------------------------------------------------------- datafileDestination=

    #----------------------------------------------------------------------------- # Name          : recoveryAreaDestination # Datatype      : String # Description   : Location of the data file's # Valid values  : Recovery Area location # Default value : $ORACLE_BASE/flash_recovery_area # Mandatory     : No #----------------------------------------------------------------------------- recoveryAreaDestination= 这些参数都是打开的,我查看创建实例的日志发现如下语句:

    [Thread-68] [ 2020-07-01 11:36:32.830 CST ] [CloneRmanRestoreStep.executeImpl:271]  db_recovery_file_dest=null [Thread-68] [ 2020-07-01 11:36:32.830 CST ] [CloneRmanRestoreStep.executeImpl:274]  db_recovery_file_dest_size=null 可以看到数据库拿到的是null,这就解释了为何db_recovery_file_dest  为空串了。

    解决办法:

    recoveryAreaDestination=/u01/app/oracle/flash_recovery_area

     

    尝试注释#recoveryAreaDestination= 不能解决问题

    #----------------------------------------------------------------------------- # Name          : recoveryAreaDestination # Datatype      : String # Description   : Location of the data file's # Valid values  : Recovery Area location # Default value : $ORACLE_BASE/flash_recovery_area # Mandatory     : No #----------------------------------------------------------------------------- #recoveryAreaDestination=

    注释后仍然无法自动创建flash_recovery_area

    Processed: 0.015, SQL: 9