187 Examine the following command: SQL> ALTER TABLE booking SHRINK SPACE COMPACT; Which activity is
2015-12-10 21:16
603 查看
187
Examine the following command:
SQL> ALTER TABLE booking SHRINK SPACE COMPACT;
Which activity is performed when the preceding command is executed?
A. The shrink operation touches every block in the BOOKING table
B. The high-water mark (HWM) for the BOOKING table is shifted from its original position
C. The progress of the shrink operation is saved in the bitmap blocks of the BOOKING table
D. The data manipulation language (DML) triggers on the BOOKING table are executed because the
shrink operation is internally handled by the INSERT/DELETE operation
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Explanation:
http://www.oracle-base.com/articles/10g/SpaceObjectTransactionManagement10g.php
Based on the recommendations from the segment advisor you can recover space from specific objects
using one of the variations of the ALTER TABLE … SHRINK SPACE commands.
The shrink is accomplished by moving rows between blocks, hence the requirement for row movement to
be enabled for the shrink to take place. This can cause problem with ROWID based triggers. The shrinking
process is only available for objects in tablespaces with automatic segment-space management enabled.
The COMPACT option allows the shrink operation to be broken into two stages. First the rows are moved
using the COMPACT option but the HWM is not adjusted so no parsed SQL statements are invalidated.
The HWM can be adjusted at a later date by reissuing the statement without the COMPACT option. At this
point any depenedant SQL statements will need to be reparsed.
http://books.google.com/books?id=0iwrL9P25Z0C&pg=PA190&lpg=PA190&dq=shrink+operation+is
+saved+in+the+bitmap
+blocks&source=bl&ots=MGoTq9AT0m&sig=y0EgXfO2MZnWlOZTgKXo5CDbFJw&hl=en&ei=L0gATdqaN
sG1nAfsrZjlDQ&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCcQ6AEwAw#v=onepage&q=shrink
%20operation%20is%20saved%20in%20the%20bitmap%20blocks&f=false
A shrink operation may cause ROWIDs to change in heap-organized segments. So row movement has to
be enabled to circumvent this issue before a shrink operation. To enable row movement, use the
{CREATE|ALTER} TABLE ENABLE ROW movement command.
A shrink operation consists of thw phases, compaction and adjusting the HWM to release the unused
space. If the COMPACT option is used, only the first phase is executed. The shrink results are saved in
bitmap blocks of the corresponding segment, Oracle 10g will remember what has been done. If CASCADE
is specified, the shrinking cascades to all dependent segments that support a shrink operation.
During the COMPACT phase, individual rowlocks are held. Concurrent DML operations serialize on thes
rowlocks and DML operations can block the compaction progress. When the HWM is adjusted in the
second phase, the object is locked in exclusive mode for a short duration.
Examine the following command:
SQL> ALTER TABLE booking SHRINK SPACE COMPACT;
Which activity is performed when the preceding command is executed?
A. The shrink operation touches every block in the BOOKING table
B. The high-water mark (HWM) for the BOOKING table is shifted from its original position
C. The progress of the shrink operation is saved in the bitmap blocks of the BOOKING table
D. The data manipulation language (DML) triggers on the BOOKING table are executed because the
shrink operation is internally handled by the INSERT/DELETE operation
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Explanation:
http://www.oracle-base.com/articles/10g/SpaceObjectTransactionManagement10g.php
Based on the recommendations from the segment advisor you can recover space from specific objects
using one of the variations of the ALTER TABLE … SHRINK SPACE commands.
The shrink is accomplished by moving rows between blocks, hence the requirement for row movement to
be enabled for the shrink to take place. This can cause problem with ROWID based triggers. The shrinking
process is only available for objects in tablespaces with automatic segment-space management enabled.
The COMPACT option allows the shrink operation to be broken into two stages. First the rows are moved
using the COMPACT option but the HWM is not adjusted so no parsed SQL statements are invalidated.
The HWM can be adjusted at a later date by reissuing the statement without the COMPACT option. At this
point any depenedant SQL statements will need to be reparsed.
http://books.google.com/books?id=0iwrL9P25Z0C&pg=PA190&lpg=PA190&dq=shrink+operation+is
+saved+in+the+bitmap
+blocks&source=bl&ots=MGoTq9AT0m&sig=y0EgXfO2MZnWlOZTgKXo5CDbFJw&hl=en&ei=L0gATdqaN
sG1nAfsrZjlDQ&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCcQ6AEwAw#v=onepage&q=shrink
%20operation%20is%20saved%20in%20the%20bitmap%20blocks&f=false
A shrink operation may cause ROWIDs to change in heap-organized segments. So row movement has to
be enabled to circumvent this issue before a shrink operation. To enable row movement, use the
{CREATE|ALTER} TABLE ENABLE ROW movement command.
A shrink operation consists of thw phases, compaction and adjusting the HWM to release the unused
space. If the COMPACT option is used, only the first phase is executed. The shrink results are saved in
bitmap blocks of the corresponding segment, Oracle 10g will remember what has been done. If CASCADE
is specified, the shrinking cascades to all dependent segments that support a shrink operation.
During the COMPACT phase, individual rowlocks are held. Concurrent DML operations serialize on thes
rowlocks and DML operations can block the compaction progress. When the HWM is adjusted in the
second phase, the object is locked in exclusive mode for a short duration.
相关文章推荐
- sql zhuan ORACLE
- ADO.NET(数据库访问技术)
- 【MySQL】行长度的一些限制
- 184 You are in the process of creating a Virtual Private Catalog (VPC) in your Oracle Database 11g d
- ORACLE 表空间使用率查询
- PL/SQL实用函数汇总
- oracle自定义聚集函数
- oracle大数据操作技巧
- 关于plsql的一些知识点
- sql语句
- oracle聚合函数全记录
- oracle定时器
- ORACLE的HINT详解
- 数据库与关系型数据库
- SQL serer 2008 简介
- SQL中插入当前系统时间
- mongodb 分页查询
- 使用sqlplus连接提示:ORA-28002: the password will expire within 7 days
- JDBC 连接MySQL的使用。
- mysql安装后简单的配置(以5.6.22 x64为示例)