我的oracle9i学习笔记
2007-05-10 12:15:19 来源:WEB开发网/*将表空间设置成OMF状态*/
alter system set db_create_file_dest='$ORACLE_HOME/oradata';
create tablespace userdata;---use OMF status to create tablespace;
drop tablespace userdata;---user OMF status to drop tablespace;
select * from dba_tablespace/v$tablespace/dba_data_files;
/*将表的某分区移动到另一个表空间*/
alter table table_name move partition partition_name tablespace tablespace_name;
###### ORACLE storage structure and relationships #########
/*手工分配表空间段的分区(extend)大小*/
alter table kong.test12 allocate extent(size 1m datafile '$ORACLE_HOME/oradata/undo102.dbf');
alter table kong.test12 deallocate unused; ---释放表中没有用到的分区
show parameter db;
alter system set db_8k_cache_size=10m; ---配置8k块的内存空间块参数
select * from dba_extents/dba_segments/data_tablespace;
select * from dba_free_space/dba_data_file/data_tablespace;
/*数据对象所占用的字节数*/
select sum(bytes) from dba_extents where onwer='kong' and segment_name ='table_name';
############ UNDO Data ################
show parameter undo;
alter tablespace users offline normal;
alter tablespace users offline immediate;
recover datafile '$ORACLE_HOME/oradata/undo102.dbf';
alter tablespace users online ;
select * from dba_rollback_segs;
更多精彩
赞助商链接