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,这种情况下需要重建索引、外键、触发器等对象。