_OUTPUT.put_line('Encryption : ' || DBMS_LOB.getoptions(l_clob, DBMS_LOB.opt_encrypt));
DBMS_OUTPUT.put_line('Deduplication: ' || DBMS_LOB.getoptions(l_clob,DBMS_LOB.opt_deduplicate));
ROLLBACK;
END;
/
这里返回:
Encryption : 2
Deduplication: 0
2.2.6.2 DBMS_SPACE package
DBMS_SPACE包的SPACE_USAGE过程可以查看LOBs 占用磁盘空间信息。 该过程只适用与ASSM 表空间。
SET SERVEROUTPUT ON
DECLARE
l_segment_size_blocks NUMBER;
l_segment_size_bytes NUMBER;
l_used_blocks NUMBER;
l_used_bytes NUMBER;
l_expired_blocks NUMBER;
l_expired_bytes NUMBER;
l_unexpired_blocks NUMBER;
l_unexpired_bytes NUMBER;
BEGIN
DBMS_SPACE.SPACE_USAGE(
segment_owner => 'TEST',
segment_name =>'SECUREFILE_LOB',
segment_type => 'LOB',
segment_size_blocks =>l_segment_size_blocks,
segment_size_bytes =>l_segment_size_bytes,
used_blocks =>l_used_blocks,
used_bytes =>l_used_bytes,
expired_blocks =>l_expired_blocks,
expired_bytes =>l_expired_bytes,
unexpired_blocks =>l_unexpired_blocks,
unexpired_bytes =>l_unexpired_bytes);
DBMS_OUTPUT.put_line('segment_size_blocks:' || l_segment_size_blocks);
DBMS_OUTPUT.put_line('segment_size_bytes :' || l_segment_size_bytes);
DBMS_OUTPUT.put_line('used_blocks :' || l_used_blocks);
DBMS_OUTPUT.put_line('used_bytes :' || l_used_bytes);
DBMS_OUTPUT.put_line('expired_blocks :' || l_expired_blocks);
DBMS_OUTPUT.put_line('expired_bytes :' || l_expired_bytes);
DBMS_OUTPUT.put_line('unexpired_blocks :' || l_unexpired_blocks);
DBMS_OUTPUT.put_line('unexpired_bytes :' || l_unexpired_bytes);
END;
/
这个和我们的show_space 脚本是一样的。
OracleShow_space 过程 使用示例 与 注释
http://blog.csdn.net/tianlesoftware/article/details/8151129
2.2.7 Migrating to SecureFiles 从BasicFile迁移到SecureFiles
将列从BasicFile LOB迁移到SecureFilesLOB,可以使用如下方法:
(1) CREATE TABLE ... AS SELECT ...
(2) INSERT INTO ... SELECT ...
(3) Online tableredefintion.
(4) Export/Import
(5) Create a new column, update the new column with the values in theoriginal column, then drop the old column.
(6) Create a new column, update the new column with the values in theoriginal column, rename the table and create a view with the original name thatonly references the new column.
除了export/import 的方法,其他的方法都需要考虑转换LOB需要的磁盘空间问题。
Oracle 的Streams 不支持SecureFIles,所以不能使用Streams来迁移LOBs。
在1.10 小节里,也说明,在不考虑空间的情况下,推荐使用表的在线重定义来进行操作。对于在线重定义,我们在表转分区表的时候也用过。 参考如下连接的2.3 小节:使用在线重定义:DBMS_REDEFINITION。
Oracle分区表 总结