62.You are in the middle of a transaction updating a very important table. The machine on which a da

62.You are in the middle of a transaction updating a very important table. The machine on which a
database was running reboots because of power outage. This caused a database instance failure.
Which statement is true in this situation?
A.The online redo log files and archived redo log files are required to accomplish the recovery.
B.The uncommitted transaction will be committed at the next startup of the database instance.
C.The uncommitted transaction is rolledback automatically at the next opening of the database.
D.The DBA has to perform the recovery on the database to recover the uncommitted transaction.
答案:C
这里说的是如果正在执行一个update,突然给断电了,重启会出现什么情况
主要是已经提交的数据但是还没有进行写入数据文件给断电了,重启的时候,smon就会进行恢复
a.执行前滚,将已经写入重做日志文件但是还没有写入到数据文件中的数据(使用scn号码来识别提交记录的)
b.打开数据库
c.回滚没有提交的事务
--题目数据库实例失败,但是测试了好几次没成功
[oracle@wahaha3 ~]$ sqlplus sh/sh
SQL> select count(1) from sales;
  COUNT(1)
----------
    918843
SQL> update sales set quantity_sold=10;
--使用的是虚拟机,所以在系统上直接将虚拟软件进程干掉
正常重启
--shutdown abort也测试过,也写过循环insert,commit都没出现重启起不来的情况
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值