Sga_max_size and sga_target values

I have an 11g database on windows with 4GB RAM, I have set the MEMORY_MAX_TARGET and MEMORY_TARGET, what should I do with the pre-existing sga_max_size and sga_target values

memory_target = sga_target + max(pga_aggregate_target, maximum PGA allocated)
MEMORY_MAX_TARGET = sum of the SGA and instance PGA sizes.
For Automatic memory management
set
ALTER SYSTEM SET SGA_TARGET = 0;
ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0;
Note:
In a text initialization parameter file, if you omit the line for MEMORY_MAX_TARGET and include a value for MEMORY_TARGET, the database automatically sets MEMORY_MAX_TARGET to the value of MEMORY_TARGET. If you omit the line for MEMORY_TARGET and include a value for MEMORY_MAX_TARGET, the MEMORY_TARGET parameter defaults to zero. After startup, you can then dynamically change MEMORY_TARGET to a nonzero value, provided that it does not exceed the value of MEMORY_MAX_TARGET.
Note:
The preceding steps instruct you to set SGA_TARGET and PGA_AGGREGATE_TARGET to zero so that the sizes of the SGA and instance PGA are tuned up and down as required, without restrictions. You can omit the statements that set these parameter values to zero and leave either or both of the values as positive numbers. In this case, the values act as minimum values for the sizes of the SGA or instance PGA.
Reference

