052-223(新增70题2018)

You are creating a locally managed tablespace to meet the following requirements:

All the extents should be of the same size.

The data should be spread across two data files.

A bitmap should be used to record the free space within the allocated extents.

Which three options would you choose? (Choose three.)

A. set PCTFREE and PCTUSED to 50

B. specify extent allocation as Uniform

C. specify extent allocation as Automatic

D. create the tablespace as bigfile tablespace

E. create the tablespace as smallfile tablespace

F. set segment space management to Automatic

G. use the RESIZE clause while creating the tablespace

Answer: BEF

Create a locally managed tablespace by specifying LOCAL in the EXTENT MANAGEMENT clause of the CREATE TABLESPACEstatement. This is the default for new permanent tablespaces, but you must specify the EXTENT MANAGEMENT LOCAL clause to specify either the AUTOALLOCATE clause or the UNIFORM clause. You can have the database manage extents for you automatically with the AUTOALLOCATE clause (the default), or you can specify that the tablespace is managed with uniform extents of a specific size (UNIFORM).

If you expect the tablespace to contain objects of varying sizes requiring many extents with different extent sizes, then AUTOALLOCATE is the best choice. AUTOALLOCATE is also a good choice if it is not important for you to have a lot of control over space allocation and deallocation, because it simplifies tablespace management. Some space may be wasted with this setting, but the benefit of having Oracle Database manage your space most likely outweighs this drawback.

If you want exact control over unused space, and you can predict exactly the space to be allocated for an object or objects and the number and size of extents, then UNIFORM is a good choice. This setting ensures that you will never have unusable space in your tablespace.

Bigfile Tablespaces

bigfile tablespace is a tablespace with a single, but potentially very large (up to 4G blocks) data file. Traditional smallfile tablespaces, in contrast, can contain multiple data files, but the files cannot be as large. 

Locally Managed Tablespaces

Locally managed tablespaces track all extent information in the tablespace itself by using bitmaps, resulting in the following benefits:

  • Fast, concurrent space operations. Space allocations and deallocations modify locally managed resources (bitmaps stored in header files).

  • Enhanced performance

  • Readable standby databases are allowed, because locally managed temporary tablespaces do not generate any undo or redo.

  • Space allocation is simplified, because when the AUTOALLOCATE clause is specified, the database automatically selects the appropriate extent size.

  • User reliance on the data dictionary is reduced, because the necessary information is stored in file headers and bitmap blocks.

  • Coalescing free extents is unnecessary for locally managed tablespaces.

All tablespaces, including the SYSTEM tablespace, can be locally managed.

The DBMS_SPACE_ADMIN package provides maintenance procedures for locally managed tablespaces.

CREATE TABLESPACE lmtbsb DATAFILE '/u02/oracle/data/lmtbsb01.dbf' SIZE 50M
    EXTENT MANAGEMENT LOCAL AUTOALLOCATE;
--
CREATE TABLESPACE lmtbsb DATAFILE '/u02/oracle/data/lmtbsb01.dbf' SIZE 50M
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
--
CREATE SMALLFILE TABLESPACE...
--
CREATE BIGFILE TABLESPACE...
--
CREATE TABLESPACE lmtbsb DATAFILE '/u02/oracle/data/lmtbsb01.dbf' SIZE 50M
    EXTENT MANAGEMENT LOCAL 
    SEGMENT SPACE MANAGEMENT AUTO;

 

posted @ 2018-03-21 11:19  巴啦啦大魔王  阅读(119)  评论(0编辑  收藏  举报