Bo's Oracle Station

查看: 2235|回复: 0

(52-37)第56次,2015-03-18星期五

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-3-19 11:39:08 | 显示全部楼层 |阅读模式
(52-37)上完1Z0-053第18章:
  1. select  s.bytes/1024/1024
  2. from dba_segments s
  3. where s.owner='HR' and s.segment_name='T04209_UNAME' ;

  4. select  *
  5.   from dba_indexes i where
  6.   i.owner='HR' and i.table_name='IOT1';
  7.   
  8.   select  *
  9.    from dba_ind_columns  ic
  10.    where ic.index_owner='HR' and ic.index_name='IOT1_INDEX1';
  11.    
  12.    select  t.row_movement
  13.     from dba_tables t where t.owner='HR' and t.table_name='T04209_UNAME';
  14.    
  15.     select  * from dba_segments s where s.owner='HR'
  16.      and s.segment_name='TLOB1';
  17.      
  18.      select  * from dba_lobs l where l.owner='HR'
  19.        and  l.table_name='TLOB1';
  20.       
  21.        grant resumable to hr;
  22.       
  23.        drop tablespace tbs16K  including contents ;  
  24.       
  25.        create tablespace tbs0518_resum
  26.          datafile '/home/oracle/tbs0518_resum.dbf' size 5M autoextend off;
  27.          
  28.          select  * from dba_data_files f
  29.           where f.tablespace_name='TBS0518_RESUM';
  30.          
  31.          
  32.     create or replace trigger trg05318_limit
  33. after suspend
  34. on database
  35.   declare
  36.   v_size number;
  37.    pragma AUTONOMOUS_TRANSACTION;
  38. begin
  39.   select  BYTES into v_size from dba_data_files where FILE_ID=10;
  40.   execute immediate 'alter database datafile 10 resize '||to_char(v_size+5242880);
  41.   commit;
  42. end;  

  43. select  * from dba_triggers t
  44. where t.owner='SYS' and t.trigger_name='TRG05318_LIMIT';   
  45.          
复制代码



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-19 15:53 , Processed in 0.040427 second(s), 24 queries .

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