Similar Messages

  • Issue creating a database: SGA_MAX_SIZE and SGA_TARGET

    Hello:
    While creating a custom database, I am running into issues with the values I specify for SGA_MAX_SIZE and SGA_TARGET.
    The install manual for the product I am creating the database for says that SGA_MAX_SIZE should be >= SGA_TARGET_SIZE. It also wants a minimum of 1Gig for SGA_Target
    The Database Configuration Assistant defaulted to 0.64GB for SGA_TARGET and 0.168 for SGA_MAX_SIZE (This is clearly against the instruction in the installation manual).
    Who is right? Me or the vendor?
    I read some threads that indicate that the vendor may be wrong.
    venki

    Follow the vendor's instructions.
    DBCA has never in its existence made a correct decision yet. It puts all control files and redo logs into one directory.
    It doesn't create multiple members for the log file groups.
    And its memory management is based on a simple algorithm that has nothing to do with any specific reality.
    DBCA is intended for creating a generic database for generic purposes ... and that it does very very well.

  • Increase SGA_MAX_SIZE and SGA_TARGET

    Hi all,
    I want to increase SGA_MAX_SIZE and SGA_TARGET in 10g. Currently we have
    SQL> sho parameter sga
    NAME TYPE VALUE
    lock_sga boolean FALSE
    pre_page_sga boolean FALSE
    sga_max_size big integer 2384M
    sga_target big integer 2384M
    And we have 16GB RAM in redhat linux 4(32 bit).Oracle 10.2.0.3 DB.
    Because of 32 bit OS, I was not able to increase shmmax more than 4GB.
    In this situation how and how much SGA_MAX_SIZE and SGA_TARGET I can increase?
    Thanks in Advance,
    Sunil

    Hi sunilgln,
    Given the present state of things, you have to take a meassure of how many RAM is used with nothing running but the OS, that will give you the Linux footprint.
    Take note of the amount of physical free memory (using <strong>top</strong> command)
    Later you have to estimate how much swapping are you willing to accept, the SGA you define may be within the ranges of
    FREE MEM*90% and FREE MEM*90+(OS FOOTPRINT*%SWAP MEMORY WILLING TO USE)
    <em>This is a proposal for setting this up, you need to tune and balance load depending on usage.</em>
    Another recommendation, SGA_TARGET is <strong>dynamic</strong>, SGA_MAX_SIZE is not...but you may set SGA_MAX_SIZE to a full allocation and set SGA_TARGET to a percentage that allocation and gradually use it.
    What happens is: the OS will "allocate" a chunk(or chunks) the size given by SGA_MAX_SIZE, but the real usage by the database will be determined by SGA_TARGET.
    Hope this helps you
    Ignacio
    Regards
    http://oracledisect.blogspot.com

  • Difference between SGA_MAX_SIZE and SGA_TARGET

    Difference between SGA_MAX_SIZE and SGA_TARGET

    user8645026 wrote:
    Difference between SGA_MAX_SIZE and SGA_TARGETIs discussed in the database forum, not the forum for which the title is " Community Feedback and Suggestions (Do Not Post Product-Related Questions Here)".
    Is also discussed in the documentation at http://tahiti.oracle.com

  • Increase the SGA_MAX_SIZE and SGA_TARGET parameters

    HI ,
    I am using oracle 10g R2 and windows server 2003 .
    My server is having 8 GB RAM .
    I want to increase the SGA_MAX_SIZE and SGA_TARGET parameters .
    I am using the below command , but getting the error
    SQL> alter system set sga_max_size=2000M scope=spfile ;
    alter system set sga_max_size=2000M scope=spfile
    ERROR at line 1:
    ORA-32001: write to SPFILE requested but no SPFILE specified at startup
    Can someone please help ..

    hi
    connect as sys user and then try...
    first make folder as backup and then copy the old SPFILEorcl to the same folder(backup)
    now you can easily modify the files otherwise you will get error..
    you will find here..
    C:\ORACLE_HOME\database
    SQL>  alter system set sga_max_size=2000M scope=spfile ;
    System altered.OR.
    connect as sys user.
    and do the following...
    1).SQL>create pfile from spfile;
    2).modify the pfile and decrease\increase the size of pools.
    3).shutdown database.
    4). Startup database using created pfile.
    if it start ok then.
    5.) Recreate the Spfile with the created Pfile.
    SQL>create spfile from pfile;sarah

  • SGA_MAX_SIZE and SGA_TARGET

    DBAs,
    can any one tell me in brief how SGA_MAX_SIZE and SGA_TARGET helps to tune the instance?
    i have gone through with vairous link but still confuse.
    Regards,
    BK

    hi BK,
    SGA_MAX_SIZE is the maximum sizeof the shared global area (system global area), and SGA_TARGET is set when you want to use ASSM (automatic shared memory management) which is a 10g feature.
    You are alos adviced to post oracle version and os.. SGA_TARGET when set, then oracle automatically manages the memory and if not set then you have to set SGA_MAX _SIZE and manually set others memory components accordingly and tune them.
    I hope this helps you in a small manner
    Thanks and Regards
    VD

  • SGA_MAX_SIZE and shmmax values

    All,
    My environment is
    Oralce - 10.2.0.4.0
    Two node RAC environment
    Red hat Enterprise Linux 5 64 bit operating system
    RAM size - 64 GB
    shmmax - 4294967295 (one byte less than 4 GB)
    SGA_MAX_SIZE = 3808M
    SGA_TARGET = 3808M
    PGA_AGGREGATE_TARGET=1000M
    When I run the ADDM, it is telling that SGA was inadequately sized, increase the sga_target to 4760M. It says that 33% impact.
    In my case, I need to increase SGA_MAX_SIZE.
    I may be wrong, but from google, i assume that SGA_MAX_ZIZE can't be more than shmmax. Is it true?
    If I have to increase the shmax, is it fine to increase to 5 GB based on ADDM recommendataion. Are there any harm to increase the shmmax to 20GB are so for safer side?
    Any relation beween shmmax and RAM size?
    If I have to alter the SGA_MAX_SIZE in RAC, I need to bounce the database or i can do one instance at a time right. If I am going with one node at a time, since it is a production, what will happen to the connections in that node when i am restarting that particular instance? I have a TAF policy of "Basic".
    is it like all the select statements will be moved to survival node whereas insert, update and delete transactions will be broken?
    Awaiting your help..

    Always it is recommended to keep "shmmax" half the size of physical memory.
    First you need to increase shmmax and then increase the SGA_MAX_SIZE as per ADDM.
    See the below doc for all your answers answers.
    http://download.oracle.com/docs/cd/B19306_01/install.102/b15668/toc.htm#BGBDFIGF
    Hope this solves your issue.
    Regards,
    Satishbabu Gunukula
    hthttp://www.oracleracexpert.com
    Click here for solution - [ORA-19755 Error during recovery/DB startup|http://www.oracleracexpert.com/2009/09/ora-19755-could-not-open-change.html]
    Click here to learn [Block corruption and recovery|http://www.oracleracexpert.com/2009/08/block-corruption-and-recovery.html]
    Click here to learn [Transportable tablespace export and import |http://www.oracleracexpert.com/2009/09/transportable-tablespace-export-and.html]
    Edited by: Satishbabu Gunukula on Sep 23, 2009 2:43 PM

  • SGA_MAX_SIZE and SGA_TARGET how to set minimum for pools

    Hello, we are on 10.2.0.4, Solaris 5.10. We are using ASMM, so SGA_TARGET and SGA_TARGET size are set. Hence, buffer cache, shared pool, large pool and java pool are automatically sized. However, we do not have any minimum values for those. How do I determine what this minimum value should be?
    thank you!

    HI,
    Yes you need size the minimum value for shared pool, buffer cahce tec... else it will start consuming wholeThe documentaion
    states:
    You need not set the size of any of these components explicitly. By default the parameters for these components will appear to have values of zero. Whenever a component needs memory, it can request that it be transferred from another component by way of the internal automatic tuning mechanism. This transfer of memory occurs transparently, without user intervention.Can you please explain how would it start consuming the entire SGA?

  • 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  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

  • Sga_max_size vs sga_target

    Whats the difference between SGA_MAX_SIZE and SGA_TARGET? I am bit confused.
    As per Oracle® Database Reference 10g Release 1 (10.1)
    SGA_MAX_SIZE specifies the maximum size of the SGA for the lifetime of the instance
    Then why SGA_TARGET is used.
    I am missing something here. Kindly clarify.
    Thanks in Advance
    SID.

    Max_size is what the SGA can grow to if it has to.
    SGA_Target is what you'd like the SGA to be.
    Then why SGA_TARGET is used.
    Because you might want to dynamically grow your SGA, above the target. Suppose someone gives you a transportable tablespace and it comes from a 4K-blocksize database, and you're using 8K blocks. You have to 'alter system set db_4k_cache_size=something', but if you try that when your TARGET already equals your MAX_SIZE, you'll be told there's no room to grow the SGA, so the only way to achieve what you want is to shrink some other part of the SGA or to set the parameter in your init.ora and bounce. Either could be problematic on a production box. That's just one example: remember that 'SGA_TARGET' is indeed only a target: Oracle is allowed to exceed the target if thinks the workload makes it necessary to do so.
    So the difference between MAX_SIZE and TARGET is 'slack space': memory that's not in use, but could be if you (or Oracle) determined a need for it.
    On a lot of operating systems, this difference is paged out and thus doesn't mean you're wasting real, physical memory.
    But on others (and I think this is true of Windows and Linux), you would indeed be 'consuming' that memory difference -which would thus amount to wasted physical memory.

  • SGA_MAX_SIZE != SGA_TARGET when?

    Just curious... under what circumstances, when using ASMM, would I not want SGA_TARGET to equal SGA_MAX_TARGET?
    Bob

    Just to clarify things up,
    Oracle will allocate SGA size equal to SGA_MAX_SIZE from system initially.
    SGA_TARGE can be smaller than SGA_MAX_SIZE because they are buffer caches, such as KEEP, RECYCLE, and other block sizes, not affected by SGA_TARGET.
    See the result below,
    SYS@etest> show sga
    Total System Global Area  264241152 bytes
    Fixed Size                  1301408 bytes
    Variable Size             216540256 bytes
    Database Buffers           46137344 bytes
    Redo Buffers                 262144 bytes
    SYS@etest> show parameter sga
    NAME                                 TYPE        VALUE
    lock_sga                             boolean     FALSE
    pre_page_sga                         boolean     TRUE
    sga_max_size                         big integer 252M
    sga_target                           big integer 200MOracle SGA size is 264241152/1024/1024=252M equal to SGA_MAX_SIZE while SGA_TARGET is 200M
    Since I don't have other buffers set, Where the 50M goes ?
    SYS@etest> select * from v$sgainfo
      2  /
    NAME                                  BYTES RES
    Fixed SGA Size                      1301408 No
    Redo Buffers                         262144 No
    Buffer Cache Size                  46137344 Yes
    Shared Pool Size                  150994944 Yes
    Large Pool Size                     4194304 Yes
    Java Pool Size                      4194304 Yes
    Streams Pool Size                         0 Yes
    Granule Size                        4194304 No
    Maximum SGA Size                  264241152 No
    Startup overhead in Shared Pool    37748736 No
    Free SGA Memory Available 54525952
    11 rows selected.It went to Free SGA Memory Available. Hence you can dynamically increase SGA_TARGET without reboot instance.

  • Avoiding null and duplicate values using model clause

    Hi,
    I am trying to use model clause to get comma seperated list of data : following is the scenario:
    testuser>select * from test1;
    ID VALUE
    1 Value1
    2 Value2
    3 Value3
    4 Value4
    5 Value4
    6
    7 value5
    8
    8 rows selected.
    the query I have is:
    testuser>with src as (
    2 select distinct id,value
    3 from test1
    4 ),
    5 t as (
    6 select distinct substr(value,2) value
    7 from src
    8 model
    9 ignore nav
    10 dimension by (id)
    11 measures (cast(value as varchar2(100)) value)
    12 rules
    13 (
    14 value[any] order by id =
    15 value[cv()-1] || ',' || value[cv()]
    16 )
    17 )
    18 select max(value) oneline
    19 from t;
    ONELINE
    Value1,Value2,Value3,Value4,Value4,,value5,
    what I find is that this query has duplicate value and null (',,') coming in as data has null and duplicate value. Is there a way i can avoid the null and the duplicate values in the query output?
    thanks,
    Edited by: orausern on Feb 19, 2010 5:05 AM

    Hi,
    Try this code.
    with
    t as ( select substr(value,2)value,ind
            from test1
            model
            ignore nav
            dimension by (id)
            measures (cast(value as varchar2(100)) value, 0 ind)
            rules
            ( ind[any]=  instr(value[cv()-1],value[cv()]),
            value[any] order by id = value[cv()-1] || CASE WHEN value[cv()] IS NOT NULL
                                               and ind[cv()]=0     THEN ',' || value[cv()] END      
    select max(value) oneline
    from t;
    SQL> select * from test1;
            ID VALUE
             1 Value1
             2 Value2
             3 Value3
             4 Value4
             5 Value4
             6
             7 value5
             8
    8 ligne(s) sélectionnée(s).
    SQL> with
      2   t as ( select substr(value,2)value,ind
      3          from test1
      4          model
      5          ignore nav
      6          dimension by (id)
      7          measures (cast(value as varchar2(100)) value, 0 ind)
      8          rules
      9          ( ind[any]=  instr(value[cv()-1],value[cv()]),
    10          value[any] order by id = value[cv()-1] || CASE WHEN value[cv()] IS NOT NULL
    11                                             and ind[cv()]=0     THEN ',' || value[cv()] END 
    12          )
    13        )
    14   select max(value) oneline
    15   from t;
    ONELINE
    Value1,Value2,Value3,Value4,value5
    SQL>

  • NULL and Space value in ABAP

    Hi All,
           I like to know, is it NULL and Space value is same in ABAP, if it is not how to check null value.
    Thank you.
    Senthil

    everything is correct though some answers are not correct.
    A Database NULL value represents a field that has never been stored to database - this saving space, potentially.
    Usually all SAP tables are stored with all fields, empty fields are stored with their initial value.
    But: If a new table append is created and the newly-added fields do not have the 'initial value' marked in table definition, Oracle will just set NULL values for them.
    as mentioned: There is no NULL value to be stored in an ABAP field. The IS NULL comparison is valid only for WHERE clause in SELECT statement. WHERE field = space is different from WHERE field IS NULL. That's why you should check for both specially for appended table fields.
    If a record is selected (fulfilling another WHERE condition) into an internal table or work area, NULL values are convertted to their initial values anyway.
    Hope that sheds some light on the subject!
    regards,
    Clemens

  • Opening and Closing values on two separate rows for an indvidual A/c?

    Hi / Salam To all SAP Members,
    I am creating a COGS report in which i need to show opening and closing values for a stock account in two separate rows. The tool i am using is report painter.
    What i need to know is how can the system identify between opening and closing values for that account? Which characteristic/s do i need to include in the rows? The table i am using is FAGLFLEXT.
    Please provide help.
    Regards,
    Mohammed Ali Khan.

    Resolved Issue.

Maybe you are looking for