- 最后登录
- 2013-11-17
- 在线时间
- 24 小时
- 威望
- 53
- 金钱
- 364
- 注册时间
- 2012-3-14
- 阅读权限
- 50
- 帖子
- 37
- 精华
- 0
- 积分
- 53
- UID
- 297
|
2#
发表于 2012-4-26 18:15:46
我的理解:
当你将表空间置为ready only/offline的时候,为了保证数据的一致性和完整性,需要将已经提交的事务的更改写入到datafile中,将未提交的事务回滚。
这个时候产生一个check point 就能完成control file、datafile header和data block之间的SCN同步,数据写入datafile的功能。
复制两句官方文档上的:
The ALTER TABLESPACE...READ ONLY statement waits for the following transactions to either commit or roll back before returning: transactions that have pending or uncommitted changes to the tablespace and that were started before you issued the statement. If a transaction started before the statement remains active, but rolls back to a savepoint, rolling back its changes to the tablespace, then the statement no longer waits for this active transaction.
If you find it is taking a long time for the ALTER TABLESPACE statement to complete, you can identify the transactions that are preventing the read-only state from taking effect. You can then notify the owners of those transactions and decide whether to terminate the transactions, if necessary.
[ 本帖最后由 zhm2815 于 2012-4-26 18:19 编辑 ] |
|