如果開(kāi)啟歸檔,請(qǐng)保證log_archive_start=true開(kāi)啟自動(dòng)歸檔,否則只能手工歸檔,如果是關(guān)閉了歸檔,則設(shè)置該參數(shù)為false 注意:如果是OPS/RAC環(huán)境,需要先把parallel_server = true注釋掉,然后執(zhí)行如下步驟,最后用這個(gè)參數(shù)重新啟動(dòng) 1、開(kāi)啟歸檔 a. 關(guān)閉數(shù)據(jù)庫(kù)shutdown immediate b. startup mount c. alter database archivelog d. alter database opne 2、禁止歸檔 a. 關(guān)閉數(shù)據(jù)庫(kù)shutdown immediate b. startup mount c. alter database noarchivelog d. alter database open 歸檔信息可以通過(guò)如下語(yǔ)句查看 SQL archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination E:\oracle\ora92\database\archive Oldest online log sequence 131 Next log sequence to archive 133 Current log sequence 133
站在用戶的角度思考問(wèn)題,與客戶深入溝通,找到建甌網(wǎng)站設(shè)計(jì)與建甌網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、國(guó)際域名空間、虛擬空間、企業(yè)郵箱。業(yè)務(wù)覆蓋建甌地區(qū)。
開(kāi)啟/關(guān)閉歸檔:
(1)關(guān)閉數(shù)據(jù)庫(kù)
shutdown immediate;
(2)啟動(dòng)數(shù)據(jù)庫(kù)到mount狀態(tài)
startup mount;
(3)開(kāi)啟/關(guān)閉歸檔
開(kāi)啟:alter database archivelog;
關(guān)閉:alter database noarchivelog;
(4)打開(kāi)數(shù)據(jù)庫(kù)
alter database open;
更改前先進(jìn)行數(shù)據(jù)備份:
手工導(dǎo)出oracle數(shù)據(jù)庫(kù)命令:
---------------------------------------------
exp
system/manager
file=d:\daochu.dmp
full=y
1、連接
windows系統(tǒng):打開(kāi)cmd窗口
Linux/Unix系統(tǒng):打開(kāi)終端
rman
target
/
nocatalog;
sqlplus
/nolog
conn
/
as
sysdba;
2、開(kāi)啟歸檔
sqlplusshutdown
immediate;(啟動(dòng)歸檔前先要停止數(shù)據(jù)庫(kù))
sqlplusstartup
mount;(數(shù)據(jù)庫(kù)以mount方式啟動(dòng))
sqlplusalter
database
archivelog;(啟動(dòng)數(shù)據(jù)庫(kù)歸檔)
sqlplusalter
system
set
log_archive_dest_1="/arch"(改變歸檔日志路徑,windows系統(tǒng)使用盤符)
sqlplusalter
database
open;(打開(kāi)數(shù)據(jù)庫(kù))
sqlplusarchive
log
list;(查看歸檔是否已經(jīng)打開(kāi))
關(guān)閉歸檔
alter
database
noarchivelog;
查看oracle數(shù)據(jù)庫(kù)是否為歸檔模式
SQL select name,log_mode from V$database;
NAME LOG_MODE
------------------ ------------------------
TEST NOARCHIVELOG
SQL archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 80157
Current log sequence 80163
編輯本段配置數(shù)據(jù)庫(kù)的.歸檔模式
1.改變非歸檔模式到歸檔模式:
1)SQL conn / as sysdba (以DBA身份連接數(shù)據(jù)庫(kù))
2)SQL shutdown immediate;(立即關(guān)閉數(shù)據(jù)庫(kù))
3)SQL startup mount (啟動(dòng)實(shí)例并加載數(shù)據(jù)庫(kù),但不打開(kāi))
4)SQL alter database archivelog; (更改數(shù)據(jù)庫(kù)為歸檔模式)
5)SQL alter database open; (打開(kāi)數(shù)據(jù)庫(kù))
6)SQL alter system archive log start; (啟用自動(dòng)歸檔)
7)SQL exit (退出)
做一次完全備份,因?yàn)榉菤w檔日志模式下產(chǎn)生的備份日志對(duì)于歸檔模式已經(jīng)不可用了.這一步非非常重要!
2.改變歸檔模式到非歸檔模式:
1)SQLSHUTDOWN NORMAL/IMMEDIATE;
2)SQLSTARTUP MOUNT;
3)SQLALTER DATABASE NOARCHIVELOG;
4)SQLALTER DATABASE OPEN;
3.歸檔相關(guān)命令
archive log stop;
archive log start;
archive log list;
show parameters;
show parameters log_archive_start;
show parameters log_archive_max_process; #歸檔進(jìn)程數(shù)
alter system set log_archive_max_process=5; #將歸檔進(jìn)程數(shù)改為5
select * from v$bgprocess; #檢察后臺(tái)進(jìn)程