OCP-1Z0-052-V8.02-150题
2013-09-28 19:39
537 查看
150. The user HR receives the following error while inserting data into the TTK table:
ERROR at line 1:
ORA-01653: unable to extend table HR.TTK by 128 in tablespace SMD
Upon investigation, you find that SMD is a small file tablespace. Which three action would allow the user
to insert data? (Choose three.)
A.Add a data file to the SMD tablespace.
B.Add a data file to the temporary tablespace associated with the user HR.
C.Resize the data file associated with the SMD tablespace to make it larger.
D.Alter the data file associated with the SMD tablespace to grow automatically.
E.Change the segment space management for the SMD tablespace to automatic.
n segments is managed through free lists.
Answer: ACD
答案解析:
此题考怎么增加表空间的大小,有三种方法
1、增加一个文件:ALTER TABLESPACE lmtbsb
ADD DATAFILE '/u02/oracle/data/lmtbsb02.dbf' SIZE 1M;
2、改变原来数据文件的大小:ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf' RESIZE 300M;
3、设置自动增长:ALTER TABLESPACE users ADD DATAFILE '/u02/oracle/rbdb1/users03.dbf' SIZE 10M
AUTOEXTEND ON NEXT 512K
MAXSIZE 250M;
故答案选ACD
"Creating Data Files and Adding Data Files to a Tablespace" for more information.
Additionally, you can enable automatic file extension (
"Enabling and Disabling Automatic Extension for a Data File".
Manually Resizing a Data File
You can manually increase or decrease the size of a data file using the
For a bigfile tablespace you can use the
Manually reducing the sizes of data files enables you to reclaim unused space in the database. This is useful for correcting errors in estimates of space requirements.
In the next example, assume that the data file
The following statement decreases the size of data file
ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf'
RESIZE 100M;
Note:
It is not always possible to decrease the size of a file to a specific value. It could be that the file contains data beyond the specified decreased size, in which case the database will return an error.
Setting your data files to extend automatically provides these advantages:
Reduces the need for immediate intervention when a tablespace runs out of space
Ensures applications will not halt or be suspended because of failures to allocate extents
To determine whether a data file is auto-extensible, query the
You can specify automatic file extension by specifying an
You can enable or disable automatic file extension for existing data files, or manually resize a data file, using the
The following example enables automatic extension for a data file added to the
ALTER TABLESPACE users
ADD DATAFILE '/u02/oracle/rbdb1/users03.dbf' SIZE 10M
AUTOEXTEND ON
NEXT 512K
MAXSIZE 250M;
The value of
The next example disables the automatic extension for the data file.
ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/users03.dbf'
AUTOEXTEND OFF;
官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tspaces.htm#BABDFCAE
ERROR at line 1:
ORA-01653: unable to extend table HR.TTK by 128 in tablespace SMD
Upon investigation, you find that SMD is a small file tablespace. Which three action would allow the user
to insert data? (Choose three.)
A.Add a data file to the SMD tablespace.
B.Add a data file to the temporary tablespace associated with the user HR.
C.Resize the data file associated with the SMD tablespace to make it larger.
D.Alter the data file associated with the SMD tablespace to grow automatically.
E.Change the segment space management for the SMD tablespace to automatic.
n segments is managed through free lists.
Answer: ACD
答案解析:
此题考怎么增加表空间的大小,有三种方法
1、增加一个文件:ALTER TABLESPACE lmtbsb
ADD DATAFILE '/u02/oracle/data/lmtbsb02.dbf' SIZE 1M;
2、改变原来数据文件的大小:ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf' RESIZE 300M;
3、设置自动增长:ALTER TABLESPACE users ADD DATAFILE '/u02/oracle/rbdb1/users03.dbf' SIZE 10M
AUTOEXTEND ON NEXT 512K
MAXSIZE 250M;
故答案选ACD
Increasing the Size of a Tablespace
You can increase the size of a tablespace by either increasing the size of a data file in the tablespace or adding one. See"Creating Data Files and Adding Data Files to a Tablespace" for more information.
Additionally, you can enable automatic file extension (
AUTOEXTEND) to data files and bigfile tablespaces. See
"Enabling and Disabling Automatic Extension for a Data File".
Manually Resizing a Data File
You can manually increase or decrease the size of a data file using the
ALTER DATABASEstatement. Therefore, you can add more space to your database without adding more data files. This is beneficial if you are concerned about reaching the maximum number of data files allowed in your database.
For a bigfile tablespace you can use the
ALTER
TABLESPACEstatement to resize a data file. You are not allowed to add a data file to a bigfile tablespace.
Manually reducing the sizes of data files enables you to reclaim unused space in the database. This is useful for correcting errors in estimates of space requirements.
In the next example, assume that the data file
/u02/oracle/rbdb1/stuff01.dbfhas extended up to 250M. However, because its tablespace now stores smaller objects, the data file can be reduced in size.
The following statement decreases the size of data file
/u02/oracle/rbdb1/stuff01.dbf:
ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf'
RESIZE 100M;
Note:
It is not always possible to decrease the size of a file to a specific value. It could be that the file contains data beyond the specified decreased size, in which case the database will return an error.
Enabling and Disabling Automatic Extension for a Data File
You can create data files or alter existing data files so that they automatically increase in size when more space is needed in the database. The file size increases in specified increments up to a specified maximum.Setting your data files to extend automatically provides these advantages:
Reduces the need for immediate intervention when a tablespace runs out of space
Ensures applications will not halt or be suspended because of failures to allocate extents
To determine whether a data file is auto-extensible, query the
DBA_DATA_FILESview and examine the
AUTOEXTENSIBLEcolumn.
You can specify automatic file extension by specifying an
AUTOEXTEND ONclause when you create data files using the following SQL statements:
CREATE
DATABASE
ALTER DATABASE
CREATE
TABLESPACE
ALTER
TABLESPACE
You can enable or disable automatic file extension for existing data files, or manually resize a data file, using the
ALTER
DATABASEstatement. For a bigfile tablespace, you are able to perform these operations using the
ALTER
TABLESPACEstatement.
The following example enables automatic extension for a data file added to the
userstablespace:
ALTER TABLESPACE users
ADD DATAFILE '/u02/oracle/rbdb1/users03.dbf' SIZE 10M
AUTOEXTEND ON
NEXT 512K
MAXSIZE 250M;
The value of
NEXTis the minimum size of the increments added to the file when it extends. The value of
MAXSIZEis the maximum size to which the file can automatically extend.
The next example disables the automatic extension for the data file.
ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/users03.dbf'
AUTOEXTEND OFF;
官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tspaces.htm#BABDFCAE
相关文章推荐
- 修复grub
- MmGetPhysicalAddress x86 pae or no pae
- Android 自定义控件
- 虚拟机下linux通过nfs挂载根文件系统
- PHP用strstr()函数阻止垃圾评论(通过判断a标记)
- Warning: no newline at end of file .(转)
- C++ STL 函数介绍
- Linux内核动态调试信息的打开,如pr_debug
- 两数相加问题
- 数据库质疑及修复
- HDU--4768
- Django数据库迁移
- struts2实现文件下载
- easyui datagrid 点击列表头排序出现错乱的原因
- hdu 4763 Theme Section(扩展kmp+线段树)
- easyui datagrid 点击列表头排序出现错乱的原因
- 软考(5)——看图心想 数据库
- 简单OS开发前奏(二)BIOS启动过程-硬件检测及初始化浅析
- XML Schema学习小结
- Tutorial: Getting Started with Spring Security