度量快速开发平台-专业、快速的软件定制快开平台

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 部件 流程 SQL
查看: 1123|回复: 3
打印 上一主题 下一主题

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

[复制链接]

235

主题

2547

帖子

5835

积分

论坛元老

Rank: 8Rank: 8

积分
5835
跳转到指定楼层
楼主
发表于 2020-6-4 09:26:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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"
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

235

主题

2547

帖子

5835

积分

论坛元老

Rank: 8Rank: 8

积分
5835
沙发
 楼主| 发表于 2020-6-4 09:26:50 | 只看该作者
回复

使用道具 举报

141

主题

1551

帖子

3573

积分

论坛元老

Rank: 8Rank: 8

积分
3573
板凳
发表于 2020-6-4 18:11:20 | 只看该作者
回复 支持 反对

使用道具 举报

235

主题

2547

帖子

5835

积分

论坛元老

Rank: 8Rank: 8

积分
5835
地板
 楼主| 发表于 2020-6-5 14:33:48 | 只看该作者
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|重庆度量科技  本站关键词:快速开发平台

GMT+8, 2024-11-28 07:33 , Processed in 0.126055 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表