Bo's Oracle Station

查看: 890|回复: 0

resumable space allocation

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-11-1 14:41:35 | 显示全部楼层 |阅读模式
HR:
  1. SQL> create table t062ad08_a ( a number ) storage ( initial 16M );      

  2. Table created.
复制代码
SYS:
  1. create or replace trigger trg1
  2. after suspend
  3. on database
  4. declare
  5.   v_size number;
  6.   v_file_name varchar2(100);
  7.   pragma AUTONOMOUS_TRANSACTION;
  8. begin
  9.   select  BYTES into v_size from dba_data_files where  tablespace_name='TBS1' ;
  10.   select  file_name into v_file_name from dba_data_files where  tablespace_name='TBS1' ;
  11.   execute immediate 'alter database datafile '||v_file_name||' resize '||to_char(v_size+10485760);
  12.   commit;
  13. end;
  14. /
复制代码




回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-30 03:11 , Processed in 0.037888 second(s), 24 queries .

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