RedHat搭建DHCP服务器
2014-08-20 17:20
239 查看
当需要释放数据库空间的时候,通常的方案会用有truncate、delete、drop/re-creating等处理。其中truncate 后会立即释放,并且不能回滚;但delete不能立即释放数据库空间,还会产生archive log。下面就简单介绍一下:
Truncate
如: Truncate table xxxx; 我们可以直接去查user_segments对应table的bytes就变小,数据库空间释放,并且不能回滚。用Truncate去删除记录比drop表再创建表效率更高。
Use the
Removing rows with the
Delete
Delete操作后,不能立即释放数据库空间,并且还会产生archive log(查看user_segments大小没有变化),需要做其他操作。如Oracle 10g, 11可以用下面操作来释放数据库空间。
alter table table_name shrink space cascade;
如果报ora-10636 row movement is not enabled,先执行下面语句:
alter table table_name enable row movement;
(由于是个人的一些理解,主要是总结一下,如有不对,欢迎指正)
Truncate
如: Truncate table xxxx; 我们可以直接去查user_segments对应table的bytes就变小,数据库空间释放,并且不能回滚。用Truncate去删除记录比drop表再创建表效率更高。
Use the
TRUNCATEstatement to remove all rows from a table or cluster. By default, Oracle Database also deallocates all space used by the removed rows except that specified by the
MINEXTENTSstorage parameter and sets the
NEXTstorage parameter to the size of the last extent removed from the segment by the truncation process.
Removing rows with the
TRUNCATEstatement can be more efficient than dropping and re-creating a table. Dropping and re-creating a table invalidates dependent objects of the table, requires you to regrant object privileges on the table, and requires you to re-create the indexes, integrity constraints, and triggers on the table and respecify its storage parameters. Truncating has none of these effects.
Delete
Delete操作后,不能立即释放数据库空间,并且还会产生archive log(查看user_segments大小没有变化),需要做其他操作。如Oracle 10g, 11可以用下面操作来释放数据库空间。
alter table table_name shrink space cascade;
如果报ora-10636 row movement is not enabled,先执行下面语句:
alter table table_name enable row movement;
(由于是个人的一些理解,主要是总结一下,如有不对,欢迎指正)
相关文章推荐
- RedHat5.9下搭建DHCP服务器
- Redhat 5 之搭建DHCP服务器
- 如何在redhat 4中搭建DHCP服务器
- DHCP服务器搭建
- 三层交换机的配置和DHCP服务器的搭建
- 搭建linux DHCP 服务器
- DHCP服务器的搭建及抓包分析DHCP的实现
- RedHat系统下SVN服务器的搭建过程详解
- 在Windows Server2003系统下搭建DHCP服务器
- 实操DHCP服务器-搭建DHCP
- 菜鸟学Linux之二:DHCP服务器中继代理的搭建和部署
- 解决在DHCP环境下私自指定IP和私自搭建DHCP服务器的方法
- 解决在DHCP环境下私自指定IP和私自搭建DHCP服务器的方法
- DHCP服务器的搭建
- 解决在DHCP环境下私自指定IP和私自搭建DHCP服务器的方法
- Windows下搭建DHCP服务器之定义用户类别
- 使用RedHat9.0配置DHCP服务器
- RedHat系统下SVN服务器的搭建过程详解
- DHCP服务器的搭建
- DHCP服务器的搭建