Complete reference oracle 9i free pdf


















LOGGING specifies that, by default, all tables, indexes, and partitions within the tablespace have all changes written to redo. This clause is discussed in a subsequent section of this lesson.

Use K or M to specify the size in kilobytes or megabytes. Expand Storage folder 5. Select the Tablespaces folder, and select Create from the right mouse menu. In the General tab of the property sheet, enter the tablespace name. In the Datafiles region, specify data file. In the Storage Tab of the property sheet, enter storage information.

Choosing a Space Management Method Tablespace extents can be managed with data dictionary tables or bitmaps. When you create a tablespace, you choose one of these methods of space management. You cannot alter the method at a later time.

Locally Managed Tablespaces A tablespace that manages its own extents maintains a bitmap in each datafile to keep track of the free or used status of blocks in that data file. Each bit in the bitmap corresponds to a block or a group of blocks.

When an extent is allocated or freed for reuse, the Oracle server changes the bitmap values to show the new status of the blocks. Dictionary-Managed Tablespaces For a tablespace that uses the data dictionary to manage its extents, the Oracle server updates the appropriate tables in the data dictionary whenever an extent is allocated or deallocated.

By default a tablespace is locally managed. LOCAL specifies that tablespace is locally managed with a bitmap. Users cannot specify an extent size. This is the default. Use K or M to specify the extent size in kilobytes or megabytes. The default size is 1 megabyte. Alternatively, all extents can have the same size in a locally managed tablespace.

Dictionary Managed Tablespaces Segments in dictionary managed tablespaces can have a customized storage, this is more flexible than locally managed tablespaces but much less efficient. Expand the Tablespaces folder.

Click the Storage tab. Make changes, and click Apply. Undo Tablespace An undo tablespace is used with automatic undo management. Temporary Segments You can manage space for sort operations more efficiently by designating temporary tablespaces exclusively for sort segments. No permanent schema objects can reside in a temporary tablespace. Sort, or temporary, segments are used when a segment is shared by multiple sort operations. Temporary tablespaces provide performance improvements when you have multiple sorts that are too large to fit into memory.

The sort segment of a given temporary tablespace is created at the time of the first sort operation of the instance. The sort segment expands by allocating extents until the segment size is equal to or greater than the total storage demands of all of the active sorts running on that instance. Supply details in the General tab of the property sheet, and select the Temporary option in the Type region 7.

Click the Storage tab, and enter the storage information. Creating a default temporary tablespace during database creation prevents the SYSTEM tablespace from being used for temporary space. After database creation, a default temporary tablespace can be set by creating a temporary tablespace and then altering the database.

When the default temporary tablespace is changed, all users assigned the default temporary tablespace are reassigned to the new default. Restrictions on Default Temporary Tablespace Dropping a Default Temporary Tablespace You cannot drop the default temporary tablespace until after a new default is made available.

The old default temporary tablespace is then dropped only after a new default temporary tablespace is made available. Users assigned to the old default temporary tablespace are automatically reassigned to the new default temporary tablespace. Taking Default Temporary Tablespace Offline Tablespaces are taken offline to make that part of the database unavailable to other users for example, an offline backup, maintenance, or making a change to an application that uses the tablespace.

Becuase none of these situations apply to a temporary tablespace, you cannot take a default temporary tablespace offline.

Taking a Tablespace Offline A tablespace is normally online so that the data contained within it is available to database users.

Users trying to access objects in a tablespace that is offline receive an error. When a tablespace goes offline or comes back online, the event is recorded in the data dictionary and in the control file.

If a tablespace is offline when you shut down a database, the tablespace remains offline and is not checked when the database is subsequently mounted and reopened. The different error situations are covered in more detail in the course Oracle9i: Equivalent of Backup and Recovery Workshop. Taking Tablespaces Offline Whenever the database is open, a database administrator can take any tablespace, except the SYSTEM tablespace or any tablespace with active undo segments or temporary segments, offline.

When a tablespace is taken offline, the Oracle server takes all the associated data files offline. You need not perform media recovery on this tablespace before bringing it back online. Any offline files may require media recovery. You must perform media recovery on the tablespace before bringing it back online.

