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 用法

相关内容

热门资讯

伊方透露新一轮谈判先决条件 当地时间12日,伊朗方面发布消息称,一名知情人士透露了伊朗同美国新一轮谈判的五项先决条件 ——即“结...
中东危机下,莫迪将密集访问5国 【环球时报驻巴基斯坦特约记者 黄晓娜】印度外交部11日宣布,印度总理莫迪将于15日开始对阿联酋、荷兰...
“台独”顽固分子沈伯洋参选台北... 【环球时报特约记者 陈立非】台湾今年年底举行“九合一”选举,国民党很早就确定由现任台北市市长蒋万安争...
伊拉克和巴基斯坦据称已分别同伊... 总台记者当地时间5月12日获悉,伊拉克和巴基斯坦已分别同伊朗签订协议,以从海湾地区运输石油和液化天然...
京沪高铁“涨价”,调价背后有何... 昨天(11日),京沪高铁发布公告称,决定对京沪高速线、合蚌高速线动车组列车公布票价进行优化调整,时速...
第三方样品A厂家生产支架样品测... 第三方样品A厂家生产支架样品测试实验报告 一、检测范围 本次检测对象为A厂家生产的XX型医用金属...
伊朗德黑兰地区发生4.6级地震 总台记者获悉,当地时间5月12日23时47分左右,伊朗德黑兰地区发生4.6级地震。震中位于德黑兰省和...
被科威特指控“武装渗透”布比延... 新华社科威特城/德黑兰5月12日电(记者尹炣 陈霄)科威特政府12日指认,伊朗伊斯兰革命卫队多名武装...
酒吧办护士制服派对被指低俗,当... 据媒体报道,5月12日国际护士节,浙江衢州有网友发帖称,当地APK·ELITE CLUB酒吧举办所谓...
珠海冠宇获得发明专利授权:“一... 证券之星消息,根据天眼查APP数据显示珠海冠宇(688772)新获得一项发明专利授权,专利名为“一种...