[Oracle]分享:我的oracle9i学习笔记(3)
文章作者 100test 发表时间 2007:03:14 13:54:56
来源 100Test.Com百考试题网
*设置数据库缺省的临时表空间*/
alter database default temporary tablespace tablespace_name.
/*系统/临时/在线的undo表空间不能被offline*/
alter tablespace tablespace_name offline/online.
alter tablespace tablespace_name read only.
/*重命名用户表空间*/
alter tablespace tablespace_name rename datafile $ORACLE_HOME/oradata/undo101.dbf to $ORACLE_HOME/oradata/undo102.dbf .
/*重命名系统表空间 ,但在重命名前必须将数据库shutdown,并重启到mount状态*/
alter database rename file $ORACLE_HOME/oradata/system01.dbf to $ORACLE_HOME/oradata/system02.dbf .
0drop tablespace userdata including contents and datafiles.---0drop tablespce
/*resize tablespace,autoextend datafile space*/
alter database datafile $ORACLE_HOME/oradata/undo102.dbf autoextend on next 10m maxsize 500M.
/*resize datafile*/
alter database datafile $ORACLE_HOME/oradata/undo102.dbf resize 50m.
/*给表空间扩展空间*/
alter tablespace userdata add datafile $ORACLE_HOME/oradata/undo102.dbf size 10m.
/*将表空间设置成OMF状态*/
alter system set db_create_file_dest= $ORACLE_HOME/oradata .
create tablespace userdata.---use OMF status to create tablespace.
0drop tablespace userdata.---user OMF status to 0drop tablespace.
0select * from dba_tablespace/v$tablespace/dba_data_files.
/*将表的某分区移动到另一个表空间*/
alter table table_name move partition partition_name tablespace tablespace_name.
###### ORACLE storage structure and relationships #########