Select the tablespace. In the Status region of the General tab, select Offline. Select the Mode from the drop-down menu. Read-only tablespaces eliminate the need to perform backups of large, static portions of a database. Use an operating system command to move the data files of the tablespace to the read- only device. In this transitional state, no further write operations can take place in the tablespace except for the rollback of existing transactions that previously modified blocks in the tablespace.

This is possible because the DROP command updates only the data dictionary, but not the physical files that make up the tablespace. For locally managed tablespaces, the dropped segment is changed to a temporary segment, to prevent the bitmap from being updated. To make a read-only tablespace writable, all of the data files in the tablespace must be online. Making tablespaces read-only causes a checkpoint on the data files of the tablespace.

Select the Read Only check box in the Status region of the General tab. This option may generate a lot of undo when the tablespace contains many objects.

Expand the Tablespaces folder, and select the tablespace. Click Yes in the dialog box to confirm. Expand the Storage folder 5. Expand the Datafiles folder. Select the data file. Set the values for the increment and the maximum size. RESIZE integer[K M] where: integer is the absolute size, in bytes, of the resulting data file If there are database objects stored above the specified size, then the data file size is decreased only to the last block of the last objects in the data file.

Right click the tablespace, and select Add Datafile. In the General tab of the property sheet, enter the file information. TO 'filename'[, 'filename'] Use the following process to rename a data file: 1. Take the tablespace offline. Use an operating system command to move or copy the files. Bring the tablespace online. Use an operating system command to delete the file if necessary. The source filenames must match the names stored in the control file. Use the following process to rename files in tablespaces that cannot be taken offline: 1.

Shut down the database. Use an operating system command to move the files. Mount the database. Open the database. Expand the Tablespaces folder 4. In the General tab of the property sheet, update the file information. All data files are created in the specified file system location. Optionally a file size may be specified. DO NOT make the tablespace read only at this time. Display the information from the data dictionary. Verify the result. Attempt to create an additional table. Drop the first created table.

What happens and why? Verify it. Do not specify a file location. Verify the creation of the data file. Database Architecture The previous lesson discussed the storage structure of a database, its tablespaces, and its data files. This lesson continues the discussion of database storage by examining segments, extents, and data blocks. Types of Segments Segments are space-occupying objects in a database. They use space in the data files of a database. This section describes the different types of segments.

Table A table is the most common means of storing data within a database. A table segment stores that data for a table that is neither clustered nor partitioned. Data within a table segment is stored in no particular order, and the database administrator has very little control over the location of rows within the blocks in a table.

All the data in a table segment must be stored in one tablespace. Table Partition Scalability and availability are major concerns when there is a table in a database with high concurrent usage. In such cases, data within a table may be stored in several partitions, each of which resides in a different tablespace.

The Oracle server currently supports partitioning by a range of key values or by a hashing algorithm. If a table is partitioned, each partition is a segment, and storage parameters can be specified to control them independently. Use of this type of segment requires the Partitioning option within the Oracle9i Enterprise Edition. Rows in a cluster are stored based on key column values. A cluster may contain one or more tables. Tables in a cluster belong to the same segment and share the same storage characteristics.

The rows in a clustered table can be accessed with an index or hashing algorithm. Index All the entries for a particular index are stored within one index segment. If a table has three indexes, three index segments are used. The purpose of this segment is to look up the location of rows in a table based on a specified key. Types of Segments Index-Organized Table In an index-organized table, data is stored within the index based on the key value.

An index- organized table does not need a table lookup, because all the data can be retrieved directly from the index tree. Index Partition An index can be partitioned and spread across several tablespaces. In this case, each partition in the index corresponds to a segment and cannot span multiple tablespaces. Use of this type of segment requires the Partitioning option within the Oracle8i Enterprise Edition. Undo Segment An undo segment is used by a transaction that is making changes to a database.

Before changing the data or index blocks, the old value is stored in the undo segment. This allows a user to undo changes made. When a sort needs more space than the space available in memory, intermediate results are written to the disk. Temporary segments are used to store these intermediate results. If the column is large, the Oracle server stores these values in separate segments known as LOB segments. The table contains only a locator or a pointer to the location of the corresponding LOB data.

