恢復監控表空間狀態

--恢復數據庫腳本
impdp system/oracle@ip:1521/orcl directory=nxswjcglptdump dumpfile=NXIBW_20190906.DP logfile=NXIBW_20190910.log  
schemas=(nxb3,nxe3,tdoc,nxsw,swjc_ogg) transform=segment_attributes:n table_exists_action=replace reuse_datafiles=true;
--監控數據表空間狀況
select a.tablespace_name,round(a.bytes/1024/1024/1024,3) total_gb,round(b.bytes/1024/1024/1024,3) used_gb,
round(c.bytes/1024/1024/1024,3) free_gb,round((b.bytes*100)/a.bytes,3) "%used",
round((c.bytes*100)/a.bytes,3) "%free",to_char(sysdate,'yyyy-mm-dd hh:mm:ss') time
 from sys.sm$ts_avail a left join sys.sm$ts_used b
on a.tablespace_name = b.tablespace_name
left join sys.sm$ts_free c on a.tablespace_name = c.tablespace_name order by round(c.bytes/1024/1024/1024,3);
--查看job運行狀態是否正常
select * from dba_datapump_jobs;
--如果job沒有正常運行,重新啓動job
1.impdp system/oracle@ip:1521/orcl attach=job_name
2.start_job

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章