今天下午在上班的時候,碰到一個從來沒有碰到過的問題, ORA-03117: 雙工保存區域上溢,看到這個錯誤太茫然啦,後來在論壇上面找了一些資料關於這個錯誤的,在這裏分享一下:
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 64-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> desc dbms_metadata.get_ddl;
ERROR:
ORA-03117: 雙工保存區域上溢
1. 首先錯誤的產生
Errors ORA-03117
Symptoms
When describing a packge (with nested parameters) from the Windows client we recieve the error "ORA-03117: two-task save area overflow"。
當查看一個帶有嵌套參數的包時,並且運行desc語句是在windows客戶端,會接收到ORA-03117錯誤。
2. 產生的原因
Cause Bug: 2576474
Fix
The fix might appear in 10.2 release.
This is not backportable. The problem is Only with Windows SQL*Plus.
這個錯誤是一個bug,可能出現10.2g裏面,並且這個問題只是出現在windows sqlplus下面。也就是說在unix或者linux下面是沒有問題的。
As a workaround we can use Server Manager (available till 8.1 clients).
References
<BUG:2576474> - Ora-3117 When Describe Package With Parameters Of Type Is Record。
我很奇怪,如果從上面的解釋來說只可能出現windows sqlplus下面,但是我明明用的pl/sql,爲撒子還是出現這個錯誤呢。
這個是查詢的時候出現Ora-3117 錯誤的服務器。
SQL> show user
User is "yb_stat"
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 64-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> select file_name from dba_data_files where rownum=1;
FILE_NAME
--------------------------------------------------------------------------------
D:\ORACLE\PRODUCT\10.2.0\ORADATA\YBJF\USERS01.DBF
SQL> desc dbms_metadata.get_ddl;
ERROR:
ORA-03117: 雙工保存區域上溢
這個是查詢正常的服務器。
SQL> show user
User is "report"
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
SQL> select file_name from dba_data_files where rownum=1;
FILE_NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/bzdtbb/users01.dbf
SQL> desc dbms_metadata.get_ddl;
Parameter Type Mode Default?
----------- -------- ---- --------
(RESULT) CLOB
OBJECT_TYPE VARCHAR2 IN
NAME VARCHAR2 IN
SCHEMA VARCHAR2 IN Y
VERSION VARCHAR2 IN Y
MODEL VARCHAR2 IN Y
TRANSFORM VARCHAR2 IN Y