Sga_target vs sga_max_size
Hi,
I'm using ASMM and sga_target is set to 1000M.
the sga_max_size parameter should be have the same value as sga_target?
For example: what's happen if i set sga_max_size to 1200M ?
Thank's
Hi,
I think, that if you set sga_max_size to 1200M and you have SGA_target=1000M, then you could dynamicaly (without restarting instance) increase sga up to 1200M. SGA_MAX_SIZE is only about possibility to increase your sga and oracle DOESN'T allocate whole SGA_MAX_SIZE - it allocate only your sga_target.
You can test it by decreasing SGA_TARGET by command ALTER SYSTEM SET SGA_TARGET=800M SCOPE=MEMORY; and you can see that memory will be released. You can test it in other direction too - increase sga_target to 1200M and aditional memory will be allocated from free memory.
Pavel
Similar Messages
-
Need Clarification on sga_target and sga_max_size
HI,
I need some clarification in SGA_TARGET and SGA_MAX_SIZE.
I have the parameter like below.
SGA_MAX_SIZE=10G
SGA_TARGET=9G
And I spread the 9G to all components like (DB_CACHE,SHARE_POOL etc.,).
My doubt, Incase db need the memory more than 9GB, Whether it automatically take the extra 1G from sga_max_size
or we have to change the sga_target to 10G.Unless and untill, we set the sga_taget=10G, The extra 1G(from sga_max_size) is not used.
Am i correct?No - its wrong. Any change in the value of SGA_TARGET affects only the sizes of the auto-tuned components. If you increases its value then increased memory will be distributed in only among the components controlled. So, yes 1GB will be used, because have sga_max_size=10G. If you decrease the value then reduced memory is taken back by the auto-tuning policy from one or more of the auto-tuned components.
If SGA_MAX_SIZE is greater than SGA_TARGET, you can increase SGA_TARGET without restarting the instance. Otherwise, you'd need to shutdown and restart the instance if you wanted to increase SGA_TARGET.
Regards
Girish Sharma -
Diffrence Between SGA_TARGET and SGA_MAX_SIZE
Can Any one explain me what is the diference between
SGA_TARGET and SGA_MAX_SIZE
Thanks In Advance.sga_max_size -- This parameter sets the hard limit up to which sga_target can dynamically adjust sizes. At database start time, Oracle will allocate sga_max_size in RAM (or set sga_max_size to the sum of the existing pool sizes), so in order not to waste RAM it may be a good idea to have sga_max_size and sga_target at the same value, but there may be times when you want to have the capability to adjust for peak loads. By setting this parameter higher than sga_target, you allow dynamic adjustment of the sga_target parameter.
sga_target -- This parameter is new in Oracle Database 10g and reflects the total size of memory footprint a SGA can consume. It includes in its boundaries the fixed SGA and other internal allocations, the (redo) log buffers, the shared pool, Java pool, streams pool, buffer cache, keep/recycle caches, and if they are specified, the non-standard block size caches. -
WHAT WILL BE SGA_TARGET AND SGA_MAX_SIZE VALUE
HI ALL
RAM MEMORY 7360
swap memory 8704 M
OS--AIX6
DATABASE SIZE ---50 GB
WHAT WILL BE SGA_TARGET AND SGA_MAX_SIZE VALUEWHAT WILL BEThe values will be whatever you set them to be. OR sga_max_size will be automatically derived from db_cache_size + shared_pool_size + ............
yes, I know that you are looking for a "thumb-rule" and your question is "_What *should* be ..."_ You might get many answers.
The right answer is "what is really required based on the database, i/O pattern, concurrency etc
Hemant K Chitale -
Advice on sga_target and sga_max_size
hi,
a little abt my existing system
HP UX 11.11 oracle 10.2.0.4 EBS11.5.10
memory 4GB
SGA 2 GB
i will be increasing physical emory to 20GB today
i need advice on setting sga_target and sga_max_size
currently my SGA_MAX_SIZE=2GBIf you are increasing the physical memory then set the SGA_MAX_SIZE to max estimated size based on application usage and keep the SGA_TARGET to whatever value you have currently.
This helps to increase SGA dynamically (SGA_TARGET) when ever application needs and you no need to shutdown your database.
It is always advised to keep SGA_MAX_SIZE > SGA_TARGET.
Hope this helps.
Regards.
Satishbabu Gunukula
http://oracleracexpert.blogspot.com
[Click here to learn Install and Configure ASM in 10g|http://oracleracexpert.blogspot.com/2009/08/install-and-configure-asmlib-in-10g.html]
Edited by: Satishbabu Gunukula on Aug 21, 2009 12:20 PM -
Am I understanding SGA_TARGET and SGA_MAX_SIZE correctly?
Let's say I set SGA_MAX_SIZE to 1024MB and SGA_TARGET to 512MB.
As I understand it, this means that the total SGA size will never exceed 1024MB (that's the "hard cap"). Oracle will try to keep things around 512MB, but may burst up to 1024MB as needed.
Is that correct? Otherwise, I don't see the point of SGA_MAX_SIZE vs. SGA_TARGET.
BTW...I know MEMORY_TARGET and MEMORY_MAX_TARGET are the new 11g params, but Oracle ships XE with those turned off and the 10g SGA_* params and PGA_AGGREGATE_TARGET set...?Hi,
In Oracle 11g MEMORY_TARGET is for automatic SGA and PGA management.MEMORY_MAX_SIZE is the maximum size to which your MEMORY_TARGET can be allocated.As shown below:
SQL> show parameter %MEMORY%
NAME TYPE VALUE
hi_shared_memory_address integer 0
memory_max_target big integer 1G
memory_target big integer 1G
But,When it comes to managing various other memory component like shared_pool,large_pool,Db_buffer_cache,log_buffer_cache,java_pool we still have to manage SGA_TARGET.
SQL> show parameter %SGA%
NAME TYPE VALUE
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 1G
sga_target big integer 0
Best regards,
Rafi.
http://rafioracledba.blogspot.com/
Edited by: Rafi (Oracle DBA) on Jun 22, 2011 11:54 PM -
SGA_TARGET and SGA_MAX_SIZE?
Dear Professional,
I have been asked by my client, He wants me to install Oracle 11g software in three servers. One server has 16GB another has 32 GB, and another has 64 GB of RAM? What would be the Best swap size? How memory I need to assign to SGA? what will be the SHmax and Shmin, kernal parameter? Please advice..
Thanks
SagarThe answer is 16GB, for all the machines.
See here for reference:
Oracle Database Quick Installation Guide
Hope that helps,
-Mark -
SGA_MAX_SIZE and SGA_TARGET in Oracle 10G
We have the following H/W with Solaris 9
SPARC-IV 16 CPUs
32GB RAM
128GB swap
What is the optimal size of sga_target and sga_max_size that can be configured for a heavy batch processing oracle server. Nothing runs except oracle in the above server.
We have currently 3GB SGA size , however our heavy queries are very slow.
We have huge updates on tables with more than 200Millions rows.
Do we need to have JAVA_POOL if the java stored procedure are NOT used.
However we are connecting to this database using JDBC also.
Moreover ASM is enabled in this server.
You expert suggetions are always welcome.That's not a question that can be answered easily. It depends very much on where the time is going. Three main targets:
Writing the log file - which is largely about use of disks, not memory.
Reading data - lots of single block reads suggest looking at a bigger cache
Reading and writing temp because of large sorts/hash joins - pga configuration
One difficulty with TEMP is that the I/Os are often asynchronous, so a session can do a lot of TEMP I/O without recording much time - which means it can cause a problem elsewhere without suffering a problem itself.
You didn't mention the pga_aggregate_size - which is an important consideration in 10g and can be more important than the sga sizing in DSS and batch-like processing. Between them, the SGA and PGA_aggregate_target should probably account for a very large fraction of your memory - but (since you are on Solaris) make sure you look into large memory pages and intimate shared memory, otherwise you may need to leave a lot of memory available for the O/S memory management mechanisms.
As far as the java pool is concerned, check v$sgastat for pools which constantly show free memory, and reclaim any large free volumes.
Bottom line - if you've got the memory in the box, you might as well use it in the best possible place; but at the moment we don't have enough information to tell us where it would be most useful.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk -
Relative size of sga_max_size and sga_target to the physical memory
Dear Experts,
I have installed oracle 10.2.0.4 on AIX 5.3 with 32 GB of physical memory.
Let us say other applications on the server consume 10 GB of physical memory.
Now how should i plan the size of SGA_TARGET and SGA_MAX_SIZE on the same.As per Oracle® Database Performance Tuning Guide 10g Release 2 (10.2):
You must then divide the resulting memory between the SGA and the PGA.
For OLTP systems, the PGA memory typically accounts for a small fraction of the total memory available (for example, 20%), leaving 80% for the SGA.
For DSS systems running large, memory-intensive queries, PGA memory can typically use up to 70% of that total (up to 2.2 GB in this example).
Good initial values for the parameter PGA_AGGREGATE_TARGET might be:
For OLTP: PGA_AGGREGATE_TARGET = (total_mem * 80%) * 20%
For DSS: PGA_AGGREGATE_TARGET = (total_mem * 80%) * 50%
where total_mem is the total amount of physical memory available on the system.
(http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#i49320) -
SGA_MAX_SIZE and swap
Hello,
When I read Doc 778777.1, I found it said: "On most OSs(except solaris) if you specify SGA_MAX_SIZE, then the complete size of SGA_MAX_SIZE is reserved from Swap at instance startup, not from physical RAM." I want to konw why SGA_MAX_SIZE is reserved from Swap? I always thought it was reserved from physical RAM.
Thanks.Even I am not much clear so could be wrong ;) [See note 761960.1 also]
What i can make out from above 2 notes is that Oracle doesn't want to waste physical memory for additional memory requirement above SGA_TARGET (ie SGA_MAX_SIZE - SGA_TARGET). -
Oracle SGA MEMEORY SETTINGS , SGA_TRAGET , SGA_MAX_SIZE
Hello Techies,
I have a production environment where one of the Databases RAM is set to 6G where as the RAM installed on the server is 8GB. We have the Grid agent installed on it and according to the Oracle Grid there is impact on the performance and RAM has to be extened to 7.2 GB.
Now my question is, whether we can extend this as we only have 8GB installed on the server. Will the left out 800 M is enough for the server?
Or Should we need to extend the RAM on the server and then extend the SGA_TARGET AND SGA_MAX_SIZE? if so can you suggest the values.
Could you shed some light on the cosiderations while we want to extend the SGA.
Server - Windows
DB - Oracle 10g
Thank you.
Regards,
RanG.Hi sb92075,
Here is the query , consuming significant DB time from Oracle Grid ...
select e7.cmpcode as comp_no , e7.code as emcode , upper(a.add1) as user_name , upper(a.add2) as domain , upper(a.add3) as reviewer , upper(a.add4) as approver1 , upper(a.add5) as approver2 , a.emailaddr as email , l.cfvalue as costcentre , case e7.repcode3 when 'FRANCHISE' then '7001F' when 'STORE' then '7001S' else e7.cmpcode end as template , b.acnum as account , e7.name as account_holder
from xxxx.oas_element e7 inner join coda.oas_elmaddrlist a on (e7.cmpcode = a.cmpcode and e7.code = a.elmcode and e7.elmlevel=a.elmlevel and a.catagory='EXPPORTAL') inner join xxxx.oas_rllist l on (e7.cmpcode = l.cmpcode and e7.code = l.elmcode and e7.elmlevel=l.elmlevel) left join xxxx.oas_elmbanklist b on (e7.cmpcode = b.cmpcode and e7.code = b.elmcode and b.elmlevel=2 and b.defbank=1)
where e7.elmlevel=7 and e7.code like 'EM%' and l.lstseqno=1 and l.cffunction=0 and e7.cmpcode = '7001' and a.add1 is not null and a.add2 is not null and ((a.add3 is not null and a.add5 is not null and a.add2 = 'xxxx') or a.add2 != 'xxxx') and a.add4 is not null and b.acnum is not null and b.acname is not null
=========================
The other example of one of the 20 queries which run on this DB, i am sry for the lenght of the query ,
=============================
SELECT
case 8 when 4 then 'T1' when 8 then 'T2' when 12 then 'T3' else 'Unknown' end,
OAS_REPPACK.L1NAME,
OAS_REPPACK.L1HDRTXT,
OAS_REPPACK.L2NAME,
OAS_REPPACK.L2HDRTXT,
OAS_REPPACK.L3NAME,
OAS_REPPACK.L3HDRTXT,
OAS_REPPACK.L4NAME,
OAS_REPPACK.L4HDRTXT,
OAS_BALANCE.cmpcode,
OAS_REPPACK.L5NAME,
OAS_REPPACK.L5HDRTXT,
OAS_REPPACK.LEAFNAME,
OAS_REPPACK.LEAFHDRTXT,
OAS_REPPACK.L2ORDER,
OAS_REPPACK.L3ORDER,
OAS_REPPACK.L4ORDER,
OAS_REPPACK.L5ORDER,
-- Actual YTD --
SUM(OAS_BALANCE.FULL_VALUE
*CASE WHEN OAS_BALANCE.BALCODE = 'ACTUAL' THEN 1 ELSE 0 END
*CASE WHEN IIS_CURRENCY(case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end, 'XEUR', 'Entity Currency' ) = OAS_BALANCE.CURCODE THEN 1 ELSE 0 END
*CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <= 8 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
-- Actual YTD Last Year--
SUM(OAS_BALANCE.FULL_VALUE
*CASE WHEN OAS_BALANCE.BALCODE = 'ACTUAL' THEN 1 ELSE 0 END
*CASE WHEN IIS_CURRENCY(case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end, 'XEUR', 'Entity Currency' ) = OAS_BALANCE.CURCODE THEN 1 ELSE 0 END
*CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <= 8 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013-1 THEN 1 ELSE 0 END
-- Actual Full Year Last Year--
SUM(OAS_BALANCE.FULL_VALUE
*CASE WHEN OAS_BALANCE.BALCODE = 'ACTUAL' THEN 1 ELSE 0 END
*CASE WHEN IIS_CURRENCY(case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end, 'XEUR', 'Entity Currency' ) = OAS_BALANCE.CURCODE THEN 1 ELSE 0 END
*CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <= 9998 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013-1 THEN 1 ELSE 0 END
-- Budget YTD --
SUM(OAS_BALANCE.FULL_VALUE
*CASE
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Entity Currency' THEN 1
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Group Currency' THEN IIS_BUDGETRATES.RATE
ELSE 0 END
*CASE WHEN OAS_BALANCE.BALCODE = IIS_PFBALCODE(OAS_BALANCE.BALCODE, 'Calendar Year')||'BUDG' THEN 1 ELSE 0 END
*CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <= 8 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
-- Budget Full Year --
SUM(OAS_BALANCE.FULL_VALUE
*CASE
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Entity Currency' THEN 1
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Group Currency' THEN IIS_BUDGETRATES.RATE
ELSE 0 END
*CASE WHEN OAS_BALANCE.BALCODE = IIS_PFBALCODE(OAS_BALANCE.BALCODE, 'Calendar Year')||'BUDG' THEN 1 ELSE 0 END
*CASE WHEN IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
-- Estimate 1 --
-- Actual T1--
SUM(OAS_BALANCE.FULL_VALUE
*CASE WHEN OAS_BALANCE.BALCODE = 'ACTUAL' THEN 1 ELSE 0 END
*CASE WHEN IIS_CURRENCY(case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end, 'XEUR', 'Entity Currency' ) = OAS_BALANCE.CURCODE THEN 1 ELSE 0 END
*CASE WHEN CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <=4 THEN 1 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') BETWEEN 5 AND 8 THEN 2 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') >= 9 THEN 3 END = 1 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
+
SUM(OAS_BALANCE.FULL_VALUE
*CASE WHEN OAS_BALANCE.BALCODE = IIS_PFBALCODE(OAS_BALANCE.BALCODE, 'Calendar Year')||'EST1' THEN 1 ELSE 0 END
*CASE WHEN IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 AND IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') BETWEEN 5 AND 12 THEN 1 ELSE 0 END
OAS_COMPANY.NAME,
IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year'),
-- Budget T1--
SUM(OAS_BALANCE.FULL_VALUE
*CASE
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Entity Currency' THEN 1
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Group Currency' THEN IIS_BUDGETRATES.RATE
ELSE 0 END
*CASE WHEN OAS_BALANCE.BALCODE = IIS_PFBALCODE(OAS_BALANCE.BALCODE, 'Calendar Year')||'BUDG' THEN 1 ELSE 0 END
*CASE WHEN CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <=4 THEN 1 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') BETWEEN 5 AND 8 THEN 2 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') >= 9 THEN 3 END = 1 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
-- Budget T2--
SUM(OAS_BALANCE.FULL_VALUE
*CASE
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Entity Currency' THEN 1
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Group Currency' THEN IIS_BUDGETRATES.RATE
ELSE 0 END
*CASE WHEN OAS_BALANCE.BALCODE = IIS_PFBALCODE(OAS_BALANCE.BALCODE, 'Calendar Year')||'BUDG' THEN 1 ELSE 0 END
*CASE WHEN CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <=4 THEN 1 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') BETWEEN 5 AND 8 THEN 2 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') >= 9 THEN 3 END = 2 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
-- Budget T3--
SUM(OAS_BALANCE.FULL_VALUE
*CASE
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Entity Currency' THEN 1
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Group Currency' THEN IIS_BUDGETRATES.RATE
ELSE 0 END
*CASE WHEN OAS_BALANCE.BALCODE = IIS_PFBALCODE(OAS_BALANCE.BALCODE, 'Calendar Year')||'BUDG' THEN 1 ELSE 0 END
*CASE WHEN CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <=4 THEN 1 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') BETWEEN 5 AND 8 THEN 2 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') >= 9 THEN 3 END = 3 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
-- Estimate 0 --
SUM(OAS_BALANCE.FULL_VALUE
*CASE
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Entity Currency' THEN 1
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Group Currency' THEN IIS_BUDGETRATES.RATE
ELSE 0 END
*CASE WHEN OAS_BALANCE.BALCODE = IIS_PFBALCODE(OAS_BALANCE.BALCODE, 'Calendar Year')||'EST0' THEN 1 ELSE 0 END
*CASE WHEN IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
-- Estimate 2 --
-- Actual T1--
SUM(OAS_BALANCE.FULL_VALUE
*CASE WHEN OAS_BALANCE.BALCODE = 'ACTUAL' THEN 1 ELSE 0 END
*CASE WHEN IIS_CURRENCY(case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end, 'XEUR', 'Entity Currency' ) = OAS_BALANCE.CURCODE THEN 1 ELSE 0 END
*CASE WHEN CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <=4 THEN 1 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') BETWEEN 5 AND 8 THEN 2 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') >= 9 THEN 3 END = 1 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
+
-- Actual T2--
SUM(OAS_BALANCE.FULL_VALUE
*CASE WHEN OAS_BALANCE.BALCODE = 'ACTUAL' THEN 1 ELSE 0 END
*CASE WHEN IIS_CURRENCY(case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end, 'XEUR', 'Entity Currency' ) = OAS_BALANCE.CURCODE THEN 1 ELSE 0 END
*CASE WHEN CASE WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') <=4 THEN 1 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') BETWEEN 5 AND 8 THEN 2 WHEN IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') >= 9 THEN 3 END = 2 AND IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 THEN 1 ELSE 0 END
+
SUM(OAS_BALANCE.FULL_VALUE
*CASE
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Entity Currency' THEN 1
WHEN OAS_BALANCE.CURCODE = case OAS_BALANCE.cmpcode when '7004' then 'SEK' when '7041' then 'SEK' when '7015' then 'USD' when '7042' then 'USD' else 'EUR' end AND 'Entity Currency' = 'Group Currency' THEN IIS_BUDGETRATES.RATE
ELSE 0 END
*CASE WHEN OAS_BALANCE.BALCODE = IIS_PFBALCODE(OAS_BALANCE.BALCODE, 'Calendar Year')||'EST2' THEN 1 ELSE 0 END
*CASE WHEN IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year') = 2013 AND IIS_PERIOD(OAS_BALANCE.PERIOD, 'Calendar Year') BETWEEN 9 AND 12 THEN 1 ELSE 0 END
FROM
OAS_BALANCE,
OAS_GRPLIST OAS_GRPLIST1RP,
OAS_ELEMENT OAS_EL1,
OAS_HIMLIST OAS_REPPACK,
OAS_COMPANY,
IIS_BUDGETRATES,
IIS_BOSEC_CC IIS_BOSECURITY_BAL,
SELECT DISTINCT USRCODE, USRNAME, COMPANY FROM IIS_BOSEC_CC
) IIS_BOSECURITY_CMP
WHERE
( OAS_COMPANY.CODE=OAS_BALANCE.CMPCODE )
AND ( OAS_BALANCE.REPBASIS=0 )
AND ( OAS_EL1.ELMLEVEL=1 )
AND ( OAS_BALANCE.CMPCODE=OAS_EL1.CMPCODE and OAS_BALANCE.EL1=OAS_EL1.CODE )
AND ( OAS_EL1.CMPCODE=OAS_GRPLIST1RP.CMPCODE and OAS_EL1.CODE=OAS_GRPLIST1RP.CODE and OAS_EL1.ELMLEVEL=OAS_GRPLIST1RP.ELMLEVEL and
(OAS_GRPLIST1RP.GRPCODE LIKE '1RB%' OR
OAS_GRPLIST1RP.GRPCODE LIKE '1RP%') )
AND ( OAS_REPPACK.GRPCODE=OAS_GRPLIST1RP.GRPCODE )
AND ( OAS_REPPACK.CODE LIKE '1RP%' )
AND ( IIS_BUDGETRATES.YR(+) =OAS_BALANCE.YR AND IIS_BUDGETRATES.PERIOD(+)=OAS_BALANCE.PERIOD AND
IIS_BUDGETRATES.BALCODE(+) = OAS_BALANCE.BALCODE AND
IIS_BUDGETRATES.CURCODE(+) = OAS_BALANCE.CURCODE )
AND ( IIS_BOSECURITY_CMP.COMPANY=OAS_COMPANY.CODE )
AND ( IIS_BOSECURITY_CMP.USRCODE=UPPER('exttino') )
AND ( IIS_BOSECURITY_BAL.COMPANY=OAS_BALANCE.CMPCODE and IIS_BOSECURITY_BAL.COSTCENTRE=CASE WHEN IIS_BOSECURITY_BAL.COSTCENTRE = 'ALL' THEN IIS_BOSECURITY_BAL.COSTCENTRE WHEN OAS_BALANCE.EL4 = ' ' THEN 'ALL' ELSE OAS_BALANCE.EL4 END )
AND
( CASE WHEN 'Calendar Year' = 'Calendar Year'
THEN OAS_BALANCE.YR
WHEN 'Calendar Year' = 'Business Year'
THEN CASE WHEN OAS_BALANCE.PERIOD <9 THEN OAS_BALANCE.YR ELSE OAS_BALANCE.YR+1 END
END +1 = 2013 )
OR
( CASE WHEN 'Calendar Year' = 'Calendar Year'
THEN OAS_BALANCE.YR
WHEN 'Calendar Year' = 'Business Year'
THEN CASE WHEN OAS_BALANCE.PERIOD <9 THEN OAS_BALANCE.YR ELSE OAS_BALANCE.YR+1 END
END = 2013 )
AND
( IIS_BOSECURITY_BAL.USRCODE = UPPER('exttino') )
AND
( IIS_BOSECURITY_CMP.USRCODE = UPPER('exttino') )
GROUP BY
case 8 when 4 then 'T1' when 8 then 'T2' when 12 then 'T3' else 'Unknown' end,
OAS_REPPACK.L1NAME,
OAS_REPPACK.L1HDRTXT,
OAS_REPPACK.L2NAME,
OAS_REPPACK.L2HDRTXT,
OAS_REPPACK.L3NAME,
OAS_REPPACK.L3HDRTXT,
OAS_REPPACK.L4NAME,
OAS_REPPACK.L4HDRTXT,
OAS_BALANCE.cmpcode,
OAS_REPPACK.L5NAME,
OAS_REPPACK.L5HDRTXT,
OAS_REPPACK.LEAFNAME,
OAS_REPPACK.LEAFHDRTXT,
OAS_REPPACK.L2ORDER,
OAS_REPPACK.L3ORDER,
OAS_REPPACK.L4ORDER,
OAS_REPPACK.L5ORDER,
OAS_COMPANY.NAME,
IIS_YEAR(OAS_BALANCE.YR, OAS_BALANCE.PERIOD, 'Calendar Year')
=============================
Regards,
RanG -
(10g)SGA_TARGET 파라미터를 이용한 AUTOMATIC MANAGMENT SGA COMPONENTS
제품 : ORACLE SERVER
작성날짜 : 2004-04-26
PURPOSE
이 문서는 SGA_TARGET 이라는 새로운 파라미터를 이용하여 Automatic
management SGA Components에 대하여 알아보기로 한다.
Explanation
SGA_TARGET 파라미터를 이용한 Automatic management SGA Components에 대하여
설명하기로 한다.
Automatic management SGA Components using SGA_TARGET
Oracle 10g부터 다음과 같은 각각의 SGA component에 대한 값들을 manual하게
설정할 필요가 없다.
shared_pool_size
log_buffer
java_pool_size
large_pool_size
buffer_cache_size
위 SGA 파라미터들의 사이즈를 측정하고 initSID.ora file에 그 값을 설정할
필요가 없음을 의미한다. 사실 SGA 크기를 정의하는 위 파라미터들을 설정하지
않아도 된다.
다만 10g 에서는 SGA_TARGET 이라는 새로운 파라미터만 셋팅하면 된다.
SGA_TARGET 이라는 파라미터는 해당 instance에 필요한 SGA의 최대 크기를
가리킨다.
SGA_TARGET을 152M 로 잡았다고 가정하자. 이것은 SGA가 커질 수 있는 최대 크기가
152M 라는 의미이다. Shared pool, buffer cache, large pool, java pool 과 같은
SGA component들은 이 maximum 사이즈 내에서 할당될 것이다.
오라클은 이러한 component들의 초기 값을 자동으로 계산하고 필요에 따라
자동으로 resize한다.
즉, SGA_TARGET 만 셋팅되어 있으면 shared pool, buffer cache, large pool,
java pool에 대하여 값을 명확히 지정할 필요가 없다.
Example
SGA_TARGET=152M 로 잡았다고 가정한다.(block size is 8K).
SQL> show parameter sga_target
NAME TYPE VALUE
sga_target big integer 152M
오라클은 다음과 같이 SGA component들의 사이즈를 정의한다.
SQL> show sga
Total System Global Area 159383552 bytes
Fixed Size 769328 bytes
Variable Size 72270544 bytes
Database Buffers 62914560 bytes
Redo Buffers 23429120 bytes
여기서 주목할 점은 다음과 같다.
1) SGA_TARGET을 셋팅하면 SGA_MAX_SIZE 의 값은 또한 SGA_TARGET 으로 셋팅된다.
즉, SGA_TARGET = SGA_MAX_SIZE.
SQL> show parameter sga
NAME TYPE VALUE
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 152M
sga_target big integer 152M
2) SGA_TARGET 의 값을 SGA_MAX_SIZE보다 더 크게 설정할 수 없다.
즉, SGA_TARGET <= SGA_MAX_SIZE.
SQL> alter system set sga_target=160M;
alter system set sga_target=160M
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00823: Specified value of sga_target greater than sga_max_size
Reference Documents
<Note:256913.1>
Oracle Database Concepts 10g Release 1 (10.1)
Part No. B10743-01
Chapter 8: Memory Architecture842638 wrote:
hi experts.. please answer the question
Im on 10.2.0 linux....
sga_target=200m
sga_max_size=400m
if automatic components take 180MB out of 200MB and lets say manaul components take 10M. so is the remaing 10MB wasted? yes or noWhy wasted? Only after giving memory to the manual components, whatever is left would be given to the automatic components. So nothing would be wasted by this approach.
HTH
Aman.... -
Hi,
We have Oracle 10g database, which have the following parameters.
sga_max_size=1600m
shared_pool_size=704m
So planned to use SGA_TARGET and set the size to 2G.
(ie) sga_target=2G
sga_max_size=2G
Do I have to comment the shared_pool_size=704m ??
Regards,
MaheshChinar wrote:
Aman.... wrote:
So I won't suggest that you remove the shared pool parameter completely. You may reduce the value given to it and start of from a smaller value rather than from the default one granule.
If you want to manage shared memory automatically(by enabling ASMM) there you should be give this to oracle fully automate it.So in general do not need for minimum values for specific automatically sized components.This is also important when investigating performance related problems in future(how application designed?).Hi Chinar
Sometimes your application needs a minimum amount of specific pool as it's written in the documentation:
You can exercise some control over the size of the automatically sized SGA components by specifying minimum values for the parameters corresponding to these components. Doing so can be useful if you know that an application cannot function properly without a minimum amount of memory in specific components. You specify the minimum amount of SGA space for a component by setting a value for its corresponding initialization parameter -
Hi,
I run a VERY small website that uses Oracle Application Server 10.1.2.3. We usually have fewer than 50 concurrent users at any one time. The website uses Oracle Portal as its middle tier, and is primarily used to run Oracle Reports .rep files using the built in Application Server Reports Server (rwservlet).
The problem is that we frequently run into HTTP 503 Service Unavailable errors, and it appears that we are running out of memory. I don't know how this can be, as our DB server is Windows 2003 64-bit, and has 8GB RAM. The error message that usually appears in the alert log is "ORA-04030: out of process memory when trying to allocate 2097196 bytes (joxp heap,f:OldSpace)"
Right now, I've set SGA_TARGET and SGA_MAX_SIZE to 3GB. Is this a good level at which to be set? Should it be higher/lower? I don't fully understand how SGA and PGA work, so any advice would be appreciated.
Thanks,
TomPRISM wrote:
I run a VERY small website that uses Oracle Application Server 10.1.2.3. On one or how many machines? Including machines hosting database(s) for AS infrastructure/repository and company data?
The problem is that we frequently run into HTTP 503 Service Unavailable errorsWhich of the web services?
DB server is Windows 2003 64-bit, and has 8GB RAM. Oracle server version? Is the server (Oracle software) 32 or 64-bit?
How big is the paging space? (or commit limit from Task manager)
The error message that usually appears in the alert log is "ORA-04030: out of process memory when trying to allocate 2097196 bytes (joxp heap,f:OldSpace)" It seems you've (the process) run out of address space. May be because of memory leak (bug) or that the space is cramped. 32-bit process has limitations.
Do you have any trace files or other logs (e.g. mid tier) that might give the error some context?
Right now, I've set SGA_TARGET and SGA_MAX_SIZE to 3GB. Is this a good level at which to be set? Should it be higher/lower? Since you don't have a lot of users and as long as it doesn't kill reporting performance, I'd try lowering the SGA to say 1 GB.
What is PGA target set to?
Edited by: orafad on Dec 16, 2010 1:41 AM -
I've read some about SGA_TARGET and SGA_MAX_SIZE, but there are things I don't understand well I think.
1) SGA_MAX_SIZE is said to be for a life of an instance -> But I can change it with alter system set sga_max_size=... scope=spfile, restart the database and it gets changed. Why?
2) Why is exactly SGA_TARGET for? If it's set to a non-zero value it's just to indicate we have ASMM enabled? SGA_TARGET is written to set total memory for SGA. But we can change it dynamically, up to SGA_MAX_SIZE, that's why for me SGA_MAX_SIZE looks rather for total memory for SGA. It can be changed too though...
Thx for answer.
A.I've read some about SGA_TARGET and SGA_MAX_SIZE, but
there are things I don't understand well I think.
1) SGA_MAX_SIZE is said to be for a life of an
instance -> But I can change it with alter system set
sga_max_size=... scope=spfile, restart the database
and it gets changed. Why?I'm sorry. Your question doesn;t make sense to me ...
perhaps the confusion is that 'the life of an instance' is from startup to shutdown ... restart and you have a new instance.
>
2) Why is exactly SGA_TARGET for? If it's set to a
non-zero value it's just to indicate we have ASMM
enabled? SGA_TARGET is written to set total memory
for SGA. But we can change it dynamically, up to
SGA_MAX_SIZE, that's why for me SGA_MAX_SIZE looks
rather for total memory for SGA. It can be changed
too though...MAX_SIZE is exactly that - the max size. The OS pre-allocates to the max size, BUT some OSs do not need to physically assign the memory that has been allocated. That allows the OS to have pointers to 'memory that needs to be allocated when it's needed'. So the process thinks it has MAX_SIZE available but it ain;t really there. See http://blog.tanelpoder.com/2007/08/28/operating-systems-are-lazy-allocating-memory/
TARGET is the amount that is allowed to be in use at a specific point in time. It is less than, or equal to MAX_SIZE. A description, including the impact on the auto-allocated sizes, is at http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams192.htm#sthref792
Therefore, on a 4 GB machine you can have 4 instances each with MAX_SIZE set to 3GB but TARGET set to 800M each. Then, when it's needed, you can back off some to increase one in particular without shutting any down simply by TARGET.
The really, really confusing part is that some OSs report that the memory is 'in use' simply because is allocated. That makes it appear that we have a problem.
Maybe you are looking for
-
How to deal with the issue of craeting Billing for free goods
Dear All, Now I met with a question for free goods, generally, it's not need to create billing for free goods. But I had used COPA and the profitable document is generated while creating billing. So my question is that how to create billing for fre
-
How do I make a new Icloud Account?
I need help making a new account some ones hacking mine PLZ HELP ME
-
Manual Bank Statement Clearing.
Dear All, While processing BRS through FF67, a batch input session in being created. When I execute this session, system is prompting to enter Business area and Profit center for each line item as we have given Business area and Profit center as man
-
HT1430 I have problem with dowloding the apps
Canot download apps
-
Error with function that returns a rowtype...
i have a function that returns a rowtype. below is a simplified version: create or replace function "GETC" return mytable%rowtype is rec mytable%rowtype; begin rec.rowid := 1; return rec; end; eventually i'll want to call this from java. but for now