归档模式管理
平臺:windows
oracle:11.2.0.4.0
?
1、檢查當前是否開啟歸檔模式
C:\Users\DataCenter>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on 星期日 4月 26 17:03:24 2015Copyright (c) 1982, 2013, Oracle. All rights reserved.連接到: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> archive log list 數據庫日志模式 非存檔模式 自動存檔 禁用 存檔終點 D:\app\DataCenter\product\11.2.0\dbhome_1\RDBMS 最早的聯機日志序列 13 當前日志序列 15 SQL>2、關閉數據庫
SQL> shutdown immediate 數據庫已經關閉。 已經卸載數據庫。 ORACLE 例程已經關閉。?
3、將數據庫啟動到mount狀態
SQL> startup mount ORACLE 例程已經啟動。Total System Global Area 2137886720 bytes Fixed Size 2282944 bytes Variable Size 1811941952 bytes Database Buffers 318767104 bytes Redo Buffers 4894720 bytes 數據庫裝載完畢。4、開啟數據庫歸檔
SQL> alter database archivelog;數據庫已更改。SQL>?5、設置歸檔路徑
SQL> alter system set log_archive_dest_1="location=D:\app\DataCenter\arch" scope=spfile;系統已更改。SQL>6、將數據庫啟動
SQL> alter database open;數據庫已更改。SQL>?7、查看開始歸檔結果
SQL> archive log list; 數據庫日志模式 存檔模式 自動存檔 啟用 存檔終點 D:\app\DataCenter\product\11.2.0\dbhome_1\RDBMS 最早的聯機日志序列 13 下一個存檔日志序列 15 當前日志序列 15 SQL>?查看發現,雖然歸檔模式已經開啟,但是歸檔路徑依然沒有生效。需要重啟庫,就可以生效.
SQL> shutdown immediate; 數據庫已經關閉。 已經卸載數據庫。 ORACLE 例程已經關閉。 SQL> startup ORACLE 例程已經啟動。Total System Global Area 2137886720 bytes Fixed Size 2282944 bytes Variable Size 1811941952 bytes Database Buffers 318767104 bytes Redo Buffers 4894720 bytes 數據庫裝載完畢。 數據庫已經打開。 SQL> archive log list 數據庫日志模式 存檔模式 自動存檔 啟用 存檔終點 D:\app\DataCenter\arch 最早的聯機日志序列 13 下一個存檔日志序列 15 當前日志序列 15 SQL>另外, 在之前數據庫處于mount狀態時,設置完成數據庫的歸檔路徑之后,可以執行一次startup mount force,使數據庫更改歸檔路徑生效亦可.
?
如何關閉數據庫歸檔模式?
alter database noarchivelog;?
轉載于:https://www.cnblogs.com/arcer/p/4458060.html
總結
- 上一篇: iOS UILable高度自适应
- 下一篇: bestcoder Delete