有什么方法可以判断 Oracle 导出是否仍在运行?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1549150/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Any way to tell if an Oracle export is still running?
提问by wadesworld
I've got an Oracle export that's been running for almost 2 days now.
我有一个已经运行了将近 2 天的 Oracle 导出。
The export file shows a modification time of 5 am this morning and does not appear to be growing.
导出文件显示修改时间为今天早上 5 点,并且似乎没有增长。
The log file does not show any errors.
日志文件没有显示任何错误。
I think it's stuck and I need to restart it, but I'd hate to cancel it only to find out it was still going and I simply didn't wait long enough.
我认为它卡住了,我需要重新启动它,但我不想取消它,却发现它仍在运行,而且我只是没有等待足够长的时间。
Any way to definitely know if the export is still running?
有什么方法可以确定导出是否仍在运行?
回答by Rob van Laarhoven
select * from v$session where status = 'ACTIVE';
select * from v$session where status = 'ACTIVE';
回答by David Mann
Couple of things:
几件事:
1) FEEDBACK parameter for export can be helpful to detect activity. I usually set this to 1000 or 10000 records depending on the size of the database I am exporting.
1) 导出的 FEEDBACK 参数有助于检测活动。我通常将其设置为 1000 或 10000 条记录,具体取决于我要导出的数据库的大小。
2) You may also be able to take advantage of the v$session_longops to see progress. The export program doesn't update LongOps directly, but if there are large tables the table scan progress that is a by product of the export will show up, you should at least see the PercentageDone counting up while large tables are being exported:
2) 您也可以利用 v$session_longops 来查看进度。导出程序不直接更新 LongOps,但如果有大表,导出副产品的表扫描进度将显示,您至少应该在导出大表时看到 PercentageDone 计数:
SELECT ROUND(sofar/totalwork*100,2) as PercentDone,
v$session_longops.*
FROM v$session_longops
WHERE sofar <> totalwork
ORDER BY target, sid;
-Dave
-戴夫
回答by Srikant Patra
Method 1:
方法一:
ps -ef|grep expdp
Method 2:
方法二:
Step-1 Find Export JOB using below query.
步骤 1 使用以下查询查找导出作业。
select job_name,owner_name,state from dba_datapump_jobs;
JOB_NAME OWNER_NAME STATE
------------------------------ -------------------- --------------------
SYS_EXPORT_FULL_04 SYSTEM NOT RUNNING
EXP_TEST_FULL SYSTEM NOT RUNNING
Step-2 Then using below query
步骤 2 然后使用下面的查询
expdp system/password attach=EXP_TEST_FULL
Step-3 Kill the job
第 3 步终止工作
Export> KILL_JOB