5.1 Create a temporary tablespace group that contains two(2) temporary tablespaces to support batch processing, the creation of large indexes,and analyzing tables, Use the following specifications: 5.1.1 Temporary tablespace group named TEMP_GRP containing temporary tablespaces TEMP1 and TEMP2. 5.1.2 Make TEMP_GRP the default temporary tablespace for all new users.
5.1 Create a temporary tablespace group that contains two(2) temporary tablespaces to support batch processing, the creation of large indexes,and analyzing tables, Use the following specifications: 5.1.1 Temporary tablespace group named TEMP_GRP containing temporary tablespaces TEMP1 and TEMP2. 5.1.2 Make TEMP_GRP the default temporary tablespace for all new users. 5.1创建临时表空间组,包含2个临时表空间来支持批处理,大的索引创建,表的分析,按照以下的说明来创建: 5.1.1 临时表空间组的名称叫TEMP_GRP,包含TEMP1,TEMP2这两个临时表空间。 5.1.2 让TEMP_GRP作为新用户的默认临时表空间。
参考联机文档: Administrator's Guide ==> Managing Tablespaces==>Creating a Locally Managed Temporary Tablespace http://docs.oracle.com/cd/B19306_01/server.102/b14231/tspaces.htm#i1013552
参照:
Changing Members of a Tablespace Group
You can add a tablespace to an existing tablespace group by specifying the existing group name in the TABLESPACE GROUP clause of the CREATE TEMPORARY TABLESPACE or ALTER TABLESPACE statement.
The following statement adds a tablespace to an existing group. It creates and adds tablespace lmtemp3 to group1, so that group1 contains tablespaces lmtemp2and lmtemp3.
CREATE TEMPORARY TABLESPACE lmtemp3 TEMPFILE '/u02/oracle/data/lmtemp301.dbf' SIZE 25M TABLESPACE GROUP group1;The following statement also adds a tablespace to an existing group, but in this case because tablespace lmtemp2 already belongs to group1, it is in effect moved from group1 to group2:
ALTER TABLESPACE lmtemp2 TABLESPACE GROUP group2;Now group2 contains both lmtemp and lmtemp2, while group1 consists of only tmtemp3.
You can remove a tablespace from a group as shown in the following statement:
ALTER TABLESPACE lmtemp3 TABLESPACE GROUP '';Tablespace lmtemp3 no longer belongs to any group. Further, since there are no longer any members of group1, this results in the implicit deletion of group1.
Assigning a Tablespace Group as the Default Temporary Tablespace
Use the ALTER DATABASE...DEFAULT TEMPORARY TABLESPACE statement to assign a tablespace group as the default temporary tablespace for the database. For example:
ALTER DATABASE sample DEFAULT TEMPORARY TABLESPACE group2;首先添加两个临时表空间TMEP1和TEMP2到临时表空间组TEMP_GRP组 然后再让临时表空间组TEMP_GRP更改为默认的临时表空间
操作如下:
SQL> select * from DATABASE_PROPERTIES;
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION ------------------------------ -------------------------------------------------- -------------------------------------------------- DICT.BASE 2 dictionary base tables version # DEFAULT_TEMP_TABLESPACE TEMPTS1 Name of default temporary tablespace DEFAULT_PERMANENT_TABLESPACE SYSTEM Name of default permanent tablespace DBTIMEZONE +08:00 DB time zone DEFAULT_TBS_TYPE SMALLFILE Default tablespace type NLS_LANGUAGE AMERICAN Language NLS_TERRITORY AMERICA Territory NLS_CURRENCY $ Local currency NLS_ISO_CURRENCY AMERICA ISO currency NLS_NUMERIC_CHARACTERS ., Numeric characters NLS_CHARACTERSET AL32UTF8 Character set
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION -