PL/SQL :: XML Aggregate Function And Out Of Process Memory

Aug 8, 2012

I am getting most of the time 'out of process memory' when i run the 'ord' procedure.here i am providing the tables and the procedure.

i have 2 table orders which holds distinct values, and departments table has ordvalue column holds long string of values for a particular record from orders table. for example if the values in orders table as follows:

ord_code ord_level ordid ordstatus ord_num user utimestamp
SR11          1 2 A          101 V     SYSDATE
SR11          1 2 A          102 V     SYSDATE
SR11          1 2 A          103 V     SYSDATE
SR11          1 2 A          104 V     SYSDATE
SR11          1 2 A          105 V     SYSDATE
SR11          1 2 A          106 V     SYSDATE
SR11          1 1 B          101 R     SYSDATE
SR11          1 1 B          102 R     SYSDATE
SR11          1 1 B          103 R     SYSDATE
SR11          1 1 B          104 R     SYSDATE
SR11          1 1 B          105 R     SYSDATE
SR11          1 1 B          106 R     SYSDATE

ETC...
AT TABLE departments data will be like this

ord_code ord_level ordid ordstatus ord_num user utimestamp
SR11          1 2 A          101,102,103,104,105,106 V sysdate
SR11          1 2 B          101,102,103,104,105,106 R sysdate

from the get_ord procedure the data aggreates using the xmlelement and gets as a long string value into departments table of ord_num column.

