ISSUE:-
-----
Below error received when trying to run the code having bind variables.
But,same code works correctly in other datadases maintained at same version.
Oracle Database Version: 11.2.0.2.0 - 64 bit (SQL>SELECT BANNER FROM v$version;)
PL/SQL : 11.2.0.2.0
OS Version : Linux x86_64 ($uname -ms)
OS Version
----------
$uname -ms
Linux x86_64
ERROR:
-----
ERROR at line 1:
ORA-01008:not all variables bound
ORA-06512:at line 77
Running in to Bug 14458214 (5/rdbms/partitioning) Unexpected ORA-01008 from select on composite partitioned table.
The workaround mentioned in Bug 14458214 is as follows:
Try executing this from the sqlplus session before you execute the anonymous block.
alter session set "_and_pruning_enabled"=false;
alter session set "_subquery_pruning_enabled"=false;
alter session set "_optimizer_table_expansion"=false;
--execute the anonymous PL/SQL block which fails, here
How to Generate 1008 TRACE file from Oracle Database
----------------------------------------------------
Set an 1008 ERRORSTACK event to confirm the stack.
Database Details
----------------
sqlplus "/as sysdba"
set pages 50000 lines 32767
col OPEN_MODE for a10
col HOST_NAME for a20
select name DB_NAME, INSTANCE_NAME, HOST_NAME, DATABASE_ROLE,
OPEN_MODE, version DB_VERSION, LOGINS,
to_char(STARTUP_TIME,'DD-MON-YYYY HH24:MI:SS') "DB UP TIME"
from v$database,gv$instance;
Generate 1008 TRACE file at session level
-----------------------------------------
alter session set timed_statistics=true;
alter session set statistics_level=all;
alter session set max_dump_file_size=unlimited;
alter session set tracefile_identifier='TEST1008';
alter session set events '1008 trace name ERRORSTACK level 4';
--execute the statement which fails, here
alter session set events '1008 trace name context off';
Trace File Location
-------------------
set pages 50000 lines 32767
col NAME for a30
col VALUE for a100
select * from v$diag_info where name like '%Diag Trace'; -------------- 11G
INST_ID NAME VALUE
------- ---------- ---------
Diag Trace /trace/file/location/
exit
Listing Trace Files
-------------------
cd /trace/file/location/
ls -lrt | grep -i TEST1008
-----
Below error received when trying to run the code having bind variables.
But,same code works correctly in other datadases maintained at same version.
Oracle Database Version: 11.2.0.2.0 - 64 bit (SQL>SELECT BANNER FROM v$version;)
PL/SQL : 11.2.0.2.0
OS Version : Linux x86_64 ($uname -ms)
OS Version
----------
$uname -ms
Linux x86_64
ERROR:
-----
ERROR at line 1:
ORA-01008:not all variables bound
ORA-06512:at line 77
Running in to Bug 14458214 (5/rdbms/partitioning) Unexpected ORA-01008 from select on composite partitioned table.
The workaround mentioned in Bug 14458214 is as follows:
Try executing this from the sqlplus session before you execute the anonymous block.
alter session set "_and_pruning_enabled"=false;
alter session set "_subquery_pruning_enabled"=false;
alter session set "_optimizer_table_expansion"=false;
--execute the anonymous PL/SQL block which fails, here
How to Generate 1008 TRACE file from Oracle Database
----------------------------------------------------
Set an 1008 ERRORSTACK event to confirm the stack.
Database Details
----------------
sqlplus "/as sysdba"
set pages 50000 lines 32767
col OPEN_MODE for a10
col HOST_NAME for a20
select name DB_NAME, INSTANCE_NAME, HOST_NAME, DATABASE_ROLE,
OPEN_MODE, version DB_VERSION, LOGINS,
to_char(STARTUP_TIME,'DD-MON-YYYY HH24:MI:SS') "DB UP TIME"
from v$database,gv$instance;
Generate 1008 TRACE file at session level
-----------------------------------------
alter session set timed_statistics=true;
alter session set statistics_level=all;
alter session set max_dump_file_size=unlimited;
alter session set tracefile_identifier='TEST1008';
alter session set events '1008 trace name ERRORSTACK level 4';
--execute the statement which fails, here
alter session set events '1008 trace name context off';
Trace File Location
-------------------
set pages 50000 lines 32767
col NAME for a30
col VALUE for a100
select * from v$diag_info where name like '%Diag Trace'; -------------- 11G
INST_ID NAME VALUE
------- ---------- ---------
Diag Trace /trace/file/location/
exit
Listing Trace Files
-------------------
cd /trace/file/location/
ls -lrt | grep -i TEST1008
No comments:
Post a Comment