自动备份失效,手动执行脚本报错 ORA-31634 ORA-31664

1、问题发现:
每天定时数据泵导出作业未正常导入,查看import.log,居然为空。
2、问题追踪:
手工调用back.sh脚本导出,运行几秒后报错:
ORA-31634: job already exists
ORA-31664: unable to construct unique job name when defaulted
3、查找解决
1)分析错误及如何解决:
ORA-31634: job already exists
Cause: Job creation or restart failed because a job having the selected name is currently executing. This also generally indicates that a Master Table with that job name exists in the user schema. Refer to any following error messages for clarification.
Action: Select a different job name, or stop the currently executing job and re-try the operation (may require a DROP on the Master Table).
ORA-31664: unable to construct unique job name when defaulted
Cause: The job name was defaulted, and the name creation algorithm was unable to find a unique job name for this schema where the table name (for the master table) didn"t already exist.
Action: Specify a job name to use or delete some of the existing tables causing the name conflicts.
经分析是expdp运行时调用job的唯一名不存在,查询dba_datapump_jobs,正常情况下job_name字段只有SYS_IMPORT_SCHEMA_01和SYS_IMPORT_SCHEMA_02两行,而此表有135行,解决方法删除表中字段state是NOT RUNNING状态的表。
2)解决
生成清除master table的SQL语句为:
select 'drop table ' || owner_name || '.' || job_name || ';' from dba_datapump_jobs where state = 'NOT RUNNING'
手工执行生成的SQL语句后,再次查询dba_datapump_jobs确认是否有state是NOT RUNNING的master table,重复生成SQL语句执行即可。
再次手工调用导入脚本,正常导入。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9399028/viewspace-1401753/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9399028/viewspace-1401753/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值