Bo's Oracle Station

查看: 1759|回复: 0

课程第45次:2016-07-08星期五

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-7-9 11:10:22 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2016-7-9 11:15 编辑

【上完1Z0-051的第11章,上完1Z0-051】其他Oracle Schema对象
【开始1Z0-052的第7章】表空间
【上完1Z0-051】:共12章0 1 2 3 4 5 6 7 8 9 10 11
【1Z0-052】:共13章(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
【1Z0-053】:共15章(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
表示已经上过的,表示还没上的。
完全按照上课顺序:
https://www.botangdb.com/mytrain/201601/00000028.html

1Z0-051.txt:

  1. select  * from user_sequences ;

  2. select  * from dba_Tables t where t.table_name   ='SEQ$‘;

  3. select  * from seq$;

  4. select  * from dba_objects o where o.object_id=80574;

  5. select  * from dba_indexes i where i.blevel>1;

  6. ----
  7. select  * from user_indexes;

  8. alter index DEPT_ID_PK rebuild online;

  9. ---

  10. select  * from user_synonyms;
复制代码


tablespace.sql:

  1. create tablespace tbs05207_m datafile size 5M
  2. segment space management manual;


  3. create tablespace tbs05207_a datafile size 5M
  4. segment space management auto;

  5. select  * from dba_tablespaces t where t.tablespace_name like 'TBS05207_%';

  6. select  * from dba_Tables t where t.owner='HR' and t.table_name  like 'T05207%';

  7. select  i.pct_free, i.ini_trans  
  8.    from dba_indexes i where i.owner='HR' and i.index_name='I05207_A3';


  9. create  bigfile  tablespace tbs05207_big datafile size 5M autoextend on
  10.    maxsize 4T ;
  11.    
  12.   select  * from dba_tablespaces t where t.tablespace_name
  13.     in ( 'USERS','TBS05207_UNIFORM'  , 'TEMP');
  14.   
  15.   
  16.   select  * from dba_extents e where e.owner='HR'
  17.      and e.segment_name='T04209_UNAME';
  18.      
  19.      ----
  20.      
  21.      create  temporary  tablespace temp2 tempfile size 5M
  22.        ;
  23.      create tablespace tbs05207_uniform datafile size 5M
  24.         uniform size  512K;
  25.         
  26.         
  27.         ----
  28.           select  * from dba_tablespaces t where t.tablespace_name
  29.     in ( 'USERS','TBS05207_UNIFORM'  , 'TEMP'  , 'TEMP2');
  30.         ---
  31.    
  32.   select   
  33.     ( (select  sum(bytes)
  34.           from dba_data_files df where df.tablespace_name='USERS')-
  35.          
  36.           (select  sum(bytes)
  37.          from dba_free_space fs where fs.tablespace_name='USERS')
  38.                 )
  39.    
  40.       / ( select  sum(bytes)
  41.           from dba_data_files df where df.tablespace_name='USERS')
  42.        from dual;
  43.       
  44.        select  sum(bytes)
  45.          from dba_free_space fs where fs.tablespace_name='USERS';
  46.          
  47.          alter database datafile 4 resize 20M ;
  48.          
  49.          
  50.          ----------------
  51.         select  t.BYTES_USED
  52.           from v_$temp_extent_pool  t;
  53.          
  54.          
  55.          
  56.          select  sum(bytes)
  57.            from dba_temp_files where tablespace_name='TEMP'   ;
  58.          
  59.          
  60.        select  sum(bytes)/1024/1024
  61.           from dba_data_files df where df.tablespace_name='UNDOTBS1';

  62.          
  63.       
  64.        select sum(ue.bytes)/1024/1024
  65.          from dba_undo_extents   ue
  66.           where ue.status  <> 'EXPIRED';
  67.          
  68.          
  69.          
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-3-29 18:25 , Processed in 0.033048 second(s), 24 queries .

快速回复 返回顶部 返回列表