我的oracle9i学习笔记
2007-05-10 12:15:19 来源:WEB开发网/*undo tablespace(不能被用在字典管理模下) */
create undo tablespace undo1 datafile '$ORACLE_HOME/oradata/undo101.dbf' size 40M extent management local;
show parameter undo;
/*temporary tablespace*/
create temporary tablespace userdata tempfile '$ORACLE_HOME/oradata/undo101.dbf' size 10m extent management local;
*设置数据库缺省的临时表空间*/
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';
drop tablespace userdata including contents and datafiles;---drop 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;
更多精彩
赞助商链接