日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Oracle基于用戶管理的備份與恢復(fù)之歸檔日志和參數(shù)文件

繼上次介紹了:Oracle數(shù)據(jù)庫基于用戶管理的備份與恢復(fù)之恢復(fù)重做日志之后,我們今天接著介紹基于用戶管理的備份與恢復(fù)之其他文件的備份,包括歸檔日志的備份以及參數(shù)文件的備份與恢復(fù)等。接下來就讓我們來一起了解一下這一過程吧。

成都創(chuàng)新互聯(lián)公司成立與2013年,先為興安盟等服務(wù)建站,興安盟等地企業(yè),進行企業(yè)商務(wù)咨詢服務(wù)。為興安盟企業(yè)網(wǎng)站制作PC+手機+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。

備份歸檔日志

--查看***個歸檔位置過去一天以來生成的歸檔日志,dest_id代表歸檔日志存放位置,對應(yīng)到v$archive_dest中1~10的destination字段值,0代表不可用。

 
 
 
  1. SQL> select name from v$archived_log where dest_id=1 and first_time>=sysdate-1;  
  2.  
  3. NAME  
  4.  
  5. ------------------------------------------------------------------------------------------------------------------------  
  6.  
  7. /oracle/10g/oracle/log/archive_log/archive_1_23_757801926.arclog  
  8.  
  9. /oracle/10g/oracle/log/archive_log/archive_1_24_757801926.arclog  
  10.  
  11. SQL> select name from v$archived_log where dest_id=10 and first_time>=sysdate-1;  
  12.  
  13. NAME  
  14.  
  15. ------------------------------------------------------------------------------------------------------------------------  
  16.  
  17. /oracle/10g/oracle/product/10.2.0/db_1/flash_recovery_area/ORALIFE/archivelog/2011_08_01/o1_mf_1_23_73fljh3f_.arc  
  18.  
  19. /oracle/10g/oracle/product/10.2.0/db_1/flash_recovery_area/ORALIFE/archivelog/2011_08_02/o1_mf_1_24_73hwlry6_.arc  
  20.  
  21. SQL> select destination from v$archive_dest;   
  22.  
  23. DESTINATION  
  24.  
  25. ------------------------------------------------------------------------------------------------------------------------  
  26.  
  27. /oracle/10g/oracle/log/archive_log  
  28.  
  29. /oracle/10g/oracle/log/archive_log2  
  30.  
  31. USE_DB_RECOVERY_FILE_DEST  
  32.  
  33. 10 rows selected. 

備份參數(shù)文件

1)如果使用文本參數(shù)文件(pfile),使用OS命令拷貝到備份目錄。

2)如果使用spfile,使用create pfile 進行備份。

3)如果使用pfile,使用create spfile進行備份。

 
 
 
  1. SQL> show parameter spfile  
  2.  
  3. NAME                                 TYPE        VALUE  
  4.  
  5. ------------------------------------ ----------- ------------------------------  
  6.  
  7. spfile                               string      /oracle/10g/oracle/product/10.  
  8.  
  9.                                                  2.0/db_1/dbs/spfileoralife.ora 

創(chuàng)建pfile,相當于備份spfile為pfile

 
 
 
  1. SQL> create pfile = '/oracle/10g/oracle/bakup/database/pfileoralife.ora' 
  2.  
  3. 2  from spfile;  
  4.  
  5. File created.  
  6.  
  7. SQL> shutdown immediate  
  8.  
  9. Database closed.  
  10.  
  11. Database dismounted.  
  12.  
  13. ORACLE instance shut down. 

