Tablespace Management Enhancements in Oracle Database 10g
come from:
Tablespace Management Enhancements in Oracle Database 10g
Oracle 10g includes several small but neat enhancements related to tablespace management including:Default Permanent Tablespace
Oracle9i introduced the concept of a default temporary tablespace to prevent people accidentally using the SYSTEM tablespace for temporary segments. Oracle 10g takes this further by including a default permanent tablespace to prevent users having their default tablespace set to SYSTEM. The DEFAULT TABLESPACE clause in the CREATE DATABASE statement allows the the default tablespace to be created and named. If this parameter is not set during creation, or needs to be changed subsequently, it can be set using the following command.The current settings for the default tablespaces can be viewed using the following query.ALTER DATABASE DEFAULT TABLESPACE users;
COLUMN property_name FORMAT A30
COLUMN property_value FORMAT A30
COLUMN description FORMAT A50
SET LINESIZE 200
SELECT *
FROM database_properties
WHERE property_name like '%TABLESPACE';
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------------ ------------------------------ --------------------------------------
DEFAULT_TEMP_TABLESPACE TEMP Name of default temporary tablespace
DEFAULT_PERMANENT_TABLESPACE USERS Name of default permanent tablespace
Rename Tablespace
Renaming permanent and temporary tablespaces is now allowed in Oracle 10g (except for SYSTEM and SYSAUX) using the following command.The tablespace and all it's datafiles must be online and the database must have a COMPATIBLE setting of 10.0.0 or greater.ALTER TABLESPACE ts_current_name RENAME TO ts_new_name;
If the tablespace is read-only the datafile headers are not altered to reflect the name change and a message is written to the alert log to notify you of this fact. The impact on recovery is that the tablespace will be recovered to it's old name if the controlfile is recreated and datafiles containing the old headers are used.
If an undo tablespace is renamed in a instance which uses a pfile, rather than an spfile, a message is written to the alert log reminding you to change the value of the UNDO_TABLESPACE parameter.
SYSAUX Tablespace
The SYSAUX tablespace provides a single location for all non-essential database metadata. In the past the schema objects to support many database features were located in the SYSTEM tablespace. These have now been moved to the SYSAUX tablespace. As a result the SYSTEM tablespace is less cluttered and suffers less contention. In addition, the total number of tablespaces to support database features has been reduced.The registered occupants of the SYSAUX tablespace are listed in the V$SYSAUX_OCCUPANTS view. The view includes a MOVE_PROCEDURE column which specifies the procedure name which can be used to move the components for that occupant to another tablespace. This is useful if the schema associated with one occupant grows to the point where it would benefit from it's own tablespace.
The components which take up the largest amount of space in the SYSAUX tablespace are typically the Automatic Workload Repository (AWR) and the Enterprise Manager (EM) repository. Other components, such as Oracle UltraSearch, Oracle Text and Oracle Streams, will have no significant impact on the total tablespace size unless they are used heavily.
Multiple Temporary Tablespaces
Tablespace groups allow users to use more than one tablespace to store temporary segments. The tablespace group is created implicitly when the first tablespace is assigned to it:The tablespaces assigned to a group can be viewed using:-- Create group by adding existing tablespace.
ALTER TABLESPACE temp TABLESPACE GROUP temp_ts_group;
-- Add a new tablespace to the group.
CREATE TEMPORARY TABLESPACE temp2
TEMPFILE '/u01/app/oracle/oradata/DB10G/temp201.dbf' SIZE 20M
TABLESPACE GROUP temp_ts_group;
Once the group is created it can be assigned just like a tablespace to a user or as the default temporary tablespace:SELECT * FROM dba_tablespace_groups;
GROUP_NAME TABLESPACE_NAME
------------------------------ ------------------------------
TEMP_TS_GROUP TEMP
TEMP_TS_GROUP TEMP2
2 rows selected.
A tablespace can be removed from a group using:-- Assign group as the temporary tablespace for a user.
ALTER USER scott TEMPORARY TABLESPACE temp_ts_group;
-- Assign group as the default temporary tablespace.
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp_ts_group;
There is no theoretical maximum limit to the number of tablespaces in a tablespace group, but it must contain at least one. The group is implicitly dropped when the last member is removed. The last member of a group cannot be removed if the group is still assigned as the default temporary tablespace. In this example the following must be done to remove the last member from the group.ALTER TABLESPACE temp2 TABLESPACE GROUP '';
SELECT * FROM dba_tablespace_groups;
GROUP_NAME TABLESPACE_NAME
------------------------------ ------------------------------
TEMP_TS_GROUP TEMP
1 row selected.
Tablespace groups share the same namespace as tablespaces so a group and tablespace cannot share the same name.-- Switch from the group to a specific tablespace.
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
-- Remove the tablespace from the group.
ALTER TABLESPACE temp TABLESPACE GROUP '';
-- Check the group has gone.
SELECT * FROM dba_tablespace_groups;
no rows selected
For further information see:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-668630/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQL*Plus Enhancements in Oracle Database 10g(一)SQLOracleDatabase
- Flashback New Features and Enhancements in Oracle Database 10gOracleDatabase
- Rename Tablespace in Oracle database 10gOracleDatabase
- Wait Event Enhancements in Oracle 10g(zt)AIOracle 10g
- Partitioning Enhancements in Oracle Database 11g Release 1OracleDatabase
- Oracle 19c Database Management ToolsOracleDatabase
- Resource Manager Enhancements in Oracle Database 11g (文件 ID 884082.1)OracleDatabase
- Oracle10g New Feature -- 8. Tablespace ManagementOracle
- oracle 10g flashback databaseOracle 10gDatabase
- Management on database linkDatabase
- Master Note: Overview of Oracle Tablespace Management (Doc ID 1493350.1)ASTViewOracle
- How to Create Oracle Database QoS Management Administrator AccountsOracleDatabase
- oracle 10g _create tablespace相關語法Oracle 10g
- Scheduler in Oracle Database 10g(轉)OracleDatabase
- Master Note: Troubleshooting Oracle Tablespace Management (文件 ID 1522807.1)ASTOracle
- Brief description of Oracle physical standby database configuration and managementOracleDatabase
- Oracle 10g新增DROP DATABASE命令Oracle 10gDatabase
- Install Identity management DatabaseIDEDatabase
- Oracle Database 10g Enhanced wait modelOracleDatabaseAI
- oracle 10g physical standby database creationOracle 10gDatabase
- Oracle 10g Limits - Logical Database LimitsOracle 10gMITDatabase
- 12C-How to Create Oracle Database QoS Management Administrator AccountsOracleDatabase
- Migrating Oracle10g Database to Automatic Storage management (ASM)OracleDatabaseASM
- oracle實驗記錄 (oracle 10G rman transport database)OracleDatabase
- How to Move or Copy a Tablespace to Another Database (61)Database
- Oracle Database 10g新特性-閃回表OracleDatabase
- DBMS_FILE_TRANSFER Package in Oracle Database 10gPackageOracleDatabase
- 【OCM】Oracle Database 10g: Performance Tuning(一)OracleDatabaseORM
- 【OCM】Oracle Database 10g: Performance Tuning(二)OracleDatabaseORM
- 【OCM】Oracle Database 10g: Performance Tuning(三)OracleDatabaseORM
- 【OCM】Oracle Database 10g: Performance Tuning(四)OracleDatabaseORM
- Oracle 10g FLASHBACK DATABASE 實驗記錄Oracle 10gDatabase
- alter database datafile offline and alter database tablespace ...offlineDatabase
- Tablespace Transporting (10G新特性)
- 10G新特性:BIGFILE TABLESPACE
- Oracle Database 10g新特性-回滾監視OracleDatabase
- 安裝oracle 10g EM database controlOracle 10gDatabase
- 《Oracle Database 10g安全性高效設計》OracleDatabase