zoukankan      html  css  js  c++  java
  • [20170703]从备份集取出spfile转化为pfile.txt

    [20170703]从备份集取出spfile转化为pfile.txt

    --//上个星期的事情,要从备份集里面取出看看spfile文件某个参数当时的情况,结果尝试命令老是出错,做一个记录.
    --//最后选择通过awr报表来查看当时某个参数的情况.

    1.环境:
    SYS@book> @ &r/ver1
    PORT_STRING                    VERSION        BANNER
    ------------------------------ -------------- --------------------------------------------------------------------------------
    x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

    RMAN> backup spfile ;
    Starting backup at 2017-07-03 11:01:52
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    including current SPFILE in backup set
    channel ORA_DISK_1: starting piece 1 at 2017-07-03 11:01:53
    channel ORA_DISK_1: finished piece 1 at 2017-07-03 11:01:54
    piece handle=/u01/app/oracle/fast_recovery_area/BOOK/backupset/2017_07_03/o1_mf_nnsnf_TAG20170703T110152_domdx129_.bkp tag=TAG20170703T110152 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 2017-07-03 11:01:54
    Starting Control File and SPFILE Autobackup at 2017-07-03 11:01:54
    piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2017_07_03/o1_mf_s_948366114_domdx25y_.bkp comment=NONE
    Finished Control File and SPFILE Autobackup at 2017-07-03 11:01:55

    --//假设我现在要从这个备份集文件/u01/app/oracle/fast_recovery_area/BOOK/backupset/2017_07_03/o1_mf_nnsnf_TAG20170703T110152_domdx129_.bkp
    --//取出spfile转化pfile.执行如下:

    RMAN> restore spfile to pfile '/tmp/book.txt' from '/u01/app/oracle/fast_recovery_area/BOOK/backupset/2017_07_03/o1_mf_nnsnf_TAG20170703T110152_domdx129_.bkp' ;
    Starting restore at 2017-07-03 11:03:39
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    channel ORA_DISK_2: skipped, AUTOBACKUP already found
    channel ORA_DISK_3: skipped, AUTOBACKUP already found
    channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/app/oracle/fast_recovery_area/BOOK/backupset/2017_07_03/o1_mf_nnsnf_TAG20170703T110152_domdx129_.bkp
    channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
    Finished restore at 2017-07-03 11:03:48

    $ head /tmp/book.txt
    book.__db_cache_size=423624704
    book.__java_pool_size=16777216
    book.__large_pool_size=29360128
    book.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    book.__pga_aggregate_target=209715200
    book.__sga_target=637534208
    book.__shared_io_pool_size=0
    book.__shared_pool_size=184549376
    book.__streams_pool_size=0
    *._cursor_bind_capture_area_size=2001
    --//ok,成功!!
    --//我当时在pfile 与文件之间加入等号,执行如下:

    RMAN> restore spfile to pfile='/tmp/book.txt' from '/u01/app/oracle/fast_recovery_area/BOOK/backupset/2017_07_03/o1_mf_nnsnf_TAG20170703T110152_domdx129_.bkp' ;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "equal": expecting one of: "double-quoted-string, single-quoted-string"
    RMAN-01007: at line 1 column 24 file: standard input

    --//实际上如果仔细看提示,就知道问题在那里.已经提示很明确了.
    RMAN-01009: syntax error: found "equal": expecting one of: "double-quoted-string, single-quoted-string"



  • 相关阅读:
    Python re 模块中,如何使用反斜杠 ""分割字符串?
    VisualVM使用:Local Applications Cannot Be Detected
    九、Delphi10.3通过Json.Serializers实现反序列号,将JSON转换成数组
    vue项目 通过配置webpack插件DllPlugin进行打包速度优化,以及本地运行编译速度优化
    企业微信小程序 导购快捷联系用户 wx.qy.openUserProfile 的使用示例
    微信 支付即服务 服务人员注册 和 AEAD_AES_256_GCM 的使用 (sodium_crypto_aead_aes256gcm_decrypt 或者 sodium_crypto_aead_aes256gcm_is_available() )无法使用 的解决方案
    git仓库服务搭建
    配置中心 ------- Nacos
    Feign的介绍和使用
    Ribbon + Nacos 自定义负载均衡算法
  • 原文地址:https://www.cnblogs.com/lfree/p/7112227.html
Copyright © 2011-2022 走看看