Open a Database in Read-Only Mode (301)

tsinglee發表於2007-12-03

You can open any database in read-only mode to prevent its data from being modified
by user transactions. Read-only mode restricts database access to read-only
transactions, which cannot write to the datafiles or to the redo log files.

Disk writes to other files, such as control files, operating system audit trails, trace files,
and alert logs, can continue in read-only mode. Temporary tablespaces for sort
operations are not affected by the database being open in read-only mode. However,
you cannot take permanent tablespaces offline while a database is open in read-only
mode. Also, job queues are not available in read-only mode.

Read-only mode does not restrict database recovery or operations that change the
database’s state without generating redo data. For example, in read-only mode:
■ Datafiles can be taken offline and online
■ Offline datafiles and tablespaces can be recovered
■ The control file remains available for updates about the state of the database
One useful application of read-only mode is that standby databases can function as
temporary reporting databases.

以只讀模式開啟資料庫
1. 可以以只讀模式開啟資料庫來阻止使用者事務修改資料 , 只有只讀事務才能訪問只讀資料庫,
只讀事務不能向資料檔案及重做日誌檔案寫入資訊
2. 在只讀模式下,控制檔案,審計檔案,跟蹤檔案及告警日誌依然可以被寫入.
用於進行排序操作的臨時表空間在只讀模式下依然可用.
使用者不能在只讀模式下將永久表空間離線.
作業佇列在只讀模式下無法使用.
3. 在只讀模式下,可以執行資料庫恢復,也可以執行改變資料庫狀態的操作(該類操作不產生重做資料).例如,在只讀模式下:
* 可以令資料檔案聯機或離線
* 可以恢復離線的資料檔案與表空間
* 控制檔案可以用於記錄資料庫狀態變化

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-987545/,如需轉載,請註明出處,否則將追究法律責任。

相關文章