Oracle9i中如何重建与切换临时表空间
Oracle9i引入了全局缺省临时表空间,缺省的如果不指定用户临时表空间,Oracle会为用户指定这个缺省临时表空间.
首先查询用户的缺省临时表空间:
|
[oracle@jumper oracle]$ sqlplus "/ as sysdba" SQL*Plus: Release 9.2.0.4.0 - Production on Wed Apr 12 11:11:43 2006 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> select username,temporary_tablespace from dba_users; USERNAME TEMPORARY_TABLESPACE 13 rows selected. SQL> select name from v$tempfile; NAME |
重建新的临时表空间并进行切换:
|
SQL> create temporary tablespace temp tempfile '/opt/oracle/oradata/conner/temp1.dbf' size 10M; Tablespace created. SQL> alter tablespace temp add tempfile '/opt/oracle/oradata/conner/temp2.dbf' size 20M; Tablespace altered. SQL> alter database default temporary tablespace temp; Database altered. SQL> select username,temporary_tablespace from dba_users; USERNAME TEMPORARY_TABLESPACE 13 rows selected. |
如果原临时表空间无用户使用,我们可以删除该表空间:
|
SQL> drop tablespace temp2; Tablespace dropped. SQL> NAME SQL> select file_name,tablespace_name,bytes/1024/1024 MB,autoextensible FILE_NAME TABLESPACE_NAME MB AUTOEXTENSIBLE |
- 2014-04-12 DTCC 2014 - 数据库技术大会五年
- 2009-04-12 三个字、两个字、一个字 - 盖小咪记事
- 2008-04-12 聆听意大利爵士音乐演奏会
- 2007-04-12 《深入浅出Oracle》与10g XE
- 2005-04-12 更新了一下留言板程序
如何 让v$tempseg_usage和v$sort_usage产生记录,为什么建立索引的时候 会产生记录呢?
使用到临时段(如发生排序操作等)才会在临时表空间分配相应的临时段空间啊。
eygle 老大 ,我的意思是 建立索引的时候 是如何 进行 排序 操作的?