一、使用imp/exp。先导出源库,再创建新库把表空间创建好,然后再导入。(据说这样可以,前提是新的库里面不能有与源库相同名字的表空间。有待验证!) 二、使用脚本进行修改。据目前所了解,正长情况下需要修改表的空间和表的索引的空间,如果涉及到BOLB字段的表,修改的方式又不一样了! 正常情况下的修改脚本: 1.修改表的空间 alter table TABLE_NAME move tablespace TABLESPACENAME 查询当前用户下的所有表 select 'alter table '|| table_name ||' move tablespace tablespacename;' from user_all_tables; 2.修改表的索引的空间 alter index INDEX_NAME rebuild tablespace TABLESPACENAME 查询当前用户下的所有索引 select 'alter index '|| index_name ||' rebuild tablespace tablespacename;' from user_indexes;
本文转自左正博客园博客,原文链接:http://www.cnblogs.com/soundcode/archive/2011/07/06/2099411.html,如需转载请自行联系原作者