delete client and reorg tablespaces

1. log into the client to delete  
2. go into SCC5 and delete client  
3. log into another client and delete entry with SCC4  
4. reorg database to recover database space.  

 

SAP删除Client可以使用Tcode:scc5 进行删除,使用SCC3查看log,但删除client后空间使用率并未降低,这并非一个错误,而是数据库的一个特性,数据库里面的数据删除后table已经占用的空间并不发生改变,但有新的数据存储进去的时候,这些空间会被reused。所以一般情况下我们不需要执行空间回收的动作。

 

收缩表空间的方法

收缩表空间的方法:
1、move表空间
   alter table tablename move tablespace tablespacename ;
   支持blob,clob对象的move。
   不支持long类型
   对long类型的处理,可以首先
   alter table test modify (photo clob);
   然后再alter table t_long move tablespace users;

2、EXP
   exp username/passwd@db file='' tables=
   之后删除表,然后再import
   imp username/passwd@db file='' tables=
   这种情况下需要重建外键、触发器等。索引可以在exp中指定导出。


3、表的盘区高水位以上的空间回收
   alter table test deallocate unused keep 0 ;

4、create table as select * from
   然后再truncate table,之后insert table select *
   或者drop table,然后再create table,这种情况下需要重建索引、外键、触发器等对象。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值