|
我给你举个例子:
前几天还问过这题。大概是这样的:它前面说当时有10个用户在线5个未提交事务,不想有新用户上线也不想等用户离线,不想回滚未提交事务,哪种形式shutdown好?
我的笨脑子马上想abort,它不用回滚。可答案是transactional。后来想想,人家一定是“以人为本”的(笑话),怎么能就abort了呢(abort后事务就终止了,再启动时要recover,我在练习时总这么干)?它是要等事务提交后再shutdown,这样就不回滚了,用户也不会有什么损失,其实回滚不回滚是对的immediate的。这就是外国人的思路,他们要尽量处理好一件事,而不是像我们这样只要做出来就行了。你看,有这方面的问题吧。
原题:
DBA wants to shut down the database and found that there are still 10
users currently connected and 5 pending transactions. He doesn't want new
users to log in and doesn't want to wait the existing users to discnnect, but
he doesn't want to roll back the pending transaction. Which mode should he
use?
- Abort
- Normal
- Immediate
- Transactional |
|