久久福利_99r_国产日韩在线视频_直接看av的网站_中文欧美日韩_久久一

您的位置:首頁技術(shù)文章
文章詳情頁

Oracle9i新特點-SPFILE的使用

瀏覽:15日期:2023-11-14 13:47:35
Oracle9i新特點:SPFILE的使用--How to backup and restore spfile and controlfile using autobackup option Last Updated: Wednesday, 2004-10-27 0:40 Eygle ; 本文發(fā)表于itpub技術(shù)叢書《Oracle數(shù)據(jù)庫DBA專題技術(shù)精粹》,未經(jīng)許可,嚴禁轉(zhuǎn)載本文. 原文出處:http://www.eygle.com/faq/Oracle9i.New.Feature.Spfile.04.htm六. SPFILE的備份與恢復在本文開篇我們提到,Oracle把Spfile也納入到Rman的備份恢復策略當中,假如你配置了控制文件自動備份(autoback),那么Oracle會在數(shù)據(jù)庫發(fā)生重大變化(如增減表空間)時自動進行控制文件及Spfile文件的備份。下面我們來看一下這個過程:a. 設置控制文件自動備份:[oracle@jumper oracle]$ rman target /Recovery Manager: Release 9.2.0.3.0 - ProdUCtionCopyright (c) 1995, 2002, Oracle Corporation. All rights reserved.connected to target database: HSJF (DBID=1052178311)RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;using target database controlfile instead of recovery catalogold RMAN configuration parameters:CONFIGURE CONTROLFILE AUTOBACKUP OFF;new RMAN configuration parameters:CONFIGURE CONTROLFILE AUTOBACKUP ON;new RMAN configuration parameters are successfully storedRMAN> exit這個設置可以在數(shù)據(jù)庫中通過如下方式查詢得到:[oracle@jumper bdump]$ sqlplus '/ as sysdba'SQL*Plus: Release 9.2.0.3.0 - Production on Sat Jan 17 01:08:05 2004Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Edition Release 9.2.0.3.0 - ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.3.0 - ProductionSQL> select * from v$rman_configuration;CONF# NAME VALUE---------- ------------------------- ----------1 CONTROLFILE AUTOBACKUP ON b. 記錄數(shù)據(jù)庫變化SQL> create tablespace eygle 2 datafile '/data1/oracle/oradata/eygle01.dbf'3 size 5M;Tablespace created. 假如新創(chuàng)建一個表空間,這時候檢查alert<sid>.log文件,你可以在其中發(fā)現(xiàn)這樣的備份信息:Sat Jan 17 00:55:57 2004Starting control autobackupControl autobackup written to DISK devicehandle '/opt/oracle/product/9.2.0/dbs/c-1052178311-20040117-00'Completed: create tablespace eygledatafile '/data1/oracle/oradata/eygle01.dbf’ 假如使用rman進行備份,在提示中你可以看到如下信息: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 storedRMAN> run2> {3> allocate channel ch1 type disk format='e:oracleorabakpenny%t.arc';4> backup archivelog all delete all input;5> release channel ch1;6> }allocated channel: ch1channel ch1: sid=13 devtype=DISKStarting backup at 02-DEC-03current log archivedchannel ch1: starting archive log backupsetchannel ch1: specifying archive log(s) in backup setinput archive log thread=1 sequence=63 recid=168 stamp=511712617input archive log thread=1 sequence=64 recid=169 stamp=511712620input archive log thread=1 sequence=65 recid=170 stamp=511712626input archive log thread=1 sequence=66 recid=171 stamp=511712690channel ch1: starting piece 1 at 02-DEC-03channel ch1: finished piece 1 at 02-DEC-03piece handle=E:ORACLEORABAKPENNY511712693.ARC comment=NONEchannel ch1: backup set complete, elapsed time: 00:00:03channel ch1: deleting archive log(s)archive log filename=E:ORACLEORADATAPENNYARCHIVE1_63.DBF recid=168 stamp=511712617archive log filename=E:ORACLEORADATAPENNYARCHIVE1_64.DBF recid=169 stamp=511712620archive log filename=E:ORACLEORADATAPENNYARCHIVE1_65.DBF recid=170 stamp=511712626archive log filename=E:ORACLEORADATAPENNYARCHIVE1_66.DBF recid=171 stamp=511712690Finished backup at 02-DEC-03Starting Control File and SPFILE Autobackup at 02-DEC-03piece handle=E:ORACLEORA92DATABASEC-3627775766-20031202-01 comment=NONEFinished Control File and SPFILE Autobackup at 02-DEC-03released channel: ch1 我們簡單看一下自動備份的控制文件及spfile文件的格式及命名規(guī)則:c-IIIIIIIIII-YYYYMMDD-QQc ------------------------控制文件IIIIIIIIII---------DBIDYYYYMMDD------------時間戳QQ----------------------序號00-FF,16進制表示c. 使用自動備份恢復spfile文件[oracle@jumper bdump]$ rman target /Recovery Manager: Release 9.2.0.3.0 - ProductionCopyright (c) 1995, 2002, Oracle Corporation. All rights reserved.connected to target database: HSJF (DBID=1052178311)RMAN> restore spfile to '/tmp/spfileeygle.ora' from autobackup;Starting restore at 17-JAN-04using target database controlfile instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=18 devtype=DISKchannel ORA_DISK_1: looking for autobackup on day: 20040117channel ORA_DISK_1: autobackup found: c-1052178311-20040117-01channel ORA_DISK_1: SPFILE restore from autobackup completeFinished restore at 17-JAN-04RMAN> exitRecovery Manager complete.[oracle@jumper bdump]$ ls -l /tmp/spfileeygle.ora-rw-r----- 1 oracle dba 3584 1月 17 09:34 /tmp/spfileeygle.ora 你同樣可以通過這種方法恢復控制文件,示例如下:[oracle@jumper bdump]$ rman target /Recovery Manager: Release 9.2.0.3.0 - ProductionCopyright (c) 1995, 2002, Oracle Corporation. All rights reserved.connected to target database: HSJF (DBID=1052178311)RMAN> restore controlfile to '/tmp/control01.ctl' from autobackup;Starting restore at 17-JAN-04using target database controlfile instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=10 devtype=DISKchannel ORA_DISK_1: looking for autobackup on day: 20040117channel ORA_DISK_1: autobackup found: c-1052178311-20040117-02channel ORA_DISK_1: controlfile restore from autobackup completeFinished restore at 17-JAN-04RMAN> exitRecovery Manager complete.[oracle@jumper bdump]$ ls -l /tmp/control*-rw-r----- 1 oracle dba 1892352 1月 17 09:44 /tmp/control01.ctl Oracle9i自動備份控制文件的功能給我們帶來了極大的收益,通過自動備份,在數(shù)據(jù)庫出現(xiàn)緊急狀況的時候,你可能可以從這個自動備份中獲得更為有效及時的控制文件.缺省的,這個自動備份功能是關(guān)閉的,你可以用我們上面提到的方法打開該功能.<<上一頁 下一頁>> 本文作者:eygle,Oracle技術(shù)關(guān)注者,來自中國最大的Oracle技術(shù)論壇itpub.www.eygle.com是作者的個人站點.你可通過Guoqiang.Gai@gmail.com來聯(lián)系作者.歡迎技術(shù)探討交流以及鏈接交換.原文出處:http://www.eygle.com/faq/Oracle9i.New.Feature.Spfile.04.htm
主站蜘蛛池模板: 久久99精品久久久久久青青日本 | 国产精产国品一二三产区视频 | 浴室洗澡偷拍一区二区 | www中文字幕在线观看 | 色先锋影音 | 国产精品一区二区在线观看 | 天天操狠狠操 | 亚洲综合色自拍一区 | 国产精品久久一区二区三区 | 99动漫 | 日韩视频在线一区 | 黑人巨大精品欧美一区二区免费 | 久久久久国产 | 欧美日韩亚洲三区 | h小视频| 国产日韩欧美一区二区 | 中文字幕 欧美 日韩 | 一区二区国产精品 | 综合伊人 | 国产小视频在线播放 | 日韩中文在线 | 一级片在线观看 | 欧美经典一区 | 精品亚洲国产成av人片传媒 | 亚洲欧美一区二区三区在线 | 日韩免费视频 | 91社区在线观看 | 91亚洲成人 | 亚洲理论电影在线观看 | 热久久这里只有精品 | 日本中文字幕一区 | 最新中文字幕 | 精品视频网站 | 精品久久久久久久久久久久久久 | 四虎最新入口 | 久草福利资源 | 不卡一区二区三区视频 | av片免费 | 日韩一区二区三区在线观看 | 欧美日韩久久 | 五月激情综合网 |