1、oracle11g数据导出
–创建逻辑目录
create or replace directory expdp as 'D:\dmp';
–授权
grant read,write on directory expdp to system;
–查询
select * from dba_directories;
–导出
expdp system/oracle DIRECTORY=expdp dumpfile=orclfull.dmp
logfile=orcl.log full=y
–删除
drop directory expdp;
--统计表空间文件大小
select 'CREATE TABLESPACE ' || b.NAME || chr(39)||'LOGGING'||
' DATAFILE ' || chr(39) || a.NAME || chr(39) || ' SIZE ' ||
a.BYTES/1024/1024 || 'M'||chr(39) ||'AUTOEXTEND ON NEXT 5M MAXSIZE
16000M ;'
from v$datafile a, v$tablespace b
where a.ts# = b.TS# And
b.INCLUDED_IN_DATABASE_BACKUP = 'YES'
Union All
select 'CREATE TEMPORARY TABLESPACE' || b.NAME || ' TEMPFILE '
|| chr(39) ||