5: Oracle Storage
Code39 Reader In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Code 39 Creator In None
Using Barcode creation for Software Control to generate, create USS Code 39 image in Software applications.
Recognizing Code 3 Of 9 In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.
Printing Code-39 In Visual C#.NET
Using Barcode encoder for Visual Studio .NET Control to generate, create Code 39 Full ASCII image in VS .NET applications.
6 Make the tablespace read only, observe the effect, and make it read-write again This is shown in the next illustration
Print Code 3 Of 9 In VS .NET
Using Barcode maker for ASP.NET Control to generate, create ANSI/AIM Code 39 image in ASP.NET applications.
Making Code 3 Of 9 In Visual Studio .NET
Using Barcode generator for .NET framework Control to generate, create Code 3 of 9 image in Visual Studio .NET applications.
OCA/OCP Oracle Database 11g All-in-One Exam Guide
Make Code 3 Of 9 In Visual Basic .NET
Using Barcode creator for .NET framework Control to generate, create ANSI/AIM Code 39 image in .NET applications.
Bar Code Creator In None
Using Barcode printer for Software Control to generate, create barcode image in Software applications.
7 Enable Oracle-Managed Files for datafile creation:
Generate Data Matrix In None
Using Barcode maker for Software Control to generate, create Data Matrix ECC200 image in Software applications.
Make Barcode In None
Using Barcode maker for Software Control to generate, create bar code image in Software applications.
alter system set db_create_file_dest='/home/db11g/oradata';
UPC-A Printer In None
Using Barcode drawer for Software Control to generate, create UPC A image in Software applications.
UCC.EAN - 128 Generator In None
Using Barcode creation for Software Control to generate, create EAN / UCC - 14 image in Software applications.
8 Create a tablespace, using the minimum syntax now possible:
4-State Customer Barcode Drawer In None
Using Barcode generation for Software Control to generate, create OneCode image in Software applications.
DataMatrix Generation In Objective-C
Using Barcode encoder for iPad Control to generate, create ECC200 image in iPad applications.
create tablespace omftbs;
Drawing UPC A In None
Using Barcode printer for Office Word Control to generate, create UPCA image in Word applications.
Encode Barcode In .NET Framework
Using Barcode generation for Reporting Service Control to generate, create bar code image in Reporting Service applications.
9 Determine the characteristics of the OMF file:
EAN128 Printer In Visual Basic .NET
Using Barcode creator for VS .NET Control to generate, create EAN / UCC - 14 image in VS .NET applications.
Scanning GS1-128 In Visual C#
Using Barcode decoder for .NET framework Control to read, scan read, scan image in .NET framework applications.
select file_name,bytes,autoextensible,maxbytes,increment_by from dba_data_files where tablespace_name='OMFTBS';
Data Matrix ECC200 Generation In .NET Framework
Using Barcode printer for ASP.NET Control to generate, create Data Matrix 2d barcode image in ASP.NET applications.
UPC A Drawer In None
Using Barcode encoder for Online Control to generate, create UPC-A image in Online applications.
Note the file is initially 100MB, autoextensible, with no upper limit 10 Adjust the OMF file to have more sensible characteristics Use whatever system-generated filename was returned by Step 9:
alter database datafile '/oradata/ORCL11G/datafile/o1_mf_omftbs_3olpn462_dbf' resize 500m; alter database datafile '/home/db11g/oradata/ORCL11G/datafile/o1_mf_omftbs_3olpn462_dbf' autoextend on next 100m maxsize 2g;
11 Drop the tablespace, and use an operating system command to confirm that the file has indeed gone:
drop tablespace omftbs including contents and datafiles;
Space Management in Tablespaces
Space management occurs at several levels First, space is assigned to a tablespace This is done by sizing the datafiles, as already described Second, space within a tablespace is assigned to segments This is done by allocating extents Third, space within a segment is assigned to rows This is done by maintaining bitmaps that track how much space is free in each block
The extent management method is set per tablespace and applies to all segments in the tablespace There are two techniques for managing extent usage: dictionary management or local management The difference is clear: local management should always be used; dictionary management should never be used Dictionary-managed extent management is still supported, but only just It is a holdover from previous releases Dictionary extent management uses two tables in the data dictionary SYSUET$ has rows describing used extents, and SYSFET$ has rows describing free extents Every time the database needs to allocate an extent to a segment, it must search FET$ to find an appropriate bit of free space, and then carry out DML operations against FET$ and UET$ to allocate it to the segment This mechanism causes negative problems with performance, because all space management operations in the database (many of which could be initiated concurrently) must serialize on the code that constructs the transactions
5: Oracle Storage
Local extent management was introduced with release 8i and became default with release 9i It uses bitmaps stored in each datafile Each bit in the bitmap covers a range of blocks, and when space is allocated, the appropriate bits are changed from zero to one This mechanism is far more efficient than the transaction-based mechanism of dictionary management The cost of assigning extents is amortized across bitmaps in every datafile that can be updated concurrently, rather than being concentrated (and serialized) on the two tables When creating a locally managed tablespace, an important option is uniform size If uniform is specified, then every extent ever allocated in the tablespace will be that size This can make the space management highly efficient, because the block ranges covered by each bit can be larger: only one bit per extent Consider this statement:
create tablespace large_tabs datafile 'large_tabs_01dbf' size 10g extent management local uniform size 160m;
Every extent allocated in this tablespace will be 160MB, so there will be about 64 of them The bitmap needs only 64 bits, and 160MB of space can be allocated by updating just one bit This should be very efficient provided that the segments in the tablespace are large If a segment were created that needed space for only a few rows, it would still get an extent of 160MB Small objects need their own tablespace:
create tablespace small_tabs datafile 'small_tabs_01dbf' size 1g extent management local uniform size 160k;
The alternative (and default) syntax would be
create tablespace any_tabs datafile 'any_tabs_01dbf' size 10g extent management local autoallocate;
When segments are created in this tablespace, Oracle will allocate a 64KB extent As a segment grows and requires more extents, Oracle will allocate extents of 64KB up to 16 extents, from which it will allocate progressively larger extents Thus fastgrowing segments will tend to be given space in ever-increasing chunks TIP Oracle Corporation recommends AUTOALLOCATE, but if you know how big segments are likely to be and can place them accordingly, UNIFORM SIZE may well be the best option It is possible that if a database has been upgraded from previous versions, it will include dictionary-managed tablespaces You can verify this with the query:
select tablespace_name, extent_management from dba_tablespaces;
Any dictionary-managed tablespaces should be converted to local management with the provided PL/SQL program, which can be executed as follows: