|
我们已经无法创建:Failed to commit: ORA-12913: Cannot create dictionary managed tablespace。因为 system表空间已经是本地管理的。
我们无法创建:Failed to commit: ORA-03206: maximum file size of (536870912) blocks in AUTOEXTEND clause is out of range。因为没写bigfile。
- create tablespace tbs1 datafile size 20M
- extent management dictionary;
-
- select * from dba_extents e
- where e.owner='HR' and e.segment_name='T04209_UNAME';
-
- select * from dba_tablespaces;
-
- truncate table hr.t_big;
-
- select segment_name, bytes/1024/1024
- from dba_segments s where s.tablespace_name='USERS'
- order by bytes desc;
-
-
- select sum(bytes)/1024/1024
- from dba_segments s where s.tablespace_name='USERS'
- ;
-
- alter database datafile '+data/orcl/datafile/users.259.816169553' resize 500M ;
- alter tablespace users online;
- select * from dba_tablespaces;
-
- select * from dba_extents e
- where e.owner='HR' and e.segment_name='T04209_UNAME';
-
- ----
-
- select * from dba_extents e where e.owner='HR' and e.segment_name='T04209_UNAME';
-
- select * from dba_segments s where s.owner='HR' and s.segment_name='T04209_UNAME';
-
-
- create table hr.t05207_a ( a number )
- storage ( initial 512K next 512K ) pctfree 20 pctused 50
- initrans 2 ;
-
- create table hr.t05207_b ( a number ) ;
-
- create tablespace tbs2 datafile '/u01/app/oracle/oradata/orcl/tbs2.dbf'
- size 5M segment space management manual;
-
- create table hr.t05207_c ( a number) tablespace tbs2;
-
- select * from dba_tables t where
- t.table_name like 'T05207%';
-
- create index hr.i05207_a on hr.t05207_a ( a ) pctfree 20 initrans 4;
-
- select * from dba_indexes i where
- i.table_name like 'T05207%';
-
- select * from dba_extents e where e.owner='HR' and e.segment_name='T04209_UNAME';
复制代码- select f.tablespace_name , sum(f.bytes)/1024/1024
- from dba_data_files f
- where f.tablespace_name in ('SYSTEM', 'EXAMPLE','UNDOTBS1')
- group by f.tablespace_name;
-
-
- select f.tablespace_name , sum(f.bytes)/1024/1024
- from dba_temp_files f
- group by f.tablespace_name;
-
-
- select f.tablespace_name , sum(f.bytes)/1024/1024
- from dba_free_space f
- where f.tablespace_name in ('SYSTEM', 'EXAMPLE','UNDOTBS1','TEMP')
- group by f.tablespace_name;
-
- select sum(e.bytes)/1024/1024
- from dba_undo_extents e
- where e.tablespace_name='UNDOTBS1' and e.status <> 'EXPIRED';
-
- select sum(p.BYTES_CACHED)/1024/1024, sum(p.BYTES_USED)/1024/1024
- from v_$temp_extent_pool p
- where p.TABLESPACE_NAME='TEMP';
复制代码- grant connect to user1 identified by oracle_4U;
- grant create session to user2 identified by oracle_4U;
- create user user3 identified by oracle_4U ;
- grant create session to user3;
- grant create table to user3;
- alter user user3 quota 1M on users;
- select * from dba_ts_quotas;
- alter user user3 quota 0 on users;
复制代码
|
|