ORA-31633: unable to create master table "NEWCOURSE.JOB_48"
ORA-06512: at "SYS.DBMS_SYS_ERROR",line 95
ORA-06512: at "SYS.KUPV$FT",line 1020
ORA-00955: name is already used by an existing object
同步是用expdp/impdp做的
查了下错误代码
[oracle@coredb ~]$ oerr ORA 31633
31633,00000,"unable to create master table \"%s.%s\""
// *Cause: Job creation Failed because a Master Table and its indexes could
// not be created,most commonly due to the pre-existance of a table
// with the same name (job name) in the user schema. Refer to any
// following error messages for clarification.
// *Action: Select a different job name,DROP the existing table,or eliminate
// any problems indicated by the following error messages.
这个job的名字肯定是唯一的,这个可以确定
也不会出现同时有其他session同样在跑这个脚本的情况
登陆到用户下查了下和job名字相同的表,确实存在:
sql> desc job_48;
Name Null? Type
----------------------------------------- -------- ----------------------------
PROCESS_ORDER NUMBER
DUPLICATE NUMBER
DUMP_FILEID NUMBER
DUMP_POSITION NUMBER
DUMP_LENGTH NUMBER
......
这个表一般在impdp完成后悔自动删除的,除非在导入的过程中出现异常,可能会导致该表没有被删除
查了下,才知道这个JOB在昨天早上,由于一些特殊情况,被手工kill了,从而导致该表没有被正常删除
解决这个问题,有几种方法,上面oerr也说的很清楚了
可以换一个job name后重新impdp,也可以先手工删除与job同名的表后再导入
其实,我们可以把job name定义一个变量,后缀可以加上当天的日期,这样每天的job name就会不一样了,也可以一定程度上避免这种问题的发生。