Home > Database > Mysql Tutorial > body text

Oracle 11g 导库导不出空表问题

WBOY
Release: 2016-06-07 15:10:21
Original
949 people have browsed it

Oracle 11g 会遇到这样的问题,用exp整库导出的时候,会遇到这样的问题,库里的空表没办法导出select * from all_all_tables aa

Oracle 11g 会遇到这样的问题,用exp整库导出的时候,会遇到这样的问题,库里的空表没办法导出

select * from all_all_tables aa where aa.owner='User名大写' ---查看用户下所有表

select * from all_tables t where t.owner = 'User名大写' and t.num_rows = 0;--查看用户下所有空表

好了,下面是处理方法脚本:

在命令窗口运行:

set heading off;
set echo off;
set feedback off;
set termout on;
spool D:\allocate.sql;
Select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;
spool off;

运行完成后,把allocate.sql再在命令窗口执行一次,然后就可以用exp语句了,,这样空表就能被导出来了

本文永久更新链接地址

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template