Prev | Current Page 152 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"


SQL> alter tablespace temp2 tablespace group tempgrp;
Tablespace altered.
SQL> alter tablespace temp3 tablespace group tempgrp;
Tablespace altered.
Changing the database??™s default temporary tablespace to TEMPGRP uses the same command
as assigning an actual temporary tablespace as the default; temporary tablespace groups are
treated logically the same as a temporary tablespace:
SQL> alter database default temporary tablespace tempgrp;
Database altered.
To drop a tablespace group, we must first drop all its members. Dropping a member of a
tablespace group is accomplished by assigning the temporary tablespace to a group with an
empty string (in other words, removing the tablespace from the group):
SQL> alter tablespace temp3 tablespace group '';
Tablespace altered.
As you might expect, assigning a temporary tablespace group to a user is identical to
assigning a temporary tablespace to a user; this assignment can happen either when the user is
created or at some point in the future. In the following example, the new user JENWEB is assigned
the temporary tablespace TEMPGRP:
SQL> create user jenweb identified by pi4001
2 default tablespace users
3 temporary tablespace tempgrp;
User created.
Note that if we did not assign the tablespace during user creation, the user JENWEB would
still be assigned TEMPGRP as the temporary tablespace because it is the database default from
our previous create database example.


Pages:
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
news news news news news