|
上完1Z0-052第7章 (52-36)
2015-08-17a.sql
- select * from dba_tablespaces t where t.tablespace_name like 'TBS05207%';
- create tablespace tbs05207_M datafile size 10M segment space management manual;
- create tablespace tbs05207_A datafile size 10M;
- select * from dba_tables t where t.table_name like 'T05207%';
- select i.index_name, i.pct_free from dba_indexes i where i.index_name like 'I05207%';
- select * from dba_segments s where s.owner='HR' and s.segment_name='T04209_UNAME';
- select * from dba_extents s where s.owner='HR' and s.segment_name='T04209_UNAME';
- CREATE SMALLFILE TABLESPACE tbs05207_d
- DATAFILE SIZE 10M AUTOEXTEND ON NEXT 4K MAXSIZE UNLIMITED
- DEFAULT STORAGE ( INITIAL 1024K NEXT 1024K PCTINCREASE 0);
-
-
- create tablespace tbs05207_u
- DATAFILE SIZE 10M AUTOEXTEND ON NEXT 4K MAXSIZE UNLIMITED
- uniform size 1024K;
- CREATE SMALLFILE TABLESPACE tbs05207_d2
- DATAFILE SIZE 10M AUTOEXTEND ON NEXT 4K MAXSIZE UNLIMITED
- DEFAULT STORAGE ( INITIAL 128K NEXT 128K PCTINCREASE 50);
-
- select * from dba_extents s where s.owner='HR' and s.segment_name='T05207_D3';
-
复制代码
2015-08-17b.sql
- select * from dba_tables t where t.owner='HR'
- and t.table_name='T04209_UNAME';
-
- select * from database_properties ;
-
- alter database default tablespace users;
-
- select sum(bytes)/1024/1024 from dba_segments s where s.tablespace_name='EXAMPLE';
-
- select ( (select sum(bytes) from dba_data_files d where d.tablespace_name='TEMP')-
- (select sum(bytes) from dba_free_space f where f.tablespace_name='TEMP'))/
- (select sum(bytes) from dba_data_files d where d.tablespace_name='TEMP')
- from dual;
-
- select
- ((select sum(bytes) from dba_temp_files t where t.tablespace_name='TEMP')-
- ( select sum( t.BYTES_CACHED +t.BYTES_USED) from v_$temp_extent_pool t))/
- (select sum(bytes) from dba_temp_files t where t.tablespace_name='TEMP')
- from dual
- ;
-
-
- select sum(e.bytes)/1024/1024 from dba_undo_extents e
- where e.tablespace_name='UNDOTBS1' and e.status <> 'EXPIRED'
- (select sum(bytes)/1024/1024 from dba_data_files d where d.tablespace_name='UNDOTBS1')
-
-
-
- create bigfile tablespace tbsbig datafile size 5M autoextend on maxsize 4T uniform size 512K;
-
- select * from dba_data_files where tablespace_name='TBSBIG';
-
- alter tablespace tbsbig add datafile size 5M ;
-
- alter database datafile '+DATA/orcl/datafile/tbsbig.272.888010091' resize 20M;
-
-
-
复制代码
|
|