日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

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

新聞中心

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

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

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

備份歸檔日志

--查看***個(gè)歸檔位置過(guò)去一天以來(lái)生成的歸檔日志,dest_id代表歸檔日志存放位置,對(duì)應(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 進(jìn)行備份。

3)如果使用pfile,使用create spfile進(jìn)行備份。

 
 
 
  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,相當(dāng)于備份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啟動(dòng)數(shù)據(jù)庫(kù)到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;--當(dāng)用pfile啟動(dòng)數(shù)據(jù)庫(kù)時(shí),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ù)庫(kù)啟動(dòng)時(shí)不能指定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啟動(dòng)數(shù)據(jù)庫(kù):

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


網(wǎng)頁(yè)標(biāo)題:Oracle基于用戶管理的備份與恢復(fù)之歸檔日志和參數(shù)文件
當(dāng)前地址:http://www.5511xx.com/article/djdoocg.html