Oracle,Expdp,Sga_target,ORACLE一个简单的expdp导出,在之前是正常的,但是隔了一天后出现问题了,具体报错信息UDE-31623,ORA-31623
问题描述:
ORACLE一个简单的expdp导出,在之前是正常的,但是隔了一天后出现问题了,具体报错信息如下:
expdp '"/as sysdba"' DIRECTORY=dir1 DUMPFILE=vat_%U.dmp logfile=vat_20190505.log VERSION= 11.2.0.4.0 SCHEMAS=VAT CLUSTER=NO exclude=STATISTICS parallel=4
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 3326
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4551
ORA-06512: at line 1
...
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
UDE-31623: 操作产生了 ORACLE 错误 31623
ORA-31623: 作业没有通过指定的句柄连接到此会话
ORA-06512: 在 "SYS.DBMS_DATAPUMP", line 3326
ORA-06512: 在 "SYS.DBMS_DATAPUMP", line 4551
ORA-06512: 在 line 1
+++
查询资料1:
https://www.cnblogs.com/cqdba/p/b639a4da27ddeccb5dbd1e55a16b09be.html
解决办法:
sqlplus "/ as sysdba
SYS@ora122>show parameter streams_pool
SYS@ora122>select * from v$sgainfo; #其实为0
SYS@ora122>alter system set streams_pool=64M sid='ODS3' ;
参考文档:(文档 ID 1907256.1)
+++
查询资料2:
https://blog.csdn.net/weixin_39975122/article/details/116365804
https://blog.csdn.net/weixin_39975122
数据库在尝试分配STREAMS POOL的时候出现了ORA-4031错误。
此时查询V$MEMORY_RESIZE_OPS视图,发现同一时间大量的STREAMS POOL扩展失败的记录,Oracle尝试分配STREAMS POOL但是目前数据库的内存采用了在SGA_TARGET下手工分配的方式,为了避免Oracle内存的动态调整,所有的内存组件已经将内存全部使用,因此STREAMS POOL无法获取到空间。
解决问题的方法很简单,手工收缩DB_CACHE_SIZE或SHARED_POOL_SIZE的值,分配给STREAMS POOL,就可以避免这个错误,不过数据泵的导出还要使用STREAMS POOL,还是第一次发现这个问题。
>>>解决
>>>
SQL> show parameter streams
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
streams_pool_size big integer 0
SQL> select * from v$sgainfo;
NAME BYTES RES
-------------------------------- ---------- ---
Fixed SGA Size 2290648 No
Redo Buffers 74391552 No
Buffer Cache Size 1073741824 Yes
Shared Pool Size 2147483648 Yes
Large Pool Size 536870912 Yes
Java Pool Size 134217728 Yes
Streams Pool Size 134217728 Yes
Shared IO Pool Size 0 Yes
Granule Size 134217728 No
Maximum SGA Size 4.2758E+10 No
Startup overhead in Shared Pool 366664984 No
NAME BYTES RES
-------------------------------- ---------- ---
Free SGA Memory Available 3.8655E+10
已选择12行。
SQL> alter system set streams_pool=64M;
alter system set streams_pool=64M
*
第 1 行出现错误:
ORA-02065: 非法的 ALTER SYSTEM 选项
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 40G
sga_target big integer 4G
查看资料2中的 V$MEMORY_RESIZE_OPS
确实有大量的streams_pool/streams_pool_size记录。
考虑到sga_target设置比较小,想直接调整sga_target应该也能解决。
----修改sga_target=10g;
SQL> alter system set sga_target=10g;
系统已更改。
SQL>
----修改后
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 40G
sga_target big integer 10G
SQL> show parameter streams;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
streams_pool_size big integer 0
SQL> select * from v$sgainfo;
NAME BYTES RES
-------------------------------- ---------- ---
Fixed SGA Size 2290648 No
Redo Buffers 74391552 No
Buffer Cache Size 6710886400 Yes
Shared Pool Size 2818572288 Yes
Large Pool Size 536870912 Yes
Java Pool Size 134217728 Yes
Streams Pool Size 268435456 Yes
Shared IO Pool Size 0 Yes
Granule Size 134217728 No
Maximum SGA Size 4.2758E+10 No
Startup overhead in Shared Pool 366664984 No
NAME BYTES RES
-------------------------------- ---------- ---
Free SGA Memory Available 3.2212E+10
已选择12行。
SQL>
测试导出OK
查看系统内存占用已经达到50多G,修改Sga_target=8g;
SQL> alter system set sga_target=8g;
系统已更改。
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 40G
sga_target big integer 8G
SQL>
任务计划执行,测试正常导出和结束。
OK.
Tag: Oracle Expdp Sga_target