自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle基于用戶管理的備份與恢復(fù)之歸檔日志和參數(shù)文件

數(shù)據(jù)庫 Oracle
Oracle數(shù)據(jù)庫基于用戶管理的備份與恢復(fù)系列文章,我們曾經(jīng)介紹了備份控制文件和恢復(fù)重做日志,今天我們介紹一下基于用戶管理的歸檔日志和參數(shù)文件的備份與恢復(fù),希望能夠?qū)δ兴鶐椭?/div>

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

備份歸檔日志

--查看***個(gè)歸檔位置過去一天以來生成的歸檔日志,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 進(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ù)庫到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ù)庫時(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ù)庫啟動(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ù)庫:

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

【編輯推薦】

  1. Oracle數(shù)據(jù)庫中序列(SEQUENCE)的用法詳解
  2. 虛擬機(jī)安裝Oracle錯(cuò)誤ORA-12514的解決方案
  3. SQL Server數(shù)據(jù)庫實(shí)現(xiàn)全文檢索的一個(gè)完整的例子
  4. Oracle提示“資源正忙,需指定nowait”的解決方案
  5. Oracle數(shù)據(jù)庫的物理存儲(chǔ)結(jié)構(gòu)之?dāng)?shù)據(jù)庫控制文件詳解
責(zé)任編輯:趙鵬 來源: CSDN博客
相關(guān)推薦

2011-08-03 18:42:21

Oracle數(shù)據(jù)庫重做日志

2011-08-01 12:44:25

Oracle基于用戶管理備份與恢復(fù)

2011-08-02 08:59:52

Oracle控制文件

2010-10-29 15:07:33

oracle日志

2015-10-21 14:07:17

Oracle備份Oracle恢復(fù)

2010-10-29 14:44:35

ORACLE歸檔日志

2010-11-19 13:28:13

2009-03-17 16:00:47

Oracle數(shù)據(jù)庫備份

2011-05-20 09:35:24

Oracle數(shù)據(jù)庫恢復(fù)備份

2010-04-01 11:21:51

Oracle備份

2018-04-17 08:24:58

2010-11-19 13:19:26

Oracle歸檔日志

2010-11-19 13:14:21

Oracle刪除歸檔日

2010-04-14 17:11:13

Oracle管理

2010-04-14 16:09:51

Oracle 10g歸

2010-04-12 10:40:49

Oracle數(shù)據(jù)庫

2020-04-03 10:54:38

多云歸檔備份

2009-04-03 10:54:49

Oracle備份恢復(fù)

2011-08-30 10:02:18

OracleRMAN不完全恢復(fù)基于日志序列號恢復(fù)

2010-11-19 13:01:31

Oracle日志文件
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號