Nested Table A column in a table may be made up of a user-defined table as in the case of items within an order. In such cases, the inner table, which is known as a nested table, is stored as a separate segment. Bootstrap Segment A bootstrap segment, also known as a cache segment, is created by the sql. This segment helps to initialize the data dictionary cache when the database is opened by an instance.

The bootstrap segment cannot be queried or updated and does not require any maintenance by the database administrator. Storage Parameters A storage clause can be specified at the segment level to control how extents are allocated to a segment. These parameters need to be specified at the segment level only. Extents When a tablespace is created, the data files in the tablespace contain a header, which is the first block or blocks in the file.

As segments are created, they are allocated space from the free extents in a tablespace. Contiguous space used by a segment is referred to as a used extent. When segments release space, the extents that are released are added to the pool of free extents available in the tablespace. Block headers grow from the top down. The free space in a block is contiguous initially. However, deletions and updates may fragment the free space in the block.

The free space in the block is coalesced by the Oracle server when necessary. Block Space Utilization Parameters Block space utilization parameters can be used to control the use of space in data and index segments. The transaction slots are used to store information about transactions that are making changes to the block at a point in time.

A transaction uses only one transaction slot, even if it is changing more than one row or index entry. If necessary, additional transaction slots can be allocated from the free space in the block to permit more concurrent transactions to modify rows in the block.

MAXTRANS, which has a default value of , sets the limit for the number of concurrent transactions that can make changes to a data or an index block. When set, this value restricts use of space for transaction slots and therefore guarantees that there is sufficient space in the block for use by row or index data. PCTUSED for a data segment represents the minimum percentage of used space that the Oracle server tries to maintain for each data block of the table.

The free list of a segment is a list of blocks that are candidates for accommodating future inserts. A segment, by default, is created with one free list. Better Space Utilization All objects and especially objects with greatly varying row sizes utilize space more efficiently. Better Concurrency Handling Run-time adjustments to variations in concurrent access are improved.

Manual Data Block Management With manual database block management you can configure how block space is used and when a block is available.

Previously this was the only method available for managing data blocks. For example, a column that was originally NULL is updated to be assigned a value. As rows are inserted into the block, the utilization of the block increases and the cycle repeats starting with step 1. Querying the Data Dictionary The relationships between tablespaces, data files, segments, and free and used extents can be viewed by querying the data dictionary.

Ignore the bootstrap segment. This query is useful in identifying any segments that are likely to generate errors during future data load. The query should display the number of fragments, the total free space, and the largest free extent in each tablespace.

Manual Undo Management You manually manage the creation, allocation, and tuning of undo segments. The only method available prior to Oracle9i. Undo Segment An undo segment is used to save the old value undo data when a process changes data in a database.

It stores the location of the data and the data as it existed before being modified. The header of an undo segment contains a transaction table where information about the current transactions using the undo segment is stored.

A serial transaction uses only one undo segment to store all of its undo data. Many concurrent transactions can write to one undo segment. Undo Segment Transaction Rollback When a transaction modifies a row in a table, the old image of the modified columns undo data is saved in the undo segment.

If the transaction is rolled back, the Oracle server restores the original values by writing the values in the undo segment back to the row. Transaction Recovery If the instance fails while transactions are in progress, the Oracle server needs to undo any uncommitted changes when the database is opened again. This rollback is part of transaction recovery. Recovery is possible only because changes made to the undo segment are also protected by the redo log files.

Read Consistency While transactions are in progress, other users in the database should not see any uncommitted changes made by these transactions. In addition, a statement should not see any changes that were committed after the statement begins execution. The old values undo data in the undo segments are also used to provide the readers a consistent image for a given statement.

Read Consistency The Oracle server guarantees that a statement sees data from a consistent time, even if that data is modified by other transactions. Consider the case where a long-running query is executed at a time when several changes are being made. If a row has changes that were not committed at the start of the query, the Oracle server constructs a read-consistent image of the row by retrieving the before image of the changes from the undo segment and applying the changes to a copy of the row in memory.