使用pfile啟動數(shù)據(jù)庫到nomount狀態(tài),也可以直接startup pfile='pfile全路徑名'

 
 
 
  1. SQL> startup nomount pfile='/oracle/10g/oracle/bakup/database/pfileoralife.ora';  
  2.  
  3. ORACLE instance started.  
  4.  
  5. Total System Global Area  528482304 bytes  
  6.  
  7. Fixed Size                  1220360 bytes  
  8.  
  9. Variable Size             146800888 bytes  
  10.  
  11. Database Buffers          373293056 bytes  
  12.  
  13. Redo Buffers                7168000 bytes  
  14.  
  15. SQL> show parameter pfile;--當用pfile啟動數(shù)據(jù)庫時,spfile參數(shù)為空  
  16.  
  17. NAME                                 TYPE                   VALUE  
  18.  
  19. ------------------------------------ ---------------------- ------------------------------  
  20.  
  21. spfile                               string  
  22.  
  23. SQL> show parameter spfile;  
  24.  
  25. NAME                                 TYPE                   VALUE  
  26.  
  27. ------------------------------------ ---------------------- ------------------------------  
  28.  
  29. spfile                               string  
  30.  
  31. SQL> alter database mount;  
  32.  
  33. Database altered.  
  34.  
  35. SQL> alter database open;  
  36.  
  37. Database altered.  
  38.  
  39. SQL> shutdown immediate  
  40.  
  41. Database closed.  
  42.  
  43. Database dismounted.  
  44.  
  45. ORACLE instance shut down. 

創(chuàng)建spfile到指定位置

 
 
 
  1. SQL> create spfile='/oracle/10g/oracle/product/10.2.0/db_1/dbs/spfileoralife_test.ora' from   
  2.  
  3. 2  pfile='/oracle/10g/oracle/bakup/database/pfileoralife.ora';  
  4.  
  5. File created.  
  6.  
  7. SQL> shutdown immediate  
  8.  
  9. ORA-01507: database not mounted  
  10.  
  11. ORACLE instance shut down. 

數(shù)據(jù)庫啟動時不能指定spfile文件位置,但可以在pfile文件中引用spfile

 
 
 
  1. SQL> startup nomount spfile='/oracle/10g/oracle/product/10.2.0/db_1/dbs/spfileoralife_test.ora' 
  2.  
  3. SP2-0714: invalid combination of STARTUP options  
  4.  
  5. SQL> startup  spfile='/oracle/10g/oracle/product/10.2.0/db_1/dbs/spfileoralife_test.ora' 
  6.  
  7. SP2-0714: invalid combination of STARTUP options 

在pfileoralife.ora中添加:*.spfile='/oracle/10g/oracle/product/10.2.0/db_1/dbs/spfileoralife_test.ora'使用pfile啟動數(shù)據(jù)庫:

 
 
 
  1. SQL> startup nomount pfile='/oracle/10g/oracle/bakup/database/pfileoralife.ora';  
  2.  
  3. ORACLE instance started.  
  4.  
  5. Total System Global Area  528482304 bytes  
  6.  
  7. Fixed Size                  1220360 bytes  
  8.  
  9. Variable Size             146800888 bytes  
  10.  
  11. Database Buffers          373293056 bytes  
  12.  
  13. Redo Buffers                7168000 bytes  
  14.  
  15. SQL> show parameter spfile;  
  16.  
  17. NAME                                 TYPE                   VALUE  
  18.  
  19. ------------------------------------ ---------------------- ------------------------------  
  20.  
  21. spfile                               string                 /oracle/10g/oracle/product/10.  
  22.  
  23.                                                             2.0/db_1/dbs/spfileoralife_tes  
  24.  
  25.                                                             t.ora 

可以看出,已經(jīng)使用了spfileoralife_test.ora。

關(guān)于Oracle數(shù)據(jù)庫基于用戶管理的備份歸檔日志和參數(shù)文件的知識就介紹到這里,如果您感興趣還可以看一下:Oracle數(shù)據(jù)庫基于用戶管理的控制文件的備份與恢復(fù),希望本次的介紹能夠?qū)δ兴斋@!


文章題目:Oracle基于用戶管理的備份與恢復(fù)之歸檔日志和參數(shù)文件
分享地址:http://www.dlmjj.cn/article/djdoocg.html