1:导出语句
连接数据库应用 执行下列脚本
expdp PORTAL/PORTAL dumpfile=PORTAL20141023.dmp logfile=PORTAL.log schemas=PORTAL
2:查看dump 默认导出目录 用FTP提取
select * from all_directories;
2、Create 同义词
create or replace synonym SYN_EMERGENCY_INFO
3、表空间使用情况查看
SELECT D.TABLESPACE_NAME "表空间名字", D.STATUS "状态",
(A.BYTES / 1024 / 1024) as "总共多少M",
((A.BYTES - DECODE(F.BYTES, NULL, 0 , F.BYTES)) / 1024 / 1024) as "已经用了多少M",
(DECODE(F.BYTES, NULL, 0 , F.BYTES) / 1024 / 1024) as "剩余多少M",
((A.BYTES - DECODE(F.BYTES, NULL, 0 , F.BYTES)) / 1024 / 1024)/(A.BYTES / 1024 / 1024 ) as "利用率",
DECODE(sign (((A.BYTES - DECODE(F.BYTES, NULL, 0 , F.BYTES)) / 1024 / 1024)/(A.BYTES / 1024 / 1024)- 0.9),1 ,'剩余不到10%,请考虑扩表空间' ,'正常') as "温馨提示"
FROM SYS.DBA_TABLESPACES D, SYS.SM$TS_AVAIL A, SYS.SM$TS_FREE F
WHERE D.TABLESPACE_NAME = A.TABLESPACE_NAME
AND F.TABLESPACE_NAME (+) = D.TABLESPACE_NAME