如何修改Oracle資料庫為非歸檔模式

來源:互聯網
上載者:User

操作步驟如下:

步驟 1 以oracle使用者登入伺服器,執行以下命令進入SQLPLUS。

oracle@smgwrpt:~> sqlplus "/as sysdba"

步驟 2 查看資料庫當前歸檔模式。

SQL> archive log list

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     2

Next log sequence to archive   2

Current log sequence           4

從以上資訊得知資料庫當前正處于歸檔模式(螢幕顯示資訊僅供參考)。

如果資料庫當前並非處于歸檔模式,可跳過下面的操作。

更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

步驟 3 修改資料庫歸檔模式之前,需要關閉資料庫。

SQL> shutdown immediate

這裡不能使用abort或斷電方式關閉資料庫。

步驟 4 重新以mount狀態啟動資料庫。

SQL> startup mount

步驟 5 成功啟動資料庫後,修改資料庫為非歸檔模式。

SQL> alter database noarchivelog;

Database altered.

從以上資訊得知資料庫歸檔模式修改成功。

步驟 6 啟用資料庫到正常工作狀態。

SQL> alter database open;

Database altered.

從以上資訊得知資料庫啟用成功。

步驟 7 再次查看驗證資料庫當前歸檔模式。

SQL> archive log list

Database log mode              No Archive Mode

Automatic archival             Disabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     3

Current log sequence           5

從以上資訊得知資料庫當前正處於非歸檔模式,修改成功。

本文出自 “richard的筆記-積微成著” 部落格,請務必保留此出處http://zxf261.blog.51cto.com/701797/762043

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.