Private Private undo segments are segments that are brought online by an instance because they are listed in the parameter file.

Public undo segments are normally used with the Oracle Parallel Server to create a pool of undo segments that can be used by any of the Parallel Server instances. Note: The use of public undo segments is discussed in the Oracle9i Parallel Server Concepts and Administration manual. Deferred Undo Segments Deferred undo segments may be created when a tablespace is brought offline.

They are used to roll back transactions when the tablespace is brought back online. They are dropped automatically when they are no longer needed. In MANUAL mode, the default value, you can create and manage undo segments when needed within the database as in previous versions of the Oracle server. Select Create from the right mouse menu of the Tablespace folder 6. In the General tab of the property sheet, enter the file name and file size. In the Type region, select Undo. Expand the Instance folder 5.

Click on Configuration. Click Undo tab from the detail side of the Console 7. First create another UNDO tablespace if one does not already exist. When no rows return from the query, then all transactions are complete, and the tablespace can be dropped. Queries requiring information from tablespace UNDO1, after it is no longer available to provide a consistent read, receive the error: ORA snapshot too old.

Select the Tablespace folder. Setting this parameter enables users to use the undo tablespace feature before all application programs and scripts are converted to automatic undo management mode. Retaining undo data longer allows for longer queries and also requires larger data files for the UNDO tablespace.

The Oracle server uses an algorithm for allocating space within an UNDO tablespace and allocates unexpired space with no active transactions before causing a new transaction to fail. Each row in the view keeps statistics collected in the instance for a minute interval. You can use this view to estimate the amount of undo space required for the current workload. The database uses this view to tune undo usage in the system. This view is available in both auto mode and manual mode. Although the time interval is normally 10 minutes, the most recent row will return the time since its interval started, usually less than 10 minutes.

The third piece of the formula requires a query against the database. When DATE data types are subtracted, the result is in days. To convert days to seconds, you multiply by , the number of seconds in a day. The result of the query returns the number of undo blocks per second. The result for this database is For best results, the calculation should be made during the time of day when the database has its heaviest workload.

Undo Quota Using resource plans, users can be grouped and limits placed on the amount of resources that can be used by the group. When a group exceeds its limit an error is received and no new transactions can be performed for the group until current transactions complete or abort. Action: Ask DBA to increase undo quota, or wait until other transactions commit before proceeding. The dynamic performance views show only undo segments that are online. List the rollback segments in tablespace UNDO2.

Do not commit, roll back, or exit the session. What happened? Compare this list to the list in step 1. Note: There still may be a delay before the tablespace is drop. This is the default table and is the main focus of discussion in this lesson. A database administrator has very limited control over the distribution of rows in an unclustered table.

Rows can be stored in any order depending on the activity on the table. Index-Organized Table An index-organized table is like a heap table with a primary key index on one or more of its columns.

However, instead of maintaining two separate storage spaces for the table and a B- tree index, an index-organized table maintains a single B-tree containing the primary key of the table and other column values. Index-organized tables provide fast key-based access to table data for queries involving exact matches and range searches. Also, storage requirements are reduced because key columns are not duplicated in the table and index.

The remaining non-key columns are stored in the index unless the index entry becomes very large; in that case, the Oracle server provides an OVERFLOW clause to handle the problem. A cluster is made up of a table or group of tables that share the same data blocks, which are grouped together because they share common columns and are often used together.

Data in a clustered table can be manipulated as though it were stored in a regular table. The tables in a cluster can have a primary key, which may be the cluster key or a different set of columns. Random access to clustered data may be faster, but full table scans on clustered tables are generally slower. Oracle Built-in Data Types The Oracle server provides several built-in data types to store scalar data, collections, and relationships.

Scalar Data Types Character Data Character data can be stored as either fixed-length or variable-length strings in the database.

NCHAR is a Globalization Support data type that enables the storage of either fixed- width or variable-width character sets. The maximum size is determined by the number of bytes required to store one character, with an upper limit of 2, bytes per row. The default is 1 character or 1 byte, depending on the character set. Variable-length character data types use only the number of bytes needed to store the actual column value, and can vary in size for each row, up to 4, bytes.

