zoukankan      html  css  js  c++  java
  • 10g ASM下修改control file的位置

    1.查看位置以及name是否正确

    SQL> sho parameter name
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_file_name_convert                 string
    db_name                              string      orcl
    db_unique_name                       string      orcl
    global_names                         boolean     FALSE
    instance_name                        string      orcl
    lock_name_space                      string
    log_file_name_convert                string
    service_names                        string      orcl
    SQL> show parameter control
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    control_file_record_keep_time        integer     7
    control_files                        string      +DG1/orcl/controlfile/current.
                                                     261.851893233, +DG1/orcl/contr
                                                     olfile/current.260.851893233

    2.关闭数据库,关闭数据库之前一定做好备份哦

    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.

    3.启动数据库到mount状态

    SQL> startup mount
    ORACLE instance started.
    
    Total System Global Area 1610612736 bytes
    Fixed Size                  2084296 bytes
    Variable Size             385876536 bytes
    Database Buffers         1207959552 bytes
    Redo Buffers               14692352 bytes
    Database mounted.

    4.备份一个新的control file,并修改control file的位置

    SQL> alter database backup controlfile to '+DG1/orcl/controlfile/controlfile03';
    
    Database altered.
    
    SQL> alter system set control_files='+DG1/orcl/controlfile/current.261.851893233','+DG1/orcl/controlfile/controlfile03' scope=spfile;
    
    System altered.

    5.关闭数据库,再启动,再检查

    SQL> shutdown immediate
    ORA-01109: database not open
    
    
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 1610612736 bytes
    Fixed Size                  2084296 bytes
    Variable Size             385876536 bytes
    Database Buffers         1207959552 bytes
    Redo Buffers               14692352 bytes
    Database mounted.
    Database opened.
    SQL> show parameter name
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_file_name_convert                 string
    db_name                              string      orcl
    db_unique_name                       string      orcl
    global_names                         boolean     FALSE
    instance_name                        string      orcl
    lock_name_space                      string
    log_file_name_convert                string
    service_names                        string      orcl
    SQL> show parameter control
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    control_file_record_keep_time        integer     7
    control_files                        string      +DG1/orcl/controlfile/current.
                                                     261.851893233, +DG1/orcl/contr
                                                     olfile/controlfile03
  • 相关阅读:
    20165223 week6测试错题总结
    20165223《Java程序设计》第七周Java学习总结
    20165207 第八周学习总结
    2017-2018-2 20165207实验二《Java面向对象程序设计》实验报告
    20165207 第七周学习总结
    20165207 第六周学习总结
    20165207 实验一 Java开发环境的熟悉
    20165207 第五周学习总结
    20165207 第四周学习总结
    20165207 第三周学习总结
  • 原文地址:https://www.cnblogs.com/nazeebodan/p/3820098.html
Copyright © 2011-2022 走看看