FORALL error
Hi Folks,
Please let me know whats wrong in the following piece of code.
I'm able to get the code executed with FOR instead of FORALL ...
CREATE OR REPLACE PROCEDURE HR.P_BULKCOLLECT_FORALL AS
TYPE rec_holder is RECORD
ID NUMBER,
FNAME VARCHAR2(20),
LNAME VARCHAR2(20)
TYPE ty_user is table of rec_holder;
v_all ty_user;
CURSOR C1 IS SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME FROM
EMPLOYEES_TEMP;
BEGIN
OPEN C1;
FETCH C1 BULK COLLECT INTO v_all LIMIT 1000;
CLOSE C1;
FORALL j in v_all.first .. v_all.last
UPDATE EMPLOYEES_TEMP
SET FIRST_NAME = 'VIJA'
WHERE EMPLOYEE_ID = v_all(j).ID;
COMMIT;
END;
ERROR got is:
17/5 PL/SQL: SQL Statement ignored
19/25 PL/SQL: ORA-22806: not an object or REF
19/25 PLS-00382: expression is of wrong type
19/25 PLS-00436: implementation restriction: cannot reference fields of
BULK In-BIND table of records
Thanks in advance !
This is an annoying restriction that Oracle finally fixed in 11g.
[www.oracle-developer.net/display.php?id=501|http://www.oracle-developer.net/display.php?id=501]
Similar Messages
-
Bulk collect & forall error in script
hi,
i am having senerio as below in my code.but i am getting error "too many values for emp1". i know why i m getting error but i need to insert emp column " EMPNO, ENAME" value in emp1 table &
emp column " EMPNO, ENAME,sal" value in emp2 table .
how to do it.sud i declare 2 diffrent cursor ? 1 cursor having only "EMPNO, ENAME" & 2nd having "EMPNO, ENAME, SAL" values.
or any other best way to do this. plz help ..
DECLARE
CURSOR s_cur1
IS SELECT EMPNO, ENAME, SAL
FROM EMP E;
TYPE fetch_array1 IS TABLE OF s_cur1%ROWTYPE;
s_array1 fetch_array1;
BEGIN
OPEN s_cur1;
LOOP
FETCH s_cur1 BULK COLLECT INTO s_array1 LIMIT 1000;
FORALL i IN 1..s_array1.COUNT SAVE EXCEPTIONS
INSERT INTO EMP1 --(EMPNO, ENAME)
VALUES s_array1(i);
FORALL i IN 1..s_array1.COUNT SAVE EXCEPTIONS
INSERT INTO EMP2 --(EMPNO, ENAME, sal)
VALUES s_array1(i);
EXIT WHEN s_cur1%NOTFOUND;
END LOOP;
CLOSE s_cur1;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Unexpected Error:'||SqleRrm);
END;
table structures:-
CREATE TABLE EMP (
EMPNO NUMBER,
ENAME VARCHAR2 (100),
SAL NUMBER ) ;
CREATE TABLE EMP1 (
EMPNO NUMBER,
ENAME VARCHAR2 (100),
CREATE TABLE EMP2 (
EMPNO NUMBER,
ENAME VARCHAR2 (100),
SAL NUMBER ) ;
---------------------------------------------------------------------Do it in one simple SQL.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> desc emp
Name Null? Type
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> desc emp1
Name Null? Type
EMPNO NUMBER
ENAME VARCHAR2(100)
SQL> desc emp2
Name Null? Type
EMPNO NUMBER
ENAME VARCHAR2(100)
SAL NUMBER
SQL> INSERT ALL WHEN 1 = 1 THEN INTO emp1
2 (empno, ename)
3 VALUES
4 (empno, ename) WHEN 2 = 2 THEN INTO emp2
5 (empno, ename, sal)
6 VALUES
7 (empno, ename, sal)
8 SELECT empno, ename, sal FROM emp;
28 rows created.
SQL> SELECT COUNT(*) FROM emp1;
COUNT(*)
14
SQL> SELECT COUNT(*) FROM emp2;
COUNT(*)
14
SQL> SELECT COUNT(*) FROM emp;
COUNT(*)
14
SQL> -
When i import applicaion file (f146.sql) i got below error yesterday i was imported successfully but today i got error
anyone helpme on this?
ORA-20001: GET_BLOCK Error. ORA-20001: GET_STMT error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 6, column 41: PLS-00103: Encountered the symbol "�ࡱ�" when expecting one of the following: ( - + case mod new not null <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall
Error installing application.
Return to application.i got below error while importing it in to apex.oracle.com
The application could not be installed because it already exists in different workspace. if you wish to install the application , please do the following
1.Remove the existing application from the workspace it currently exists in
OR
1.Change the application ID in your export file. An application ID that's currently available you can use is 50540
2. Upload the changed export file to repository, and re-install your application -
Hello All,
May i know why the following example from Oracle documentation is failing.
CREATE TABLE coords (x NUMBER, y NUMBER);
CREATE TYPE Pair AS OBJECT (m NUMBER, n NUMBER);
DECLARE
TYPE PairTab IS TABLE OF Pair;
pairs PairTab := PairTab(Pair(1,2), Pair(3,4), Pair(5,6));
TYPE NumTab IS TABLE OF NUMBER;
nums NumTab := NumTab(1, 2, 3);
BEGIN
/* The following statement succeeds. */
FORALL i in 1..3
UPDATE coords SET (x, y) = (pairs(i).m, pairs(i).n)
WHERE x = nums(i);
END;
Error:
Error starting at line 37 in command:
DECLARE
TYPE PairTab IS TABLE OF Pair;
pairs PairTab := PairTab(Pair(1,2), Pair(3,4), Pair(5,6));
TYPE NumTab IS TABLE OF NUMBER;
nums NumTab := NumTab(1, 2, 3);
BEGIN
/* The following statement succeeds. */
FORALL i in 1..3
UPDATE coords SET (x, y) = (pairs(i).m, pairs(i).n)
WHERE x = nums(i);
END;
Error report:
ORA-06550: line 9, column 34:
PL/SQL: ORA-01767: UPDATE ... SET expression must be a subquery
ORA-06550: line 9, column 7:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Thank you.Based on your advise i did the below example,
DECLARE
TYPE PairTab IS TABLE OF Pair;
pairs PairTab := PairTab(Pair(1,2), Pair(3,4), Pair(5,6),Pair(7,8),Pair(9,10));
TYPE NumTab IS TABLE OF NUMBER;
nums NumTab := NumTab(1,2,3,4,5);
vnum1 NUMBER;
vnum2 number;
BEGIN
FORALL i IN 1 .. 5
UPDATE coords
SET (x, y) = (SELECT pairs(i).m, pairs(i).n
FROM dual)
WHERE x = nums(i);
END;
INSERT INTO coords VALUES(1,10);
INSERT INTO coords VALUES(2,10);
insert into coords values(3,10);
INSERT INTO coords VALUES(4,10);
INSERT INTO coords VALUES(5,10);
commit;
After insertng the data into coords table i execute the above plsql block i got the below output.I wonder how come rows 2,3 & 5 are updated with 9,10.
Output:
1
2
9
10
9
10
7
8
9
10 -
Hi All,
I am using FORALL for inserting 40000 records from the file to the table. After reading data from the file it has been stored in type Table array, But while executing FORALL statement its giving ora-00600. error.
It is a memory error, some where I read to using LIMIT in fetch. But I am not using any fetch or Cursor. Can any body Help.
SKM
=================== ================= Package Code
create or replace package insertpackage as
TYPE tabSNO IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
TYPE tabSNO1 IS TABLE OF VARCHAR2(1) INDEX BY BINARY_INTEGER;
TYPE tabSDATE IS TABLE OF VARCHAR2(20) INDEX BY BINARY_INTEGER;
TYPE SNO IS TABLE OF NUMBER(5) INDEX BY BINARY_INTEGER;
procedure insertpro(snoArray IN SNO, sDate IN tabSDATE, sArray IN tabSNO, sArray1 IN tabSNO1);
end insertpackage;
create or replace package body insertpackage as
procedure insertpro(snoArray IN SNO, sDate IN tabSDATE, sArray IN tabSNO, sArray1 IN tabSNO1) is
begin
forall i in 1..sArray.last
insert into test(s_no, s_date, s_co, s_type)
values(snoArray(i), TO_DATE(sDate(i),'YYYY-MM-DD HH24.MI.SS'), sArray(i), sArray1(i));
end;
end insertpackage;
/Hi User,
The error
implementation restriction: cannot reference fields of BULK In-BIND table of recordsis because bulk bind cannot use table of composite types.
Please See the below,
http://dba-blog.blogspot.com/2005/08/using-of-bulk-collect-and-forall-for.html
And rewrite your code like this,
DECLARE
CURSOR EMP_CUR
IS
SELECT EMPNO, ENAME
FROM EMP;
TYPE TAB_EMP_EMPNO IS TABLE OF EMP.EMPNO%TYPE;
V_TAB_EMPNO TAB_EMP_EMPNO;
TYPE TAB_EMP_ENAME IS TABLE OF EMP.ENAME%TYPE;
V_TAB_ENAME TAB_EMP_ENAME;
BEGIN
OPEN EMP_CUR;
FETCH EMP_CUR BULK COLLECT INTO V_TAB_EMPNO, V_TAB_ENAME;
FORALL I IN V_TAB_EMPNO.FIRST .. V_TAB_EMPNO.LAST
INSERT INTO EMP_TEMP
(EMPNO, ENAME
VALUES (V_TAB_EMPNO (I), V_TAB_ENAME (I)
CLOSE EMP_CUR;
END;Thanks,
Shankar -
PLS-00801: internal error with FORALL
I have the following procedure that I am trying to compile but I am getting an error:
<pre>
PROCEDURE procedure_1 AS
cursor cur_1 is
select column1 || column2 || column3 || column4 || column5 ||
column6 || column7 || column8 as concat_column
from table_1
for update wait 5;
type type_table_1 is table of varchar2(100);
tab_1 type_table_1;
bulk_error EXCEPTION;
PRAGMA EXCEPTION_INIT(bulk_error, -24381);
BEGIN
open cur_1;
loop
fetch cur_1 bulk collect into tab_1 limit 100;
exit when tab_1.COUNT = 0;
forall ctr in 1 .. tab_1.COUNT save exceptions
update table_1
set column_20 = array_line(tab_1(ctr).concat_column);
end loop;
close cur_1;
EXCEPTION
when bulk_error then
for i in 1 .. sql%bulk_exceptions.count loop
NULL;
end loop;
END procedure_1;
Error(622,21): PLS-00801: internal error [*** ASSERT at file pdw4.c, line 3572; Can't handle Object = -2147476152 in D_S_ED -2147476153.;
The offending line seems to be the update statement inside the forall loop. I cannot tell why I am getting this error though as everything seems ok to me.
Please help.
ThanksAnd what are you trying to do? You are updating column20 in all rows in table_1 over and over. And what is array_line? Type type_table_1 is not a table of objects, so what is tab_1(ctr).concat_column? Without questioning code logic (although I already did :) ), remove that ".concat_column":
set column_20 = array_line(tab_1(ctr));SY. -
Error in checking FORALL and FOR performance in PL/SQL.!
I am using FORALL and FOR construct' comparison in term of times taken by them(performance).
This is whats my problem:
SQL> SET SERVEROUTPUT ON;
SQL> CREATE TABLE T1(C1 VARCHAR2(100));
Table created.
SQL> declare
2 t1 number;
3 t2 number;
4 t3 number;
5 begin
6 for i in 1..10
7 loop
8 t1:=dbms_utility.get_time;
9 insert into t1 values('RAVIKANTH');
10 end loop;
11 t2:=dbms_utility.get_time;
12 forall i in 1..10
13 insert into t1 values('RAVIKANTH');
14 t3:=dbms_utility.get_time;
15 dbms_output.put_line('Time taken for FOR'||TO_CHAR((t2-t1)/100));
16 dbms_output.put_line('Time taken for FORALL'||TO_CHAR((t3-t1)/100));
17 end;
18 /
declare
ERROR at line 1:
ORA-06550: line 13, column 1:
PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL
... dear friends, please help me out in resolving this.
Thanks in advance,
Ravikanth K.Forall works with sets of data, like index-by tables. Here's an example:
declare
t1 number;
t2 number;
t3 number;
type r_tt is table of t%rowtype
index by binary_integer;
tt r_tt;
begin
for i in 1..10
loop
t1:=dbms_utility.get_time; -- <----- this one should be outside the loop
insert into t values('RAVIKANTH');
end loop;
t2:=dbms_utility.get_time;
-- Load the index-by Table
for i in 1..10
loop
tt (i).c1 := 'RAVIKANTH';
end loop;
-- Use this index-by Table to perform the Bulk Operation
forall i in 1..10
insert into t values tt (i);
t3:=dbms_utility.get_time;
dbms_output.put_line('Time taken for FOR'||TO_CHAR((t2-t1)/100));
dbms_output.put_line('Time taken for FORALL'||TO_CHAR((t3-t1)/100));
end;You probably won't see much difference in elapsed time. You testing a single insert again a bulk operation.
btw: You have a local variable with the same name as your table -
Bulk Collect with FORALL not working - Not enough values error
Hi,
I am trying to copy data from one table to another which are having different number of columns. I am doing the following. But it threw not enough values error.
Table A has more than 10 millions of records. So I am using bulk collect instead of using insert into select from.
TABLE A (has more columns - like 25)
c1 Number
c2 number
c3 varchar2
c4 varchar2
c25 varchar2
TABLE B (has less columns - like 7)
c1 Number
c2 number
c3 varchar2
c4 varchar2
c5 number
c7 date
c10 varchar2
declare
TYPE c IS REF CURSOR;
v_c c;
v_Sql VARCHAR2(2000);
TYPE array is table of B%ROWTYPE;
l_data array;
begin
v_Sql := 'SELECT c1, c2, c3, c4, c5, c7, c10 FROM A ORDER BY c1';
OPEN v_c FOR v_Sql;
LOOP
FETCH v_c BULK COLLECT INTO ldata LIMIT 100000;
FORALL i in 1 .. ldata.count
INSERT
INTO B
VALUES ldata(i);
END LOOP;
COMMIT;
exception
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line('Exception Occurred' || SQLERRM);
END;
When I execute this, I am getting
PL/SQL: ORA-00947: not enough values
Any suggestions please. Thanks in advance.Table A has more than 10 millions of records. So I am using bulk collect instead of using insert into select from.That doesn't make sense to me. An INSERT ... SELECT is going to be more efficient, more maintainable, easier to write, and easier to understand.
INSERT INTO b( c1, c2, c3, c4, c5, c7, c10 )
SELECT c1, c2, c3, c4, c5, c7, c10
FROM a;is going to be faster, use fewer resources, be far less error-prone, and have a far more obvious purpose when some maintenance programmer comes along than any PL/SQL block that does the same thing.
If you insist on using PL/SQL, what version of Oracle are you using? You should be able to do something like
DECLARE
TYPE b_tbl IS TABLE OF b%rowtype;
l_array b_tbl;
CURSOR a_cursor
IS SELECT c1, c2, c3, c4, c5, c7, c10 FROM A;
BEGIN
OPEN a_cursor;
LOOP
FETCH a_cursor
BULK COLLECT INTO l_array
LIMIT 10000;
EXIT WHEN l_array.COUNT = 0;
FORALL i IN l_array.FIRST .. l_array.LAST
INSERT INTO b
VALUES l_array(i);
END LOOP;
COMMIT;
END;That at least eliminates the infinite loop and the unnecessary dynamic SQL. If you're using older versions of Oracle (it's always helpful to post that information up front), the code may need to be a bit more complex.
Justin
Edited by: Justin Cave on Jan 19, 2011 5:46 PM -
Index range error bulk collect & forall ?
hi,
can any1 tell me why i m getting below errir
ORA-22165: given index [32768] must be in the range of [1] to [32767].
i am using bulk collecrt & forall,as in below senerio.
declare
cursor cmain is...
type <collectionType> is table of <>tablename%rowtype;
<collectionvariable> <collectionType>;
begin
declare
cursor c1 .....
type <collectionType> is table of <>tablename%rowtype;
<collectionvariable> <collectionType>;
begin
open c1;
loop
fetch c1 into <collectionvariable2> limit 50000;
forall i in 1 .. <collectionVariable1>.count
stmnt....
EXIT WHEN C1%NOTFOUND;
end loop;
close c1;
COMMIT;
end;
open cmain;
loop
fetch cmain into <collectionVariable2> limit 50000;
forall i in 1 .. <collectionVariable2>.count
stmnt....
EXIT WHEN CMAIN%NOTFOUND;
end loop;
close cmain;
COMMIT;
end ;
}Do not see anything obviously wrong (except for perhaps consuming way too much PGA memory using bulk fetches larger than a 1000, with likely minute to no performance improvement).
The 50000 limit exceeds the 32767 ceiling that the exception throws. So it could be perhaps related to that - though a quick test on 10.2.0.1 showed no problems in bulk fetching 40k+ rows like this.
But I would suggest changing it irrespective - you cannot justify the memory footprint of a 50000 bulk fetch by the decrease in context switching it provides. No way. It is just a useless waste of very expensive memory.
Also note that the exception will include a PL/SQL source code line number - use that to start tracing the error.
And did I mention not too waste precious PGA memory? -
Forall with bulk collect .. getting error
it's 10 g.
gettting this error.
drop table t2;
create table t2
( seq_id number,
act number,
is_p varchar2(1),
other varchar2(20)
insert into t2 values(1,2,'N','Test 1');
drop table t3;
create table t3
( seq_id number
-- ,act number
-- ,is_p varchar2(1)
set serveroutput on
declare
type t2_r is table of t2%ROWTYPE;
cursor c1 is select * from t2 ;
t t2_r;
begin
open c1;
fetch c1 BULK collect into t;
forall i in 1..t.count
insert into t3(seq_id) values (t(i).seq_id);
end;
ORA-06550: line 10, column 35:
PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records
ORA-06550: line 10, column 35:
PLS-00382: expression is of wrong type
ORA-06550: line 10, column 35:
PL/SQL: ORA-22806: not an object or REF
ORA-06550: line 10, column 4:
PL/SQL: SQL Statement ignoredThe PLS-00436 is an annoying error message indeed.
On 10g:
rwijk@ORA10GR2> create table t2
2 ( seq_id number,
3 act number,
4 is_p varchar2(1),
5 other varchar2(20)
6 );
Tabel is aangemaakt.
rwijk@ORA10GR2> insert into t2 values(1,2,'N','Test 1');
1 rij is aangemaakt.
rwijk@ORA10GR2> create table t3
2 ( seq_id number
3 -- ,act number
4 -- ,is_p varchar2(1)
5 );
Tabel is aangemaakt.
rwijk@ORA10GR2> declare
2 type t2_r is table of t2%ROWTYPE;
3 cursor c1 is select * from t2 ;
4 t t2_r;
5 begin
6 open c1;
7 fetch c1 BULK collect into t;
8 forall i in 1..t.count
9 insert into t3(seq_id) values (t(i).seq_id);
10 close c1;
11 end;
12 /
insert into t3(seq_id) values (t(i).seq_id);
FOUT in regel 9:
.ORA-06550: Regel 9, kolom 35:
PLS-00436: Implementatierestrictie: kan niet verwijzen naar velden van BULK In-BIND-recordtabel..
ORA-06550: Regel 9, kolom 35:
PLS-00382: Uitdrukking heeft onjuist type..
ORA-06550: Regel 9, kolom 35:
PL/SQL: ORA-22806: Geen object of REF..
ORA-06550: Regel 9, kolom 4:
PL/SQL: SQL Statement ignored.You can code it slightly different using SQL object types like this, to make the code work in 10g:
rwijk@ORA10GR2> create type t2_otype is object
2 ( seq_id number
3 , act number
4 , is_p varchar2(1)
5 , other varchar2(20)
6 );
7 /
Type is aangemaakt.
rwijk@ORA10GR2> create type t2s is table of t2_otype;
2 /
Type is aangemaakt.
rwijk@ORA10GR2> declare
2 cursor c1 is select t2_otype(seq_id,act,is_p,other) from t2 ;
3 t t2s;
4 begin
5 open c1;
6 fetch c1 BULK collect into t;
7 forall i in 1..t.count
8 insert into t3(seq_id) values (treat(t(i) as t2_otype).seq_id);
9 close c1;
10 end;
11 /
PL/SQL-procedure is geslaagd.On 11g, as said, you don't have to modify your code:
rwijk@ORA11G> create table t2
2 ( seq_id number,
3 act number,
4 is_p varchar2(1),
5 other varchar2(20)
6 );
Tabel is aangemaakt.
rwijk@ORA11G> insert into t2 values(1,2,'N','Test 1');
1 rij is aangemaakt.
rwijk@ORA11G> create table t3
2 ( seq_id number
3 -- ,act number
4 -- ,is_p varchar2(1)
5 );
Tabel is aangemaakt.
rwijk@ORA11G> declare
2 type t2_r is table of t2%ROWTYPE;
3 cursor c1 is select * from t2 ;
4 t t2_r;
5 begin
6 open c1;
7 fetch c1 BULK collect into t;
8 forall i in 1..t.count
9 insert into t3(seq_id) values (t(i).seq_id);
10 close c1;
11 end;
12 /
PL/SQL-procedure is geslaagd.Regards,
Rob. -
Hi,
I am using 10g.
I am inserting emp table records into emp_temp table using FORALL, i am getting some implementation restriction error while doing this.
DECLARE
CURSOR EMP_CUR IS
SELECT * FROM EMP;
TYPE TAB_EMP_CUR IS TABLE OF EMP%ROWTYPE;
V_TAB TAB_EMP_CUR;
BEGIN
OPEN EMP_CUR;
FETCH EMP_CUR BULK COLLECT
INTO V_TAB;
FORALL I IN 1 .. V_TAB.COUNT
INSERT INTO EMP_TEMP
VALUES
(V_TAB(I).ENO,
V_TAB(I).ENAME,
V_TAB(I).JOB,
V_TAB(I).MGR,
V_TAB(I).SAL,
V_TAB(I).COMM,
V_TAB(I).HIREDATE,
V_TAB(I).DEPTNO);
CLOSE EMP_CUR;
END;
please look into this.
Thanks,
VinodHi User,
The error
implementation restriction: cannot reference fields of BULK In-BIND table of recordsis because bulk bind cannot use table of composite types.
Please See the below,
http://dba-blog.blogspot.com/2005/08/using-of-bulk-collect-and-forall-for.html
And rewrite your code like this,
DECLARE
CURSOR EMP_CUR
IS
SELECT EMPNO, ENAME
FROM EMP;
TYPE TAB_EMP_EMPNO IS TABLE OF EMP.EMPNO%TYPE;
V_TAB_EMPNO TAB_EMP_EMPNO;
TYPE TAB_EMP_ENAME IS TABLE OF EMP.ENAME%TYPE;
V_TAB_ENAME TAB_EMP_ENAME;
BEGIN
OPEN EMP_CUR;
FETCH EMP_CUR BULK COLLECT INTO V_TAB_EMPNO, V_TAB_ENAME;
FORALL I IN V_TAB_EMPNO.FIRST .. V_TAB_EMPNO.LAST
INSERT INTO EMP_TEMP
(EMPNO, ENAME
VALUES (V_TAB_EMPNO (I), V_TAB_ENAME (I)
CLOSE EMP_CUR;
END;Thanks,
Shankar -
Error in self increment varible value using "FORALL"
CREATE OR REPLACE PROCEDURE BULK_COLLCT_PASS
AS
TYPE VAR_TYP IS VARRAY (32767) OF VARCHAR2 (32767);
V_DSH_CM_NUMBER VAR_TYP;
V_DSH_DATE VAR_TYP;
V_DSH_TIME VAR_TYP;
V_DSD_CM_NUMBER VAR_TYP;
V_PLU_CODE VAR_TYP;
V_DSD_DATE VAR_TYP;
V_str_id VAR_TYP;
LN_ITM NUMBER:=0;
str_id number := 30001;
CURSOR CUR_DBMG_SAL_HEAD
IS
SELECT DSH.CM_NUMBER,D_DSH_CM_DATE, D_DSH_CM_TIME
FROM DBMG_SAL_HEAD DSH
WHERE ROWNUM<6;
BEGIN
OPEN CUR_DBMG_SAL_HEAD;
LOOP
FETCH CUR_DBMG_SAL_HEAD BULK COLLECT
INTO V_DSH_CM_NUMBER,
V_DSH_DATE,
V_DSH_TIME;
FOR indx IN V_DSH_CM_NUMBER.FIRST .. V_DSH_CM_NUMBER.LAST
LOOP
SELECT CM_NUMBER, PLU_CODE,V_DSH_DATE(indx)
BULK COLLECT
INTO V_DSD_CM_NUMBER, V_PLU_CODE,V_DSD_DATE
FROM DBMG_SAL_DETL DSD
WHERE DSD.CM_NUMBER = V_DSH_CM_NUMBER(indx);
--block1
Ln_Itm := 0;
FOR ind IN 1..V_DSD_CM_NUMBER.COUNT
loop
INSERT INTO PC_ALL_TAB
VALUES(V_DSH_CM_NUMBER(indx),
V_DSD_DATE(ind),
V_DSD_CM_NUMBER(ind),
V_PLU_CODE(ind),
LN_ITM,
str_id
LN_ITM := LN_ITM +1;
end loop;
--block2
END LOOP;
EXIT WHEN CUR_DBMG_SAL_HEAD%NOTFOUND;
END LOOP;
commit;
CLOSE CUR_DBMG_SAL_HEAD;
DBMS_OUTPUT.PUT_LINE('COMPLETE..!');
END ;
Hi,
I am using above code in which when code between "--block1 & --block2" is incrementing ln_itm value by 1 each time.
so that after completion of code o/p is as below.
SELECT DSH_CM_NUMBER, LN_ITM FROM PC_ALL_TAB;
DSH_CM_NUMBER LN_ITM
1 4177424 0
2 4177422 0
3 4177426 0
4 4177426 1
5 4177426 2
6 4177425 0
7 4177427 0
8 4177427 1
9 4177427 2
for each repeating value of cm_number its incresing by 1.
but i wan to change "--block1 to --block2" in "FORALL". i did this but i m nt getting o/p is incresing value of ln_itm.
kindly help me...
code after changed to "FORALL"
CREATE OR REPLACE PROCEDURE BULK_COLLCT_PASS
AS
TYPE VAR_TYP IS VARRAY (32767) OF VARCHAR2 (32767);
V_DSH_CM_NUMBER VAR_TYP;
V_DSH_DATE VAR_TYP;
V_DSH_TIME VAR_TYP;
V_DSD_CM_NUMBER VAR_TYP;
V_PLU_CODE VAR_TYP;
V_DSD_DATE VAR_TYP;
V_str_id VAR_TYP;
LN_ITM NUMBER:=0;
str_id number := 30001;
CURSOR CUR_DBMG_SAL_HEAD
IS
SELECT DSH.CM_NUMBER,D_DSH_CM_DATE, D_DSH_CM_TIME
FROM DBMG_SAL_HEAD DSH
WHERE ROWNUM<6;
BEGIN
OPEN CUR_DBMG_SAL_HEAD;
LOOP
FETCH CUR_DBMG_SAL_HEAD BULK COLLECT
INTO V_DSH_CM_NUMBER,
V_DSH_DATE,
V_DSH_TIME;
FOR indx IN V_DSH_CM_NUMBER.FIRST .. V_DSH_CM_NUMBER.LAST
LOOP
SELECT CM_NUMBER, PLU_CODE,V_DSH_DATE(indx)
BULK COLLECT
INTO V_DSD_CM_NUMBER, V_PLU_CODE,V_DSD_DATE
FROM DBMG_SAL_DETL DSD
WHERE DSD.CM_NUMBER = V_DSH_CM_NUMBER(indx);
--block1
/*Ln_Itm := 0;
FOR ind IN 1..V_DSD_CM_NUMBER.COUNT
loop
INSERT INTO PC_ALL_TAB
VALUES(V_DSH_CM_NUMBER(indx),
V_DSD_DATE(ind),
V_DSD_CM_NUMBER(ind),
V_PLU_CODE(ind),
LN_ITM,
str_id
LN_ITM := LN_ITM +1;
end loop; */
FORALL ind IN 1..V_DSD_CM_NUMBER.COUNT
INSERT INTO PC_ALL_TAB
VALUES(V_DSH_CM_NUMBER(indx),
V_DSD_DATE(ind),
V_DSD_CM_NUMBER(ind),
V_PLU_CODE(ind),
LN_ITM,
str_id
LN_ITM := LN_ITM +1;
--block2
END LOOP;
EXIT WHEN CUR_DBMG_SAL_HEAD%NOTFOUND;
END LOOP;
commit;
CLOSE CUR_DBMG_SAL_HEAD;
DBMS_OUTPUT.PUT_LINE('COMPLETE..!');
END ;
o/p :- SELECT DSH_CM_NUMBER, LN_ITM FROM PC_ALL_TAB;
DSH_CM_NUMBER LN_ITM
1 4177424 0
2 4177422 1
3 4177426 2
4 4177426 2
5 4177426 2
6 4177425 3
7 4177427 4
8 4177427 4
9 4177427 4
I need result as below...but using "FORALL"
DSH_CM_NUMBER LN_ITM
1 4177424 0
2 4177422 0
3 4177426 0
4 4177426 1
5 4177426 2
6 4177425 0
7 4177427 0
8 4177427 1
9 4177427 2Double post
How to increment value using "FORALL" instead of for loop -
Hi Experts,
i am doing one smart form and for fetching some data my select query follows
SELECT a~matnr
a~bdmng
a~meins
a~charg
b~maktx
INTO TABLE gt_resb_makt
FROM resb AS a INNER JOIN makt AS b
ON amatnr = bmatnr.
IF gt_resb_makt[] IS NOT INITIAL.
SELECT objek
atwrt
atinn
FROM ausp
INTO TABLE gt_ausp
FOR ALL ENTRIES IN gt_resb_makt
WHERE objek = gt_resb_makt-charg
AND atinn = 'LOBM_VFDAT'
AND atinn = 'LOBM_QNDAT'.
But i am getting error like objek and charg should same length but both ate char type 10 char and 50 char
according to spec only i had written that query
please help me and figure out the mistake how to proceed
Thanks,
Divyahi,
instead of this select
SELECT objek
atwrt
atinn
FROM ausp
INTO TABLE gt_ausp
FOR ALL ENTRIES IN gt_resb_makt
WHERE objek = gt_resb_makt-charg
AND atinn = 'LOBM_VFDAT'
AND atinn = 'LOBM_QNDAT'.
insert the following lines.
data: begin of gt_resb_makt_temp occurs 0.
include structure gt_resb_makt.
data: charg1 like ausp-objek,
end of gt_resb_makt_temp.
if not gt_resb_makt[] is initial.
loop at gt_resb_makt.
gt_resb_makt_temp = gt_resb_makt.
gt_resb_makt_temp-charg1 = gt_resb_makt-charg.
append gt_resb_makt_temp.
clear gt_resb_makt_temp.
endloop.
SELECT objek
atwrt
atinn
FROM ausp
INTO TABLE gt_ausp
FOR ALL ENTRIES IN gt_resb_makt
WHERE objek = gt_resb_makt-charg1
AND atinn = 'LOBM_VFDAT'
AND atinn = 'LOBM_QNDAT'.
endif.
Regards,
Sailaja. -
Creation of triggers using CFQUERY tag is giving error
Hi,
I am creating triggers and stored procedure on ORACLE data
base using <CFQUERY>.
<CFQUERY DATASOURCE="CRM">
create or replace trigger AWC_ACCOUNTINGPERIODSID_TRI
before insert on AWC_ACCOUNTINGPERIODS
for each row
begin
select AWC_ACCOUNTINGPERIODSID_SEQ.nextval into :new.AP_ID
from dual;
end;
</CFQUERY>
But the created trigger is not compiled, it is giving the
following error
"Line # = 1 Column # = 6 Error Text = PLS-00103: Encountered the
symbol "" when expecting one of the following: begin case declare
exit for goto if loop mod null pragma raise return select update
while with <an identifier> << close current delete
fetch lock insert open rollback savepoint set sql execute commit
forall merge pipe The symbol "" was ignored."
If I edit that trigger in enterprise manager console by
pressing space and compile that, it is working fine with out any
error. If i run the above statement in sql *plus, It is working
fine with out any error. Can you please tell me why this is
happening if i run it using cfquery tag and also the possible
solutions.
Thanks in advance,
VinodI can't tell you why your particular trigger is failing, but
here is some "typical" reasons from Oracle's metalink.
Common reasons for PLS-00103
Error Summary
PLS-00103 Encountered the symbol "%s" when expecting one of
the following (Oerr
LS.103)
Error Details
~~~~~~~~~~~~~
Error: PLS-00103
Text: Encountered the symbol "%s" when expecting one of the
following:
Cause: This error message is from the parser. It found a
token
(language element) that is inappropriate in this context.
Action: Check previous tokens as well as the one given in the
error message. The line and column numbers given in the
error
message refer to the end of the faulty language construct.
PLS-00103 errors can often be difficult to localize what the
error is so here are some
common reasons for PLS-00103 errors..
A very common reason for PLS-00103 is when a reserved word is
used, with a reserved word
means words that names an oracle object or a built in
procedure, for example MOD, ABS,
TABLE, VIEW etc..
When trying to use SQL*PLUS commands in PL/SQL procedures,
like SPOOL, SET and other
commands that belongs to SQL*PLUS can result in this error.
Using parameter declaration at the IN/OUT clause in a
procedure, this works in versions
prior to 8.0.4, but it just ignored the declaration.
Using DDL commands in PL/SQL will fail in PLS-00103, the way
to use DDL commands is
to build a procedure in dynamic sql.
When creating package specification and a package body, a
PLS-00103 error will occur
if there is no slash, '/', after the package specification.
Phil -
ORA 04030 Out of process memory error
Dear experts,
I know there are multiple discussions around this error and I have been reading through most of them in the past one week or so, but looks like we are running out of options or are missing the color altogether. Ok, we are getting ORA-04030 - out of process memory while allocating....while one of our batch process runs in the night. It simply tries to insert/update to a table. Our installation is 11.2.0.1.0 with no RAC configuration and on 64-bit AIX having 6 cores, 12 CPUs and 16 GB memory.
We have checked the Workarea_Size_Policy is set to be as Auto so Oracle decides how much memory to allocate to PGA automatically on run-time based on the demand. And based on the AWR report it doesnt look like we are anywhere near the country having a PGA-deficit!! I am attaching the AWR report in a word document here for your reference.
Also attached below are the configurations and the ulimit values.
IKBTRN1> show parameter workarea;
NAME TYPE VALUE
workarea_size_policy string AUTO
oraipeikbtrn1:/home/oracle-> ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user) unlimited
Now, nothing seems to have contributed to the out of process memory issue from Oracle standpoint. I would be happy to be proved wrong here, if I am wrong.
So, whats going wrong here? A possible memory leak which we cannot zero down to, a OS memory limit or something else?
Seeking expert's advise on this, and also sincerely appreciate your time in looking at this.
Thanks.
P.S - I am pasting the whole AWR report since there is no 'upload file' option here that I can see.
WORKLOAD REPOSITORY report for
DB Name DB Id Instance Inst num Startup Time Release RAC
IKBTRN1 54659199 IKBTRN1 1 06-Jun-11 02:06 11.2.0.1.0 NO
Host Name Platform CPUs Cores Sockets Memory (GB)
oraipeikbtrn1.******.com AIX-Based Systems (64-bit) 12 6 16.00
Snap Id Snap Time Sessions Cursors/Session
Begin Snap: 5952 26-Aug-11 03:00:48 34 2.0
End Snap: 5953 26-Aug-11 04:00:52 32 1.9
Elapsed: 60.07 (mins)
DB Time: 1.93 (mins)
Report Summary
Cache Sizes
Begin End
Buffer Cache: 1,056M 704M Std Block Size: 8K
Shared Pool Size: 3,456M 3,456M Log Buffer: 7,184K
Load Profile
Load Profile
Per Second Per Transaction Per Exec Per Call
DB Time(s): 0.0 2.0 0.02 0.02
DB CPU(s): 0.0 0.5 0.00 0.00
Redo size: 556.1 34,554.8
Logical reads: 151.4 9,407.6
Block changes: 1.9 119.8
Physical reads: 14.2 882.6
Physical writes: 9.5 590.4
User calls: 1.8 112.8
Parses: 1.5 93.7
Hard parses: 0.1 8.9
W/A MB processed: -0.1 -6.9
Logons: 0.0 1.6
Executes: 1.9 115.4
Rollbacks: 0.0 0.0
Transactions: 0.0
Instance Efficiency Percentages (Target 100%)
Buffer Nowait %: 100.00 Redo NoWait %: 100.00
Buffer Hit %: 96.63 In-memory Sort %: 99.97
Library Hit %: 95.68 Soft Parse %: 90.49
Execute to Parse %: 18.74 Latch Hit %: 100.00
Parse CPU to Parse Elapsd %: 57.23 % Non-Parse CPU: 86.28
Shared Pool Statistics
Begin End
Memory Usage %: 85.72 85.76
% SQL with executions>1: 93.91 96.66
% Memory for SQL w/exec>1: 89.07 87.04
Top 5 Timed Foreground Events
Event Waits Time(s) Avg wait (ms) % DB time Wait Class
DB CPU 29 24.66
db file scattered read 3,456 17 5 14.92 User I/O
db file sequential read 4,304 17 4 14.77 User I/O
direct path read temp 764 17 22 14.31 User I/O
direct path write temp 259 5 21 4.70 User I/O
Host CPU (CPUs: 12 Cores: 6 Sockets: )
Load Average Begin Load Average End %User %System %WIO %Idle
1.39 1.37 0.2 0.2 0.2 99.6
Instance CPU
%Total CPU %Busy CPU %DB time waiting for CPU (Resource Manager)
0.1 20.5 0.0
Memory Statistics
Begin End
Host Mem (MB): 16,384.0 16,384.0
SGA use (MB): 4,704.0 4,352.0
PGA use (MB): 196.1 188.4
% Host Mem used for SGA+PGA: 29.91 27.71
Main Report
• Report Summary
• Wait Events Statistics
• SQL Statistics
• Instance Activity Statistics
• IO Stats
• Buffer Pool Statistics
• Advisory Statistics
• Wait Statistics
• Undo Statistics
• Latch Statistics
• Segment Statistics
• Dictionary Cache Statistics
• Library Cache Statistics
• Memory Statistics
• Streams Statistics
• Resource Limit Statistics
• Shared Server Statistics
• init.ora Parameters
Back to Top
Wait Events Statistics
• Time Model Statistics
• Operating System Statistics
• Operating System Statistics - Detail
• Foreground Wait Class
• Foreground Wait Events
• Background Wait Events
• Wait Event Histogram
• Wait Event Histogram Detail (64 msec to 2 sec)
• Wait Event Histogram Detail (4 sec to 2 min)
• Wait Event Histogram Detail (4 min to 1 hr)
• Service Statistics
• Service Wait Class Stats
Back to Top
Time Model Statistics
• Total time in database user-calls (DB Time): 115.9s
• Statistics including the word "background" measure background process time, and so do not contribute to the DB time statistic
• Ordered by % or DB time desc, Statistic name
Statistic Name Time (s) % of DB Time
sql execute elapsed time 101.69 87.75
DB CPU 28.58 24.66
parse time elapsed 10.14 8.75
hard parse elapsed time 9.92 8.56
failed parse elapsed time 4.92 4.25
hard parse (sharing criteria) elapsed time 4.27 3.68
connection management call elapsed time 0.42 0.36
PL/SQL compilation elapsed time 0.34 0.30
PL/SQL execution elapsed time 0.18 0.15
sequence load elapsed time 0.00 0.00
repeated bind elapsed time 0.00 0.00
DB time 115.88
background elapsed time 86.01
background cpu time 5.06
Back to Wait Events Statistics
Back to Top
Operating System Statistics
• *TIME statistic values are diffed. All others display actual values. End Value is displayed if different
• ordered by statistic type (CPU Use, Virtual Memory, Hardware Config), Name
Statistic Value End Value
NUM_LCPUS 0
NUM_VCPUS 0
AVG_BUSY_TIME 1,260
AVG_IDLE_TIME 360,705
AVG_IOWAIT_TIME 534
AVG_SYS_TIME 483
AVG_USER_TIME 679
BUSY_TIME 16,405
IDLE_TIME 4,329,811
IOWAIT_TIME 7,284
SYS_TIME 7,092
USER_TIME 9,313
LOAD 1 1
OS_CPU_WAIT_TIME 503,900
PHYSICAL_MEMORY_BYTES 17,179,869,184
NUM_CPUS 12
NUM_CPU_CORES 6
GLOBAL_RECEIVE_SIZE_MAX 1,310,720
GLOBAL_SEND_SIZE_MAX 1,310,720
TCP_RECEIVE_SIZE_DEFAULT 16,384
TCP_RECEIVE_SIZE_MAX 9,223,372,036,854,775,807
TCP_RECEIVE_SIZE_MIN 4,096
TCP_SEND_SIZE_DEFAULT 16,384
TCP_SEND_SIZE_MAX 9,223,372,036,854,775,807
TCP_SEND_SIZE_MIN 4,096
Back to Wait Events Statistics
Back to Top
Operating System Statistics - Detail
Snap Time Load %busy %user %sys %idle %iowait
26-Aug 03:00:48 1.39
26-Aug 04:00:52 1.37 0.38 0.21 0.16 99.62 0.17
Back to Wait Events Statistics
Back to Top
Foreground Wait Class
• s - second, ms - millisecond - 1000th of a second
• ordered by wait time desc, waits desc
• %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
• Captured Time accounts for 78.2% of Total DB time 115.88 (s)
• Total FG Wait Time: 62.08 (s) DB CPU time: 28.58 (s)
Wait Class Waits %Time -outs Total Wait Time (s) Avg wait (ms) %DB time
User I/O 8,949 0 56 6 48.74
DB CPU 29 24.66
System I/O 1,916 0 3 1 2.18
Other 506 88 1 2 0.92
Configuration 2 50 1 500 0.86
Commit 37 0 1 18 0.56
Application 20 0 0 17 0.29
Network 4,792 0 0 0 0.01
Concurrency 1 0 0 0 0.00
Back to Wait Events Statistics
Back to Top
Foreground Wait Events
• s - second, ms - millisecond - 1000th of a second
• Only events with Total Wait Time (s) >= .001 are shown
• ordered by wait time desc, waits desc (idle events last)
• %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Event Waits %Time -outs Total Wait Time (s) Avg wait (ms) Waits /txn % DB time
db file scattered read 3,456 0 17 5 59.59 14.92
db file sequential read 4,304 0 17 4 74.21 14.77
direct path read temp 764 0 17 22 13.17 14.31
direct path write temp 259 0 5 21 4.47 4.70
control file sequential read 1,916 0 3 1 33.03 2.18
ADR block file read 38 0 1 28 0.66 0.92
log buffer space 2 50 1 500 0.03 0.86
log file sync 37 0 1 18 0.64 0.56
enq: RO - fast object reuse 14 0 0 24 0.24 0.29
local write wait 44 0 0 1 0.76 0.03
SQL*Net message to client 4,772 0 0 0 82.28 0.01
Disk file operations I/O 110 0 0 0 1.90 0.00
ADR block file write 7 0 0 0 0.12 0.00
SQL*Net message from client 4,773 0 15,396 3226 82.29
Streams AQ: waiting for messages in the queue 720 100 3,600 5000 12.41
Back to Wait Events Statistics
Back to Top
Background Wait Events
• ordered by wait time desc, waits desc (idle events last)
• Only events with Total Wait Time (s) >= .001 are shown
• %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Event Waits %Time -outs Total Wait Time (s) Avg wait (ms) Waits /txn % bg time
control file sequential read 4,950 0 35 7 85.34 40.74
control file parallel write 1,262 0 31 25 21.76 36.46
log file parallel write 383 0 4 10 6.60 4.37
db file parallel write 627 0 2 3 10.81 2.36
change tracking file synchronous read 56 0 2 34 0.97 2.21
os thread startup 17 0 1 88 0.29 1.74
ADR block file read 135 0 1 7 2.33 1.04
change tracking file synchronous write 56 0 1 15 0.97 0.98
SGA: allocation forcing component growth 8 100 1 100 0.14 0.93
db file sequential read 112 0 1 6 1.93 0.75
process diagnostic dump 94 0 0 1 1.62 0.09
ADR block file write 92 0 0 1 1.59 0.07
LGWR wait for redo copy 11 0 0 1 0.19 0.01
log file sync 2 0 0 3 0.03 0.01
ADR file lock 92 22 0 0 1.59 0.01
Parameter File I/O 24 0 0 0 0.41 0.01
direct path write 6 0 0 1 0.10 0.00
Disk file operations I/O 54 0 0 0 0.93 0.00
rdbms ipc message 17,637 97 61,836 3506 304.09
Streams AQ: waiting for time management or cleanup tasks 5 60 11,053 2210602 0.09
DIAG idle wait 7,203 100 7,203 1000 124.19
PX Idle Wait 1,802 100 3,604 2000 31.07
pmon timer 1,212 99 3,603 2973 20.90
Space Manager: slave idle wait 726 99 3,603 4963 12.52
smon timer 12 100 3,600 300004 0.21
Streams AQ: qmn slave idle wait 128 0 3,583 27993 2.21
Streams AQ: qmn coordinator idle wait 256 50 3,583 13996 4.41
SQL*Net message from client 293 0 2 5 5.05
Back to Wait Events Statistics
Back to Top
Wait Event Histogram
• Units for Total Waits column: K is 1000, M is 1000000, G is 1000000000
• % of Waits: value of .0 indicates value was <.05%; value of null is truly 0
• % of Waits: column heading of <=1s is truly <1024ms, >1s is truly >=1024ms
• Ordered by Event (idle events last)
% of Waits
Event Total Waits <1ms <2ms <4ms <8ms <16ms <32ms <=1s >1s
ADR block file read 173 80.3 5.2 2.3 5.8 1.7 4.6
ADR block file write 99 96.0 3.0 1.0
ADR file lock 102 100.0
Disk file operations I/O 165 100.0
LGWR wait for redo copy 11 90.9 9.1
Parameter File I/O 24 100.0
SGA: allocation forcing component growth 8 100.0
SQL*Net break/reset to client 6 100.0
SQL*Net message to client 4992 100.0
SQL*Net more data from client 20 100.0
asynch descriptor resize 541 100.0
change tracking file synchronous read 56 83.9 1.8 14.3
change tracking file synchronous write 56 80.4 7.1 1.8 10.7
control file parallel write 1262 80.3 1.7 .6 .6 .8 1.3 14.7
control file sequential read 6866 94.1 .9 .7 .7 .3 .4 2.9
db file parallel write 628 94.3 2.1 1.0 .8 .3 .3 1.3
db file scattered read 3457 72.6 7.2 5.4 6.9 5.7 .5 1.6
db file sequential read 4525 78.7 2.7 1.8 9.6 5.3 .4 1.5
direct path read temp 764 40.2 18.6 9.4 6.2 11.0 5.8 8.9
direct path sync 1 100.0
direct path write 6 83.3 16.7
direct path write temp 259 .4 1.2 88.8 .4 9.3
enq: RO - fast object reuse 14 42.9 42.9 7.1 7.1
latch free 1 100.0
latch: cache buffers lru chain 2 100.0
latch: checkpoint queue latch 2 100.0
latch: messages 2 100.0
latch: object queue header operation 2 100.0
latch: redo allocation 1 100.0
latch: row cache objects 1 100.0
local write wait 44 100.0
log buffer space 2 50.0 50.0
log file parallel write 383 92.4 .8 1.0 5.7
log file sync 39 82.1 2.6 2.6 12.8
os thread startup 17 100.0
process diagnostic dump 94 34.0 63.8 2.1
reliable message 7 100.0
utl_file I/O 12 100.0
DIAG idle wait 7204 100.0
PX Idle Wait 1802 100.0
SQL*Net message from client 5067 87.1 6.6 1.0 .5 .5 .1 .5 3.7
Space Manager: slave idle wait 726 .6 99.4
Streams AQ: qmn coordinator idle wait 256 49.2 .8 50.0
Streams AQ: qmn slave idle wait 128 100.0
Streams AQ: waiting for messages in the queue 721 100.0
Streams AQ: waiting for time management or cleanup tasks 5 40.0 20.0 40.0
class slave wait 17 100.0
pmon timer 1212 .9 99.1
rdbms ipc message 17.6K 1.8 .4 .2 .2 .1 .1 21.0 76.2
smon timer 12 100.0
Back to Wait Events Statistics
Back to Top
I couldnt add the rest of the report here since it is telling me I have exceeded 30000 characters. If you want to see the full report, please email me at [email protected]Unless your database is strictly a DSS-type of database, your AWR report exposes loads of issues with it. And I think none of the time during the AWR window was spent on database. Look at the DB time (with all those multi cores) compared with the elapsed time of the AWR.
As you are on 11g, why not make use of MEMORY_TARGET (a single parameter to manage both SGA and PGA)? If you are already on it, ignore this as I can't see it anywhere. If not, get rid of SGA_TARGET and PGA_AGGREGATE_TARGET and replace it with a single MEMORY_TARGET parameter. However you may have a minimum threshold set for different SGA pools so that they won't shrink beyond that point.
Having said that, setting MEMORY_TARGET is not a guarantee to avoid ORA-4030. Just a single bad PL/SQL code could go and exploit the untunable part of your process memory and even go and blow up the physical memory. If you are using FORALL and BULK load, see if you can cut it down into few chunks rather than running as a single process.
What does your V$PGASTAT say?
Maybe you are looking for
-
I have a PowerBook G4 with a Fantom Drive external hard drive. I have several FireWire peripherals, so I purchased an iogear GPF113 PC Card. I was running Panther and it was working with no problems. I just installed Tiger and now it won't even recgn
-
hi i have a string with multiple lines inside it eg. hello this is my string with mutiple lines inside it how could i get it to print out line by line iv used "\n" so it detects the new lines but it doesnt seem to work this is my following code that
-
Query regarding a report level variable
When I create a variable in webi report and in the variable formula when I use a universe measure object called Amount_Sold whose select contains an aggregate function like sum(shop_facts.Amount_Sold) in universe then my variable in webi report shoul
-
How do I connect my canon ip3400
I had to unplug my computer, printer, modem and router. I put it back together but now I can't print. I see the printer in the 'print dialog' showing the printed job, trying to connect, saying printer is not connected. What did I forgot to connect? I
-
Is it safe to delete installesd.dmg in mavericks?
Is it safe to delete installesd.dmg in mavericks? It takes up 5.3GBs and I'd like to free up the space.