CREATE TABLE test.orders
(
ord_CODE VARCHAR2(4 BYTE) NOT NULL,
ord_LEVEL VARCHAR2(1 BYTE) NOT NULL,
ordID NUMBER(5) NOT NULL,
ordstatus VARCHAR2(1 BYTE) NOT NULL,
ord_num NUMBER(3) not null,
user VARCHAR2(8 BYTE),
UTIMESTAMP DATE
[code]...

View 0 Replies


ADVERTISEMENT

TimesTen In-Memory :: Process Of Initialization Of Database Into Memory

May 23, 2013

Can i know the internal process of initialization of DB into memory in timesten , when a new connection is establishing? Will timesten create tables and indexes in RAM when first connection is established if the RAM policy is default?

want to know the internal functional flow of timesten when any command is fired against it.

View 3 Replies View Related

Ratio Between Global Memory Bound And Aggregate PGA Auto Target?

Aug 5, 2013

SQL> select name,decode(unit,'bytes',value/1024/1024,value) as mb from v$pgastat; NAME                                                                     MB---------------------------------------------------------------- ----------aggregate PGA target parameter                                        25600aggregate PGA auto target                                        2724.14648global memory bound                                                    1024total PGA inuse                                                  22601.7333total PGA allocated                                              26653.6230maximum PGA allocated                                           

[code]....

I understand I have soft limit( aggregate PGA target parameter) which was overlimited (maximum PGA allocated = 35374.4638) hence we have over allocation count>0.Extra bytes read/written=13GB,hence we have excessive 13Gb that we had to flush on disk(excessive I/O operations) cause of limitation in 1024MB(global memory bound)(it's not enough to join or to sort something so we must do onepassor multipass) ,which defines the size of single operation of sort or  join(so does it mean that it's some kind of sort_area_size and hash_area_size for automatic workarea_size_policy? and in this case what about _smm_max_size?)aggregate PGA auto target - is the amount of space(total) that Oracle can give for work areas running in automatic mode.

So I can't understand ratio between global memory bound and aggregate PGA auto target - why does the aggregate PGA auto target such tiny?(relatively process count)?Is the global memory bound static for particular aggregate PGA target parameter?

I can change it only by redefining aggregate PGA target parameter?What would be with aggregate PGA auto target if I started 10 sort operation and each of them takes about 1Gb of memory.How huge it would be? 10Gb?

View 4 Replies View Related

SQL & PL/SQL :: List Function (Aggregate)

Dec 13, 2010

I have one table emp with columns id , name and dept. i want query to get the list like this........

ID name did
1 ajay 10,30,40,60
2 sree 10,30,70

View 7 Replies View Related

Aggregate Function - Combine Results

Nov 24, 2009

I have a query more or less like this:

SELECT field1,
COUNT(x) AS COUNT
FROM my_table
GROUP BY field1;

For field1 I want to get a count, but if field1 is like 'ABC%' then I want to combine all of those.

So if I have the following:
ABC1 | 5
ABC2 | 10
XYZ1 | 3

I want results like this:
ABC | 15
XYZ1 | 3

I've tried using some case statements like

SELECT CASE
WHEN field1 LIKE 'ABC%' THEN
'ABC'
ELSE
field1
END AS field1,
COUNT(x) AS COUNT
FROM my_table
GROUP BY CASE
WHEN field1 LIKE 'ABC%' THEN
'ABC'
ELSE
field1
END;

but this just gives me
ABC | 5
ABC | 10
XYZ1 | 3

How can I combine record 1 and 2 from the last record set example above?

View 4 Replies View Related

SQL & PL/SQL :: How To Write Analytic Function Without Aggregate

Mar 8, 2012

Do we have analytic function equivalent of following?

select object_type,owner from dba_objects group by object_type,owner ;

I am trying to get a unique srno for a combination of a 2 fields - here object_type and owner

OWNEROBJECT_TYPESRNO
SYSVIEW1
SYSTABLE2
SYSPROCEDURE3
SYSTEMVIEW4
SYSTEMTABLE5
SYSTEMFUNCTION6
SYSTEMPROCEDURE7
SCOTTTABLE8
SCOTTVIEW9
.......................

also how can I get the SRNO?

I can' use sequence in the group by function and if I get equivalent analytic for above group by even then I can't write row_number as the order by gives detail record

I don't want to wrap this select inside other select

View 4 Replies View Related

Replication :: ORA-04030 - Out Of Process Memory

Apr 4, 2008

i created a materialized view, and whenever i try to refresh data, using the following package(dbms_mview.refresh), im getting the ORA-04030 error

ORA-12008: error in materialized view refresh path
ORA-04030: out of process memory when trying to allocate 1052696 bytes (callheap,kllcqas:kllsltba)

As far as i know, there no shortage of ram in this machine, im not sure what is causing this error, Then i tried to do a bulk insert using a "INSERT /*+ APPEND */ " in a package, when i execute it, im getting the same error again.

exec M_GET_FACILITIES_DETAILS.GET_AUTOFINANCE_HP_DETAILS('29-Feb-2008');

ORA-04030: out of process memory when trying to allocate 1052696 bytes (callheap,kllcqas:kllsltba)

The number of records im trying to insert is around 600,000, but if i try to repeat the same process with 50000 records, it works fine. i Actually is there any oracle parameter i need to change, cause im afraid if i do that, later in production, it might effect some other modules.

View 1 Replies View Related

Find The Process ID Which Is Hogging CPU / Memory?

Nov 17, 2012

Trying to find the Process ID which is hogging CPU/Memory

$ ps -e -o pcpu,pid,user,tty,args |grep -i oracle|sort -n -k 1 -r|head

here , this works well ..

TOP 10 PROCESSES CONSUMING MOST CPU

$ watch ps -e -o pcpu,pid,user,args |sort -k 1 -n -r | head -10

this is not working ... always i am getting following output

QUOTE x processes w/o controlling ttys t by tty
*********** output format ********** *********** long options ***********
-o,o user-defined -f full --Group --User --pid --cols --ppid
-j,j job control s signal --group --user --sid --rows --info
-O,O preloaded -o v virtual memory --cumulative --format --deselect
-l,l long u user-oriented --sort --tty --forest --version
-F extra full X registers --heading --no-heading --context
********* misc options *********
-V,V show version L list format codes f ASCII art forest
-m,m,-L,-T,H threads S children in sum -y change -l format
-M,Z security data c true command name -c scheduling class
-w,w wide output n numeric WCHAN,UID -H process hierarchy

View 4 Replies View Related

Out Of Process Memory Error When Upgrading From Oracle 9.2.0.8 To 11.2.0.2

Apr 7, 2012

I got the following error when upgrading from Oracle 9.2.0.8 to Oracle 11.2.0.2 version using catupgrd.sql script.

=================================================================
CREATE OR REPLACE PACKAGE BODY kupm$mcp wrapped
*
ERROR at line 1:
ORA-00603: ORACLE server session terminated by fatal error
ERROR:
ORA-03114: not connected to ORACLE

SP2-1519: Unable to write to the error log table sys.registry$error
ORA-04030: out of process memory when trying to allocate 8392728 bytes (pga
heap,redo read buffer)
ORA-04030: out of process memory when trying to allocate 8392728 bytes (pga
heap,redo read buffer)
ORA-04030: out of process memory when trying to allocate 8168 bytes
(callheap,kcbtmal allocation)
Process ID: 81984
Session ID: 1 Serial number: 5

==========================================================

My machine environment is:

UNIX AIX 5.3 level 12
Oracle 11.2.0.2
RAM size 2GB
ulimit settings:
> ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 131072
stack(kbytes) 32768
memory(kbytes) unlimited
coredump(blocks) 2
nofiles(descriptors) unlimited

Currently i tried to increase SGA & PGA to possible extent, but still getting this error? Is there any change required in ulimit, RAM etc?

View 1 Replies View Related

Server Administration :: ORA-04030 / Out Of Process Memory

Dec 27, 2011

I am facing this problem continuously from last 1 week on my production oracle database.I have performed all kind of changes on parameter but still am getting this error.

Oracle version -> 11g
O/S -> windows server 2003
RAM -> 11 GB
#########################INIT CONFIG###################
convdb.__db_cache_size=536870912
convdb.__java_pool_size=10485760
convdb.__large_pool_size=4194304

[code].....

View 5 Replies View Related

ORA-04030 / Out Of Process Memory When Trying To Allocate 16408 Bytes

Jul 29, 2011

I have a stored procedure which uses BULK COLLECT and the table has 16 nested tables within it. When I limit the number of rows processed it works fine, if I let it run with all the 10,000 rows I get this:

ERROR: ORA-04030: out of process memory when trying to allocate 16408 bytes
(koh-kghu call ,pmuccst: adt/record)

sga_max_size - 12884901888
sga_target - 10737418240
pga_aggregate_target - 838860800
shared_pool_size - 2147483648

I believe the machine has 32GB memory, but there is another Oracle instance running on it.

View 1 Replies View Related

PL/SQL :: How Database Handles Record Locking When Aggregate Function Called

Jul 17, 2012

how the DB handles record locking when an aggregate function is called? For instance:

...
select count(*)
into   v_count
from   x;

...Is there a lock maintained on table x for the duration of the transaction so no rows can be inserted or deleted?

View 4 Replies View Related

Performance Tuning :: How To Determine Memory Usage For A Function

Jul 24, 2013

determine if a function is worth pinning in memory? I want to come up with a percentage, implying that if the function is already im memory 80%+ of the time then it is not worth it.

View 5 Replies View Related

Server Administration :: Settings Infringe On Any Available Memory On System That Is Already Tight On Memory?

Jul 25, 2012

I have the following setup

SQL> show parameter sga;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 3G
sga_target big integer 2G

from what I read I beleive this will initially grab 2GB of memory on startup and will grab up to to 3GB of memory total for the SGA. The "total" memory can be allocated to different peices of the SGA when needed but will never exceed 3GB. Is this correct or would these settings infringe on any available memory on a system that is already tight on memory?

Secondly, what happens if both these values are set to the same value?

View 8 Replies View Related

SQL & PL/SQL :: Aggregate Between Two Dates

Jul 13, 2010

I need to aggregate the data based the two dates criteria.

I have two tables

1. Table1
Number Date1 Date2
1 10-Jun-2010 30-Jun-2010
2 10-Feb-2010 30-Feb-2010
----------------------------------
2. Table2
Number Date Revenue
1 11-Jun-2010 100
1 09-Jun-2010 100
1 12-Jun-2010 100
2 11-Feb-2010 100
2 12-Feb-2010 100
2 13-Feb-2010 100
......................
......................
So on

Output:

Number Revenue Date2
1 200 30-Jun-2010
2 300 30-Feb-2010

View 14 Replies View Related

Aggregate Two Columns

Oct 25, 2011

I have two table and I want to merge them

TERMS_TABLE
ID | TERMS
309 | 'hardware'
309 | 'software'
309 | 'computer'

TFIDF_TABLE
ID | TERMS
309 |'computer,phone,mp3....'

Now I want to add TERMS column of TERMS_TABLE to terms column of TFIDF_TABLE but If TFIDF_TABLE already contains TERMS of TERMS_TABLE then I should not insert this term to the NEW_TFIDF_TABLE , like that

result should be:

NEW_TFIDF_TABLE
ID | TERMS
309 |'computer,phone,mp3....,hardware,software'

How can I do that ?

View 1 Replies View Related

Tuning Aggregate Queries?

May 1, 2011

I have performance problem with 7 queries involving groupby clauses in OLAP database.These are queries triggered during siebel DAC run

kumar[size="4"][/size][color="#0000FF"][/color]kumardba

View 5 Replies View Related

SQL & PL/SQL :: Aggregate Functions On A Join

Nov 7, 2012

I am trying to Show all Customers (custId, last name, first name) who bought cars at the Arctic AND Pacific branches and Order it by CustId.

These are the tables:

VIN CARTYP BRNAME BUYERID SALEDATE
------- ------ ---------- ---------- -----------
1JJ0001 CT9015 Arctic
1NN0001 CT9014 Arctic 10010 18-mar-2012
1PP0001 CT7013 Arctic 10007 25-sep-2012
1QQ0001 CT7012 Atlantic 10014 22-dec-2009
1RR0001 CT7011 College 10013 30-sep-2012
2JJ0001 CT9015 Pacific
2NX0001 CT9014 Pacific
2PP0001 CT7013 Arctic
2QQ0001 CT7012 Arctic

[Code]...

CUSTID LNAME FNAME BALANCE_DUE
---------- ------------ ------- -----------
10001 Disney Daisy 9000.5
10010 Dupont Caryn 40000
10006 Gordon Diane 75000.5
10005 Gordon Tracy 3000.25
10013 Gross Henry 50000
10015 Hilton Kate 40000
10011 Lea Diane 12000
10003 Lopez Athena

[Code]...

No matter how I write the query, I get the message that no rows have been selected.

View 3 Replies View Related

SQL & PL/SQL :: De-Aggregate Year To Date Figures?

Apr 27, 2011

I have a table as below:

Year Month Value
2011 01 15
2011 02 26
2011 03 34

[code]...

The value is an aggregate Year to Date Figure And I was wondering what the best method of splitting this data out into a Monthly Figure so that it would look like below:

Year Month Mth Value
2011 01 15
2011 02 11
2011 03 8
2011 04 9

[code]...

View 9 Replies View Related

SQL & PL/SQL :: Aggregate Contiguous Range Of Days?

Oct 21, 2010

I intend to get for every client the start date and end of a contiguous range of days. Example for the same client have two records, in the first goes from day 1 to day 5 and the second from day 3 to day 9, i intend to get a record for this client where indicated that the start date is on day 1 and ending on Day 9.

SELECT 123 as CLI_ID, TO_DATE('20100101', 'YYYYMMDD') as DT_START, TO_DATE('20100105', 'YYYYMMDD') as DT_END FROM DUAL UNION
SELECT 123 as CLI_ID, TO_DATE('20100208', 'YYYYMMDD') as DT_START, TO_DATE('20100321', 'YYYYMMDD') as DT_END FROM DUAL UNION
SELECT 123 as CLI_ID, TO_DATE('20100219', 'YYYYMMDD') as DT_START, TO_DATE('20100228', 'YYYYMMDD') as DT_END FROM DUAL UNION
SELECT 123 as CLI_ID, TO_DATE('20100227', 'YYYYMMDD') as DT_START, TO_DATE('20100405', 'YYYYMMDD') as DT_END FROM DUAL UNION
SELECT 123 as CLI_ID, TO_DATE('20100901', 'YYYYMMDD') as DT_START, TO_DATE('20101013', 'YYYYMMDD') as DT_END FROM DUAL

Expected :

CLI_ID,DT_START,DT_END
123,01/01/2010,05/01/2010
123,08/02/2010,05/04/2010
123,01/09/2010,13/10/2010

View 2 Replies View Related

SQL & PL/SQL :: User-defined Aggregate Calculation For Z Score

Jun 29, 2011

I'm calculating a Z score based on some simple numerical data thus:

create table t (id number, val number);

insert into t values(1, 1795);
insert into t values(2, 1753);
insert into t values(3, 1743);
insert into t values(4, 1876);
insert into t values(5, 1848);

[Code] .....

the logic is quite simple - calculate a moving average over the previous 12 rows, and a stdev over the same window. Then subtract the prior row's moving average from the current value, and divide by the prior row's stdev.

The issue is I want to expose this logic in a BI tool (OBI EE v10g), meaning I can't use the nested analytic functions. How to achieve this logic in a single analytic pass? The sql above took about 2 minutes to write this morning, then I've spent all day looking at user-defined aggregate functions, but haven't even been able to get the first step, the moving average, working. I can understand that I can probably create an udaf to replicate the avg(val) over (order by id ROWS BETWEEN 11 PRECEDING AND 0 FOLLOWING) functionality, but I can't see how to bundle the logic for the other three steps in the calculation into this.

From what I've read, the ODCIAggregateMerge should allow me to combine different threads that can return the different values I need for the current row calculation. Is this correct?

The only example udafs I can find are either not relevant (STRAGG) or very simple (ie don't appear to invoke multiple passes). I've also had a look at the COLLECT function, but again I can't see a way to use this.

View 6 Replies View Related

SQL & PL/SQL :: Materialized View With Aggregate And FAST REFRESH

Feb 8, 2012

I'm trying to build up a materialized view with aggregate and FAST REFRESH for INSERT and UPDATE, DELETE with no success. But the web doesn't deny it ?

--build up needed schema objects

CREATE TABLE empt
( ename VARCHAR2(20),
empno INTEGER,

[Code]....

View 9 Replies View Related

SQL & PL/SQL :: SELECT Query For Displaying Aggregate Values?

Jul 1, 2011

i have table with following data.

yearquartersales Revenue
2004Q145678
2004Q287456
2004Q356732
2004Q4120986
2005Q12398
2005Q23900
2005Q36522
2005Q42763

I want the output in following way.tell me the select query for this

yearquarterSales Revenue
2004 Q145678
Q287456
Q356732
Q4120986
2004 total Sales310852
2005 Q12398

[code]....

View 4 Replies View Related

SQL & PL/SQL :: Maintaining Aggregate Column Data Integrity?

Jun 8, 2012

What is the best practices to maintain aggregate columns? Suppose I have the following 2 tables:

DROP TABLE TEST.ORDERS_DET_T;
DROP TABLE TEST.ORDERS_T;
CREATE TABLE TEST.ORDERS_T (
ID NUMBER NOT NULL PRIMARY KEY,
ORDER_CODE VARCHAR2(100) NOT NULL,

[code]....

I want the following test script to act int the way, described in comments. Basically this means that the sum of TEST.ORDERS_DET_T.ORDER_DET_SUMA must be equal to TEST.ORDERS_T.ORDER_SUMA after transaction commits.

INSERT INTO TEST.ORDERS_T(ID, ORDER_CODE, ORDER_SUMA) VALUES(1,'FRUITS',100);
INSERT INTO TEST.ORDERS_DET_T(ID, ORDERS_T_ID, ORDER_DET_CODE, ORDER_DET_SUMA) VALUES(2,1,'APPLES',40);
INSERT INTO TEST.ORDERS_DET_T(ID, ORDERS_T_ID, ORDER_DET_CODE, ORDER_DET_SUMA) VALUES(3,1,'PEAT',60);
COMMIT; --SHOULD BE OK, 40+60=100

[code]....

P.S. Creating views based on ORDERS_T and ORDERS_DET_T are not an option, if the user would still be allowed to modify data in tables (as in test scenarios). This is because of current business situation, where the client has 2 teams (outsourcing for back-office solution and insourcing for web solution) that are accessing/modifying the data in the same tables.

View 6 Replies View Related

SQL & PL/SQL :: Using Rank Clause With Window Aggregate Functions

Jan 5, 2012

I am trying to use RANK() clause with a window clause...is that possible to use both together?

like

select col1, col2, col3,
RANK() OVER (ORDER BY col3 desc RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) RK
from table t

but getting error in SQL Developer

ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"
*Cause:
*Action:

Error at Line: 2 Column: 33

The reason why i need to rank in window clause because i have data like this

Name Marks Quiz
Ali 10 1
John 20 1
Sara 30 1
John 40 2
Sara 50 2
Ali 20 2
...
...
and so on

I want to rank them based on their cumulative sum marks after every test..ranking should be in such a way that it should look current row and preceding rows

like this

Name Marks Quiz cumulative_marks rk
Ali 10 1 10 4
John 20 1 20 3
Sara 30 1 30 2
Peter 100 1 100 1
John 40 2 60 3 ==> becuase John has now third most overall cumulative marks (60) after quiz 2.
Sara 50 2 90 2 ==> becuase Sara has now 2nd most overall cumulative marks (90) after quiz 2.
Ali 20 2 30 4 ==> becuase Ali has now fouth most overall cumulative marks (30) after quiz 2.

View 11 Replies View Related

Reports & Discoverer :: How To Add Aggregate Functions Manually

Oct 30, 2010

i want to create a blood donor report, which consists of his profile, donations_n_tests details, donor_to_patient tracking. each is a different table which i have imported to the layout.

now the problem is that for the 1st ever layout that i make via the report builder wizard, it offers me to choose aggregate functions (like sum, cout, avg, etc). but for the rest of the tables that i import into this layout via ADDITIONAL LAYOUT OPTION (report block. it does not offer me these summary functions.

actually i can only configure aggrigate functions via the report layout wizard, perhaps report builder is not that friendly like form developer where we can put a display item set calculation mode to summary and specify the column for the aggregate function.

View 1 Replies View Related

Performance Tuning :: MEMORY-TARGET And MEMORY-MAX-TARGET?

Jan 15, 2011

I have a confusion with MEMORY_TARGET and MEMORY_MAX_TARGET parameter. if i set SGA_TARGET, SGA_MAX_SIZE along with MEMORY_TARGET and MEMORY_MAX_TARGET then how oracle will manage the memory? Because as per my understanding if we set MEM

View 3 Replies View Related

Server Administration :: Materialized Aggregate View Index?

Jun 27, 2012

When you create a MAV, you automatically get a hidden column and an index. Here's an example,drop user jon cascade;

grant dba to jon identified by jon;
conn jon/jon
create table emp as select * from scott.emp;
create materialized view mv1 enable query rewrite as
select deptno,sum(sal) from emp group by deptno;
select object_name,object_type from user_objects;
select index_name,column_name from user_ind_columns where table_name='MV1';
select column_name,hidden_column from user_tab_cols where table_name='MV1';
select deptno,"SUM(SAL)",sys_nc00003$ from mv1;

View 2 Replies View Related

SQL & PL/SQL :: PLS-00653 - Aggregate / Table Functions Not Allowed In Scope?

Jul 8, 2010

I have a function that returns the situation for one month for some database. I need to implement it in some report medium for one year. The one year function works ok.

My problem is when trying to make another function that runs the monthly function 12 times and that error is "PLS-00653: aggregate/table functions are not allowed in PL/SQL scope".am trying to get around some restrictions and somehow until this part things seem to be ok.

I tried to use a union with 12 blocks but it works very slow in the reporting environment and now i want to try to make another function that runs another function 12 times depending on the parameter.

here is the code (there might be some name misuse since i had to change the names of the original code -

CREATE OR REPLACE
FUNCTION anual(monthh in varchar2, year IN VARCHAR2)
return anual_REP_var PIPELINED is
BR anual_REP:=anual_REP(NULL,NULL, NULL,NULL);
contor INT(2);

[code]...

View 2 Replies View Related

Application Express :: Interactive Report - Aggregate Sum Color

Jul 19, 2012

In Interactive report, I want the sum of the column to be displayed in different colours if total is negative.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved