12c expdp ORA-31623 -又遇到BUG
admin
2023-04-24 13:02:46
0

一、环境描述
12.1.0.2 RAC

二、详细过程

昨天做了一个12c RAC环境的expdp备份操作,结果出现报错,查看了官网竟然是BUG。

1.报错信息

UDE-31623: operation generated ORACLE error 31623
ORA-31623: a job is not attached to this session via the specified handle
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3905
ORA-06512: at "SYS.DBMS_DATAPUMP", line 5203
ORA-06512: at line 1

2.新参数logtime使用导致报错

Parameter LOGTIME is being used.

This parameter specifies that messages displayed during export/import operations be timestamped. You can use the timestamps to figure out the elapsed time between different phases of a Data Pump operation. Such information can be helpful in diagnosing performance problems and estimating the timing of future similar operations.

The parameter as such is not essential for performing an export/import.

3.原因

Data Pump export/import with LOGTIME parameter crashes if the environment variable NLS_DATE_FORMAT is set. In some cases the errors are seen if both NLS_DATE_FORMAT and NLS_LANG are set.

The problem is addressed in
Bug 18920652 - DATAPUMP WITH LOGTIME CRASHES WHEN NLS_LANG IS SET AT O/S LEVEL 
closed as a duplicate of
Bug 17714887 - ORA-31623 ON IMPDP WITH DBLINK 

Please note that Bug 17714887 has been superseded by unpublished Bug 21094393

Unpublished Bug 21094393 is fixed in 12.2.

4.解决的方法

To solve the issue, use any of below alternatives:

Apply interim patch 21094393, if available for your platform and Oracle version.

To check for conflicting patches, please use the MOS Patch Planner Tool
Please refer to
Note 1317012.1 - How To Use MOS Patch Planner To Check And Request The Conflict Patches?

If no patch exists for your version, please contact Oracle Support for a backport request.

- OR -

As possible workarounds:

Do not use the LOGTIME parameter, as it is not essential to the export/import functionality as such.

- OR -

Unset the NLS_DATE_FORMAT and NLS_LANG environment variables

三、附上测试过的一个备份脚本

#!/bin/sh
#filename:expdpbackup.sh
#authored by roidba
#date:2017-12-14
#$sh /home/oracle/backup.sh >/dev/null 2>&1 &
#crontab -e
#CREATE DIRECTORY dump_backup_dir as '/home/oracle';
#grant read,write on directory dump_backup_dir to system;
#col owner for a10
#col directory_name for a20
#col directory_path for a50
#set lines 150
#select * from dba_directories;
###variables###
DMP_FILE=orcl_$(date +%Y%m%d_%H%M%S).dmp
LOG_FILE=orcl_$(date +%Y%m%d_%H%M%S).log
BACKUP_DIR=DUMP_BACKUP_DIR
###main command ###
export LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_SID=orcl1
expdp system/oracle schemas=roidba,scott DIRECTORY=$BACKUP_DIR DUMPFILE=$DMP_FILE logfile=$LOG_FILE FILESIZE=20G compression=all parallel=3 CLUSTER=N;

上一篇:移除mysql服务

下一篇:oracle with as 用法

相关内容

热门资讯

烈焰熊熊,堪比“原子弹”,欧洲... 据美国有线电视新闻网(CNN)7月29日报道,席卷法国西南部的大片野火燃烧得如此猛烈,以至于形成了一...
外交部:对日本熊本县地震遇难者... 据凤凰卫视报道,针对日本熊本县发生强震造成人员伤亡,中国外交部发言人毛宁7月29日在例行记者会上表示...
高铁喧哗被劝阻后叫嚣全家体制内... “女子高铁喧哗被劝阻后叫嚣全家体制内”一事迎来官方通报。据新京报报道,7月29日,辽宁北票市公安局发...
广东专业蓝牙耳机定制厂家推荐,... 在珠三角腹地,广东早已成为全球蓝牙耳机产业链的“心脏地带”。从深圳华强北的声学元件批发,到东莞、惠州...
格雷厄姆葬礼变地缘竞价场!两大... 有些葬礼,送别的是逝者;有些葬礼,演的却是活人最现实的政治博弈。当地时间7月28日,美国老牌鹰派参议...
一道小学数学题难住3名医学博士... 3名不同学校的博士同做一道数学题,谁最厉害?近日,一陕西网友发布的视频引发热议。29日,视频发布者“...
华为全新“小艺任务”亮相:整合... 7月29日,在华为鸿蒙电脑新品技术沟通会上,终端云服务小艺业务部总裁贾永利宣布,小艺将迎来“从对话到...
广西日报特稿《王的猜想》火了,... 澎湃新闻记者 蒋子文 实习生 汤煜炜为应对外界购买纸质版特稿《王的猜想》的热情,《广西日报》宣布紧急...
月租20元内!2026年平价云... 不少手游玩家、账号运营从业者挑选云手机时,首要诉求就是低价够用,想要控制每月支出在20元以内,同时兼...
诺奖得主如何看待王虹境遇?“我... 中村修二(2014年诺贝尔物理学奖得主)【导读】近日王虹与邓煜双双获得2026年菲尔兹奖,成为了首批...