They can store up to 38 significant digits. Numeric data types require: — One byte for the exponent — One byte for every two significant digits in the mantissa — One byte for negative numbers if the number of significant digits is less than 38 bytes DATE Data Type The Oracle server stores dates in fixed-length fields of seven bytes.

The Oracle server does not perform character set conversion when RAW data is transmitted across machines in a network or if RAW data is moved from one database to another using Oracle utilities.

The number of bytes needed to store the actual column value, and can vary in size for each row, up to 2, bytes. These data types are superseded by the LOB data types. In addition, LOBs allow data to be stored in a separate segment and tablespace, or in a host file. LONGs are primarily stored as chained row pieces, with a row piece in one block pointing to the next row piece stored in another block. Therefore, they need to be accessed sequentially. In contrast, LOBs support random piece-wise access to the data through a file-like interface.

With release 8. It supports rowids of foreign tables non-Oracle tables and can store all kinds of rowids. Prior to Oracle8i, the Objects option was needed to define and use collections. A brief discussion of these types follows. Nested Tables Nested tables provide a means of defining a table as a column within a table. They can be used to store sets that may have a large number of records such as number of items in an order. The use of these types requires the Objects option.

Oracle User-Defined Data Types The Oracle server allows a user to define abstract data types and use them within the application. Internally, the data object number needs 32 bits, the relative file number needs 10 bits, block number needs 22 bits, and the row number needs 16 bits, adding up to a total of 80 bits or 10 bytes. An extended ROWID is displayed using a base encoding scheme, which uses six positions for the data object number, three positions for the relative file number, six positions for the block number, and three positions for the row number.

This format was acceptable in Oracle7 or an earlier release because the file numbers were unique within a database. Thus, earlier releases did not permit more than 1, data files. Now it is the limit for a tablespace. Even though Oracle8 removed this restriction by using tablespace-relative file numbers, the restricted ROWID is still used in objects like nonpartitioned indexes on nonpartitioned tables where all the index entries refer to rows within the same segment. Locating a Row Using ROWID Because a segment can only reside in one tablespace, using the data object number, the Oracle server can determine the tablespace that contains a row.

The relative file number within the tablespace is used to locate the file, the block number is used to locate the block containing the row, and the row number is used to locate the row directory entry for the row. The row directory entry can be used to locate the beginning of the row. Structure of a Row Row data is stored in database blocks as variable-length records.

And as the title says, this is not a tutorial or a how-to book. It is a reference book of many of the important topics that an Oracle professional will need to know in order to work effectively with 12c The chapters cover the material you would think they would cover. I would like to see the RAC section be larger. Keep the book at home, but keep the electronic copy of the book on an include CD with you everywhere. Although the old database architecture is still available for use, Oracle recommends new 12c databases utilize the single or multitenant pluggable database configuration.

On the other hand, the book does holds good content as a quick reference guide and overview on many different aspects of Oracle databases. Perhaps for new DBAs, this book would be a welcome asset for those who like a quick dictionary type look up of any and all things Oracle on their bookshelf.

However, for a more seasoned DBA it doesn't contain the depth I expected strictly based on the titile and subtitile. Posting Komentar. Kamis, 25 Februari [I Most helpful customer reviews 7 of 7 people found the following review helpful.

See all 16 customer reviews This reference architecture document is for …. Application for a Social Security Card. Baptismal Certificate. Le genou de Lucy. Odile Jacob. Coppens Y. Eds Odile Jacob. Costentin J. Editions Odile Jacob. The driving force : food in human evolution and the future.

Crawford M. Oracle database background and as a reference to help build Oracle-comparable functionality in Amazon Aurora with PostgreSQL compatibility. This document does not yet cover all Oracle Database features and capabilities from a migration perspective.

For the first release, we focus on som. Oracle Multitenant is a new option starting with Oracle Database 12c Enterprise Edition that helps customers reduce IT costs by simplifying.



0コメント

  • 1000 / 1000