QUESTION 52-SHUTDOWN TRANSACTIONAL

You conned using SQL Plus to the root container of a multitenant container database (CDB) with SYSDBA privilege.
The CDB has several pluggable databases (PDBs) open in the read/write mode.
There are ongoing transactions in both the CDB and PDBs.
What happens alter issuing the SHUTDOWN TRANSACTIONAL statement?
A. The shutdown proceeds immediately. The shutdown proceeds as soon as all transactions in the PDBs are either committed or rolled hack.
B. The shutdown proceeds as soon as all transactions in the CDB are either committed or rolled back.
C. The shutdown proceeds as soon as all transactions in both the CDB and PDBs are either committed or rolled back.
D. The statement results in an error because there are open PDBs.
Correct Answer: B

* SHUTDOWN [ABORT | IMMEDIATE | NORMAL | TRANSACTIONAL [LOCAL]]
Shuts down a currently running Oracle Database instance, optionally closing and dismounting a database.
If the current database is a pluggable database, only the pluggable database is closed. The consolidated instance continues to run.
Shutdown commands that wait for current calls to complete or users to disconnect such as SHUTDOWN NORMAL and SHUTDOWN TRANSACTIONAL have a time limit that the SHUTDOWN command will wait.
If all events blocking the shutdown have not occurred within the time limit, the shutdown command cancels with the following message:
ORA-01013: user requested cancel of current operation
* If logged into a CDB, shutdown closes the CDB instance.
To shutdown a CDB or non CDB, you must be connected to the CDB or non CDB instance that you want to close, and then enter SHUTDOWN
Database closed.
Database dismounted.
Oracle instance shut down.
To shutdown a PDB, you must log into the PDB to issue the SHUTDOWN command.
SHUTDOWN
Pluggable Database closed.
Note:
* Prerequisites for PDB Shutdown
When the current container is a pluggable database (PDB), the SHUTDOWN command can only be used if:
The current user has SYSDBA, SYSOPER, SYSBACKUP, or SYSDG system privilege.
The privilege is either commonly granted or locally granted in the PDB.
The current user exercises the privilege using AS SYSDBA, AS SYSOPER, AS SYSBACKUP, or AS SYSDG at connect time.
To close a PDB, the PDB must be open.

 

 

您可以使用SQL Plus对具有SYSDBA特权的多租户容器数据库(CDB)的根容器进行conconation。

CDB有几个以读/写模式打开的可插入数据库(pdb)。

在CDB和pdb中都有正在进行的事务。

发出SHUTDOWN事务语句后会发生什么?

A.立即关闭。一旦pdb中的所有事务被提交或被滚出,关闭就会继续。

B.当CDB中的所有事务被提交或回滚时,关闭就会继续。

C.一旦CDB和pdb中的所有事务被提交或回滚,关闭就会继续。

D.该语句导致错误,因为有打开的pdb。

正确答案是:B

 

* SHUTDOWN [ABORT | IMMEDIATE | NORMAL | transaction [LOCAL]]

关闭当前运行的Oracle数据库实例,可选择关闭和卸载数据库。

如果当前数据库为可插拔数据库,则只关闭可插拔数据库。合并后的实例继续运行。

等待当前调用完成或用户断开连接的Shutdown命令,例如Shutdown NORMAL和Shutdown TRANSACTIONAL,有一个Shutdown命令将等待的时间限制。

如果所有阻止关机的事件在时间限制内没有发生,shutdown命令取消,并发送以下消息:

ORA-01013:用户请求取消当前操作

*如果登录到一个CDB, shutdown关闭CDB实例。

如果要关闭一个CDB或非CDB,必须先连接到要关闭的CDB或非CDB实例,然后输入shutdown

数据库关闭。

数据库下马。

Oracle实例关闭。

要关闭PDB,您必须登录PDB并发出shutdown命令。

关闭

可插入数据库关闭。

注意:

* PDB关机的前提条件

当当前容器是一个可插拔数据库(PDB)时,SHUTDOWN命令只能在以下情况下使用:

当前用户具有“SYSDBA”、“SYSOPER”、“SYSBACKUP”或“SYSDG”系统权限。

该特权在PDB中通常被授予或在本地被授予。

当前用户在连接时使用AS SYSDBA、AS SYSOPER、AS sybackup或AS SYSDG权限。

关闭配电盒时,配电盒必须处于打开状态。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值