Sort_area_size & hash_area_size on 10g

I am confused as to whether I need to have sort_area_size and hash_area size set in my 10.2.0.3 database. I know the Oracle documentation states the following:
"Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead." This is the same statement made for hash_area_size as well.
I have SHARED_SERVERS set to 1. So do I need to have sort_area_size and hash_area_size configured? Or will pga_aggregate_target take over anyway?
And does anyone have any suggestions on sizing pga_aggregate_target?
Oracle Doc says 20% of SGA. And I have seen recommendations where SGA should be sized 60-80% of total memory. Seems extreme.

It is extreme. The SGA can be anywhere from 5% - 50% of the total memory depending on the size of memory, size of the database, type of database application (OLTP, Warehouse, DSS, OLAP), and user load.
What else is on the machine besides the database is a big factor in how much memory can be allocated.
Metalink has documents on sizing the SGA. You can size the PGA based on the expected concurrent user session count X an average memory per user + some extra for the unusual. How much memory you need per user depends on the application code tool set and coding stype.
It is a bit of a guessing game. I like to start small but probably adequate allocation and add more resource as the load grows based on statistics.
HTH -- Mark D Powell --
HTH -- Mark D Powell --

Similar Messages

  • Oracle Performance Tuning

    Hi,
    Our organization recently also encounter Oracle DB performance issue, whereby I am searching for information for us to going into diagnostic the problem and finding the root cause of this performance problem.
    I had read through this old article where I found a number of points being highlighted was a good start for us, and just about this port, we would like to understand what in details of AIX 5.3 and asynch I/O turned-on had to do with Oracle DB performance, unfortunately the URL given in the article (possible due to the twas back in 2006), is no longer valid (http://www.oracle.com/technology/pub/articles/lewis_cbo.html), I tried that but the pages being redirected to (http://www.oracle.com/technetwork/articles/index.html).
    May I know, would you able to provide me the new URL path for the mentiened AIX 5.3 asynch I/O turned-on related information?
    Our environment:
    1) OS AIX 5.3
    2) Oracle DB 10g
    (If I have the AWR Report, would it be better possition for you to help us?)
    Thank you in advanced.
    Best Regards,
    KaiLoon Kok
    Edited by: 991132 on Feb 28, 2013 11:19 PM

    Hi,
    performance tuning is a very large argument and the causes of degradation may be many.
    There are several consideration that You have to do like:
    - which kind of application is running on the DB
    - which kind of optimizer is used
    - the striping of the data files across the disks
    - the dimension of the DB block
    - the waits that DB encounters
    - many other things like SORT_AREA_SIZE, HASH_AREA_SIZE, etc.
    To begin Yr analysis use the utlbstat.sql and utlestat.sql scripts provided in the $ORACLE_HOM/rdbms/admin directory and check the conditions of the DB.
    Increasing the SGA, like You've done, may not be the solution, somtimes it may instead decrease the overall performances.
    Also check in wich case the DB is slow, ex. executing some particular procedure, excuting a particular query, ....
    Try to identify the better the DB and then try to resubmit Yr problem.
    Bye Max
    null

  • What to check in my query running slow

    Hi,
    Our 11g database was migrated from one platform to another. A query which ran very quickly before on the source platform now takes ages to run on the target platform. Please could you point me in the right direction as to what things I should check to fix this problem?
    thank you

    Hi,
    Following are the areas which can be explored. I hope this will help you.
    1) Check the Explain plan for both servers. I hope you know how to gahter the explain plan for quries. Its better to use dbms_XPLAIN
    -Most probably your explain plan will be different..
    2) Check the init parameters of source and target tables
    3) check the optimizer parameters of source and target tables. Parameters like optimizer_ind_cost_adj,sort_area_size,hash_area_size,Optimizer_mode,cursor_sharing etc
    4) check the data volumn of source and target tables.
    5) Check the statistics of source and target tables. Its cumbersome to compare the statistics of source and target. So what you can do is
    a) Take the export of statistics of target tables
    b) Import those statistics to source tables(Before importing take the backup of source table statistics)
    c) Once done the check the explain plan, it should be the same like target database.
    -If step 2 confirms that statistics is the problem then you should take the export of source table statistics and import in target to get the same explain plan.
    HTH

  • Setting pfile

    hello,
    I am a junior DBA and iam working at production site i have some doubts regarding
    pfile settings
    My database configuration is ORACLE 9i:(WINDOWS)
    As far as i know
    for setting PFILE for WINDOWS OS we should allocate 20% of RAM
    And the Remaining 80% is for ORACLE.
    In this 80% for PGA
    PGA=noofsessions*(2mb + sort_area_size + hash_area_size)
    Assume my RAM is 1024m
    In thus 20% for OS i.e 205M
    Remaining 820M for ORACLE
    in this for PGA(Assume that 20 sessions are opening)
    PGA=20*3.5
    PGA=70M
    Now for SGA 750M
    Does my Estimation is correct or not can u please suggest the above urgent
    Regards,
    Vamsi

    I don't know where you get this stuff.
    The recommendation is usually stated as being: your SGA in total should amount to no more than 50% of the physical RAM on the server, assuming your instance is the only instance running on that server. The other 50% is left 'spare' for the Oracle PGA and the operating system itself (I will say in passing that Sybrand's assertion that Windows will use 50% of the RAM on a box by design is... well, it's not something I have ever seen happen. Right now, I'm running on a 4GB box and Windows is consuming 1.01GB, which is 25%).
    If you know ahead of time that you are going to have few concurrent users on your database, then it's a bit daft to reserve most of the 'spare' 50% for their PGAs, and you could probably usefully reduce the PGA allocation and increase the SGA allocation.
    The calculations you quote I've seen before and they're not completely off the planet, but they're seriously out of date. These days, you set PGA_AGGREGATE_TARGET, not "sort_area_size" or "hash_area_size", and you let Oracle sort it out from there (well, that's the official recommendation, though the ...area_size parameters can still be set if you have to -and since you're stuck on 9i, maybe you have to).
    The essence of what you post is therefore sort-of correct: the RAM on your server has to be divided between the OS, the SGA and the PGA. The OS component can be regarded as more-or-less fixed, and 20% is at least in the right ball-park. If you have lots of concurrent users, the PGA component probably needs to be increased; if you have few, it can be decreased and the balance given back to the SGA.
    It's a pretty rough-and-ready way to tune things, of course. But it's at least a starting point. Just don't get hung up on specific numbers or false degrees of precision. You can't plug numbers into a formula and get perfect results for this sort of thing. You have to be prepared to tune properly after an initial guesstimate based on the formula results.

  • SORT_AREA_SIZE and HASH_AREA_SIZE

    Guys,
    Could someone explain the purpose of altering the SORT_AREA_SIZE and HASH_AREA_SIZE database parameters?
    I had come across the following lines of code in one of my new application's package.
    ALTER SESSION SET WORKAREA_SIZE_POLICY = MANUAL;
    ALTER SESSION SET SORT_AREA_SIZE =xxx;
    ALTER SESSION SET HASH_AREA_SIZE =yyy;
    Thanks,
    Bhagat

    Thank you Sankar!
    I've to perform ETL operation whereby it extracts data from a remote datasource,does sorting and loads into our database which involves huge amount of hash and sort.
    So,I'm wondering how to dynamically set the value of either SORT_AREA_SIZE or HASH_AREA_SIZE or PGA_AGGREGATE_TARGET.Since our database is in 9i,I understand that adjusting the PGA_AGGREGATE_TARGET parameter would do the job for me.
    I've read in an article that
    The DBA may wish to consider dynamically changing the pga_aggregate_target parameter when any one of the following conditions are true:
    Whenever the value of the v$sysstat statistic “estimated PGA memory for one-pass” exceeds pga_aggregate_target, the pga_aggregate_target should be increased.
    ==>How much should be the increase?
      1  select name,value
      2  from
      3  v$pgastat
      4  order by
      5* value desc
    SQL> /
    NAME                                                                  VALUE
    bytes processed                                                  1.1742E+10
    aggregate PGA target parameter                                    25165824
    maximum PGA allocated                                              20128768
    total PGA allocated                                                17669120
    aggregate PGA auto target                                          12653568
    total PGA inuse                                                    11108352
    global memory bound                                                 1257472
    maximum PGA used for auto workareas                                  688128
    cache hit percentage                                                    100
    total freeable PGA memory                                                 0
    PGA memory freed back to OS                                               0
    NAME                                                                  VALUE
    maximum PGA used for manual workareas                                     0
    over allocation count                                                     0
    extra bytes read/written                                                  0
    total PGA used for manual workareas                                       0
    total PGA used for auto workareas                                         0
    SQL> select name c1,cnt c2,decode(total, 0, 0, round(cnt*100/total)) c3
      2  from
      3  (
      4  select name,value cnt,(sum(value) over ()) total
      5  from
      6  v$sysstat
      7  where
      8  name like 'workarea exec%'
      9  );
    Workarea
    Profile                                    Count Percentage
    workarea executions - optimal          1,098,557        ###
    workarea executions - onepass                  0          0
    workarea executions - multipass                0          0If I've an Oracle job which runs every minute or so to check the specified values and dynamically make adjustments to pga_aggregate_target,would it be the optimal way to go about?
    Many Thanks !!!!
    Regards,
    Bhagat
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Help needed for hash_area_size setting for Datawarehouse environment

    We have an Oracle 10g Datawarehousing environment , running on 3 - node RAC
    with 16 GB RAM & 4 CPUs each and roughly we have 200 users and night jobs running on this D/W .
    We find that query performance of all ETL Processes & joins are quite slow .
    How much should we increase the value of hash_area_size parameter for this Datawarehouse environment ? This is a Production database, with Oracle Database 10g Enterprise Edition Release 10.1.0.5.0.
    We use OWB 10g Tool for this D/W and we need to change the hash_area_size to increase the performance of the ETL Processes.
    This is the Oracle init parameter settings used, as shown below : -
    Kindly suggest ,
    Thanks & best regards ,
    ===========================================================
         ORBIT
    __db_cache_size     1073741824
    __java_pool_size     67108864
    __large_pool_size     318767104
    __shared_pool_size     1744830464
    optimizercost_based_transformation     OFF
    active_instance_count     
    aq_tm_processes     1
    archive_lag_target     0
    asm_diskgroups     
    asm_diskstring     
    asm_power_limit     1
    audit_file_dest     /dboracle/orabase/product/10.1.0/rdbms/audit
    audit_sys_operations     FALSE
    audit_trail     NONE
    background_core_dump     partial
    background_dump_dest     /dborafiles/orbit/ORBIT01/admin/bdump
    backup_tape_io_slaves     TRUE
    bitmap_merge_area_size     1048576
    blank_trimming     FALSE
    buffer_pool_keep     
    buffer_pool_recycle     
    circuits     
    cluster_database     TRUE
    cluster_database_instances     3
    cluster_interconnects     
    commit_point_strength     1
    compatible     10.1.0
    control_file_record_keep_time     90
    control_files     #NAME?
    core_dump_dest     /dborafiles/orbit/ORBIT01/admin/cdump
    cpu_count     4
    create_bitmap_area_size     8388608
    create_stored_outlines     
    cursor_sharing     EXACT
    cursor_space_for_time     FALSE
    db_16k_cache_size     0
    db_2k_cache_size     0
    db_32k_cache_size     0
    db_4k_cache_size     0
    db_8k_cache_size     0
    db_block_buffers     0
    db_block_checking     FALSE
    db_block_checksum     TRUE
    db_block_size     8192
    db_cache_advice     ON
    db_cache_size     1073741824
    db_create_file_dest     #NAME?
    db_create_online_log_dest_1     #NAME?
    db_create_online_log_dest_2     #NAME?
    db_create_online_log_dest_3     
    db_create_online_log_dest_4     
    db_create_online_log_dest_5     
    db_domain     
    db_file_multiblock_read_count     64
    db_file_name_convert     
    db_files     999
    db_flashback_retention_target     1440
    db_keep_cache_size     0
    db_name     ORBIT
    db_recovery_file_dest     #NAME?
    db_recovery_file_dest_size     2.62144E+11
    db_recycle_cache_size     0
    db_unique_name     ORBIT
    db_writer_processes     1
    dbwr_io_slaves     0
    ddl_wait_for_locks     FALSE
    dg_broker_config_file1     /dboracle/orabase/product/10.1.0/dbs/dr1ORBIT.dat
    dg_broker_config_file2     /dboracle/orabase/product/10.1.0/dbs/dr2ORBIT.dat
    dg_broker_start     FALSE
    disk_asynch_io     TRUE
    dispatchers     
    distributed_lock_timeout     60
    dml_locks     9700
    drs_start     FALSE
    enqueue_resources     10719
    event     
    fal_client     
    fal_server     
    fast_start_io_target     0
    fast_start_mttr_target     0
    fast_start_parallel_rollback     LOW
    file_mapping     FALSE
    fileio_network_adapters     
    filesystemio_options     asynch
    fixed_date     
    gc_files_to_locks     
    gcs_server_processes     2
    global_context_pool_size     
    global_names     FALSE
    hash_area_size     131072
    hi_shared_memory_address     0
    hpux_sched_noage     0
    hs_autoregister     TRUE
    ifile     
    instance_groups     
    instance_name     ORBIT01
    instance_number     1
    instance_type     RDBMS
    java_max_sessionspace_size     0
    java_pool_size     67108864
    java_soft_sessionspace_limit     0
    job_queue_processes     10
    large_pool_size     318767104
    ldap_directory_access     NONE
    license_max_sessions     0
    license_max_users     0
    license_sessions_warning     0
    local_listener     
    lock_name_space     
    lock_sga     FALSE
    log_archive_config     
    log_archive_dest     
    log_archive_dest_1     LOCATION=+ORBT_A06635_DATA1_ASM/ORBIT/ARCHIVELOG/
    log_archive_dest_10     
    log_archive_dest_2     
    log_archive_dest_3     
    log_archive_dest_4     
    log_archive_dest_5     
    log_archive_dest_6     
    log_archive_dest_7     
    log_archive_dest_8     
    log_archive_dest_9     
    log_archive_dest_state_1     enable
    log_archive_dest_state_10     enable
    log_archive_dest_state_2     enable
    log_archive_dest_state_3     enable
    log_archive_dest_state_4     enable
    log_archive_dest_state_5     enable
    log_archive_dest_state_6     enable
    log_archive_dest_state_7     enable
    log_archive_dest_state_8     enable
    log_archive_dest_state_9     enable
    log_archive_duplex_dest     
    log_archive_format     %t_%s_%r.arc
    log_archive_local_first     TRUE
    log_archive_max_processes     2
    log_archive_min_succeed_dest     1
    log_archive_start     FALSE
    log_archive_trace     0
    log_buffer     1167360
    log_checkpoint_interval     0
    log_checkpoint_timeout     1800
    log_checkpoints_to_alert     FALSE
    log_file_name_convert     
    logmnr_max_persistent_sessions     1
    max_commit_propagation_delay     700
    max_dispatchers     
    max_dump_file_size     UNLIMITED
    max_enabled_roles     150
    max_shared_servers     
    nls_calendar     
    nls_comp     
    nls_currency     #
    nls_date_format     DD-MON-RRRR
    nls_date_language     ENGLISH
    nls_dual_currency     ?
    nls_iso_currency     UNITED KINGDOM
    nls_language     ENGLISH
    nls_length_semantics     BYTE
    nls_nchar_conv_excp     FALSE
    nls_numeric_characters     
    nls_sort     
    nls_territory     UNITED KINGDOM
    nls_time_format     HH24.MI.SSXFF
    nls_time_tz_format     HH24.MI.SSXFF TZR
    nls_timestamp_format     DD-MON-RR HH24.MI.SSXFF
    nls_timestamp_tz_format     DD-MON-RR HH24.MI.SSXFF TZR
    O7_DICTIONARY_ACCESSIBILITY     FALSE
    object_cache_max_size_percent     10
    object_cache_optimal_size     102400
    olap_page_pool_size     0
    open_cursors     1024
    open_links     4
    open_links_per_instance     4
    optimizer_dynamic_sampling     2
    optimizer_features_enable     10.1.0.5
    optimizer_index_caching     0
    optimizer_index_cost_adj     100
    optimizer_mode     ALL_ROWS
    os_authent_prefix     ops$
    os_roles     FALSE
    parallel_adaptive_multi_user     TRUE
    parallel_automatic_tuning     TRUE
    parallel_execution_message_size     4096
    parallel_instance_group     
    parallel_max_servers     80
    parallel_min_percent     0
    parallel_min_servers     0
    parallel_server     TRUE
    parallel_server_instances     3
    parallel_threads_per_cpu     2
    pga_aggregate_target     8589934592
    plsql_code_type     INTERPRETED
    plsql_compiler_flags     INTERPRETED
    plsql_debug     FALSE
    plsql_native_library_dir     
    plsql_native_library_subdir_count     0
    plsql_optimize_level     2
    plsql_v2_compatibility     FALSE
    plsql_warnings     DISABLE:ALL
    pre_page_sga     FALSE
    processes     600
    query_rewrite_enabled     TRUE
    query_rewrite_integrity     enforced
    rdbms_server_dn     
    read_only_open_delayed     FALSE
    recovery_parallelism     0
    remote_archive_enable     TRUE
    remote_dependencies_mode     TIMESTAMP
    remote_listener     
    remote_login_passwordfile     EXCLUSIVE
    remote_os_authent     FALSE
    remote_os_roles     FALSE
    replication_dependency_tracking     TRUE
    resource_limit     FALSE
    resource_manager_plan     
    resumable_timeout     0
    rollback_segments     
    serial_reuse     disable
    service_names     ORBIT
    session_cached_cursors     0
    session_max_open_files     10
    sessions     2205
    sga_max_size     3221225472
    sga_target     3221225472
    shadow_core_dump     partial
    shared_memory_address     0
    shared_pool_reserved_size     102760448
    shared_pool_size     318767104
    shared_server_sessions     
    shared_servers     0
    skip_unusable_indexes     TRUE
    smtp_out_server     
    sort_area_retained_size     0
    sort_area_size     65536
    sp_name     ORBIT
    spfile     #NAME?
    sql_trace     FALSE
    sql_version     NATIVE
    sql92_security     FALSE
    sqltune_category     DEFAULT
    standby_archive_dest     ?/dbs/arch
    standby_file_management     MANUAL
    star_transformation_enabled     TRUE
    statistics_level     TYPICAL
    streams_pool_size     0
    tape_asynch_io     TRUE
    thread     1
    timed_os_statistics     0
    timed_statistics     TRUE
    trace_enabled     TRUE
    tracefile_identifier     
    transactions     2425
    transactions_per_rollback_segment     5
    undo_management     AUTO
    undo_retention     7200
    undo_tablespace     UNDOTBS1
    use_indirect_data_buffers     FALSE
    user_dump_dest     /dborafiles/orbit/ORBIT01/admin/udump
    utl_file_dir     /orbit_serial/oracle/utl_out
    workarea_size_policy     AUTO

    The parameters are already unset in the environment, but do show up in v$parameter, much like shared_pool_size is visible in v$parameter despite only sga_target being set.
    SQL> show parameter sort
    NAME TYPE VALUE
    sortelimination_cost_ratio integer 5
    nls_sort string binary
    sort_area_retained_size integer 0
    sort_area_size integer 65536
    SQL> show parameter hash
    NAME TYPE VALUE
    hash_area_size integer 131072
    SQL> exit
    Only set hash_area_size and sort_area_size should only be set when not using automatic undo, which is not supported in EBS databases.
    Database Initialization Parameters for Oracle Applications 11i
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=216205.1

  • DOUBT REGARDING SORT_AREA_SIZE

    Hello,
    me a Jr.Dba when i executed a large query which contains indexes so many
    disks sorts are happening.so i wan't to increase the SORT_AREA_SIZE.
    If i wan't to increase BUFFER_CACHE_SIZE i simply take the assistance of
    V$DB_CACHE_ADVICE to know what is the next efficient value for BUFFER_CACHE_SIZE .
    like the above is there any thing else for SORT_AREA_SIZE ,i am not gettitng
    how much i should increase the parameter SORT_AREA_SIZE.Can u plz assist me on this
    Regards,
    Vamsi

    Hi user581473,
    if you are running on 9i and above SORT_AREA_SIZE will not be effective at all as long as you have not set WORKAREA_SIZE_POLICY to MANUAL.
    It defaults to AUTO!
    As of 9i we have PGA_AGGREGATE_TARGET which is used a pool for PGA memory needed for workareas.
    Only if you set this to MANUAL the paramteres SORT_AREA_SIZE, CREATE_BITMAP_AREA_SIZE and HASH_AREA_SIZE will be effective.
    Otherwise the optimizer thinks that every sorting can get 5% of PGA_AGGREGATE_TARGET for serial and 30% for parallel execution for the sorting in memory and create an execution plan based on this assumption.
    This applies only to dedicated servers in 9i and to shared servers as well as of 10g.
    If you are running a large operation you should set WORK_AREA_SIZE_POLICY to MANUAL on session level and also adjust your AREASIZE parameters for this session.
    So the reports and batch jpobs use manual PGA management and all the others (OLTP) can use the default.
    Hope it helps,
    =;-)

  • Desinger 10g Issue CDR-20043

    I have installed Oracle Designer 10g with Oracle 10g database on Windows XP, after repository creation when i try to connect designer its giving me a message < CRD-20043 Non-versioned repository has no workarea or insufficient privileges > . 2nd when i go to Repository object navigator to Invoke Workarea its disable.
    Please help me in this regard.
    Regards
    SS

    Sounds like an improperly installed reposity
    Try these instructions. This is set to my pc so youwill have to adjust to yours.
    After you install the IDS 10G in a new oracle home on the Client windows PC you will find the intall manual under:
    start - programs- Oracle Developer Suite - Designer documentation - Repository instalation Guide
    The following are the step I use to build a new repository
    You will need to set paths and names as you desire for your local PCs and repostiory.
    -- Step 1
    Log on as SYS
    This is so you can get the path name of your datafiles:
    select file_name, tablespace_name from dba_data_files;
    -- D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\TEMP_65.DBF
    create tablespace constant_grow_indexes
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\constant_grow_indexes_01.dbf'
    size 4000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace constant_grow_TABLES
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\constant_grow_tables_01.dbf'
    size 15000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace dependency_indexes
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\dependency_indexes_01.dbf'
    size 5600k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace dependency_tables
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\dependency_tables_01.dbf'
    size 9000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace diagram_indexes
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\diagram_indexes_01.dbf'
    size 1000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace diagram_tables
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\diagram_tables_01.dbf'
    size 2000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace lob_data
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\lob_data_01.dbf'
    size 1200k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace rapid_grow_indexes
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\rapid_grow_indexes_01.dbf'
    size 250000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace rapid_grow_tables
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\rapid_grow_tables_01.dbf'
    size 500000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace system_meta_indexes
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\system_meta_indexes_01.dbf'
    size 20000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace system_meta_tables
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\system_meta_tables_01.dbf'
    size 30000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace temporary_indexes
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\temporary_indexes_01.dbf'
    size 5000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace temporary_tables
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\temporary_tables_01.dbf'
    size 9000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace version_indexes
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\version_indexes_01.dbf'
    size 9000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    create tablespace version_tables
    datafile 'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\version_tables_01.dbf'
    size 12000k
    default storage (initial 100k next 100k minextents 1 maxextents UNLIMITED pctincrease 0);
    -- Step 2
    Make sure you ave plenty of space in your system tablespace
    select tablespace_name, sum(bytes)/1024/1024 from dba_free_space
    group by tablespace_name;
    alter tablespace system add datafile
    'D:\ORACLE2\PRODUCT\10.2.0\ORADATA\ORCL1022\system03.dbf' size 140m;
    -- Step 3
    As SYS
    create user owner identified by owner default tablespace users
    temporary tablespace temp;
    Run this file as SYS
    @ D:\Designer_Home\IDS10_1_2\repadm61\UTL\CKROROLE.SQL
    GRANT EXECUTE ON DBMS_LOCK TO owner;
    GRANT EXECUTE ON DBMS_PIPE TO owner;
    GRANT CREATE TABLE TO owner;
    GRANT CREATE VIEW TO owner;
    GRANT CREATE PROCEDURE TO owner;
    GRANT CREATE SYNONYM TO owner;
    GRANT CREATE SEQUENCE TO owner;
    GRANT SELECT ON v_$nls_parameters TO owner WITH GRANT OPTION;
    GRANT SELECT on sys.V_$PARAMETER TO owner;
    GRANT SELECT ON dba_rollback_segs TO owner;
    GRANT SELECT ON dba_segments TO owner;
    GRANT CREATE ANY SYNONYM TO owner;
    GRANT DROP ANY SYNONYM TO owner;
    GRANT CREATE PUBLIC SYNONYM TO owner;
    GRANT DROP PUBLIC SYNONYM TO owner;
    GRANT ck_oracle_repos_owner to owner;
    GRANT CONNECT, RESOURCE TO owner;
    GRANT dba TO owner;
    (If you want Row Level Security (RLS) on)
    GRANT execute on dbms_rls to owner;
    -- Step 4 Adding a user
    create user user65 identified by user65 default tablespace users
    temporary tablespace temp;
    GRANT CONNECT, RESOURCE TO user65;
    GRANT CKR_OWNER TO USER65;
    GRANT CREATE TABLE TO user65;
    GRANT CREATE VIEW TO user65;
    GRANT CREATE PROCEDURE TO user65;
    GRANT CREATE SYNONYM TO user65;
    GRANT CREATE SEQUENCE TO user65;
    GRANT SELECT ON dba_rollback_segs TO user65;
    GRANT SELECT ON dba_segments TO user65;
    GRANT CKR_OWNER TO USER65;
    GRANT EXECUTE ON SDD_ACC_PRIV_LIST TO USER65;
    GRANT EXECUTE ON SDD_SYS_PRIV_LIST TO USER65;
    GRANT SELECT ON SDD_DEPENDENCY_TYPES TO USER65;
    GRANT SELECT ON I$RM_ELEMENT_TYPES TO USER65;
    GRANT SELECT ON SDD_GLOBAL_NAMES TO USER65;
    GRANT EXECUTE ON JR_UTIL TO USER65;
    GRANT EXECUTE ON JR_SYSTEM_UTIL TO USER65;
    GRANT EXECUTE ON CKMIGFUN TO USER65;
    -- Step 5
    The following are the recommended minimum settings.
    optimizer_mode = Choose
    compatible = 9.0.0 # for an Oracle9i database
    compatible = 8.1.7 # for an Oracle8i database
    max_enabled_roles = 30
    sort_area_size = 262144
    sort_area_retained_size = 65536
    hash_area_size = 1048576
    optimizer_index_caching = 50
    optimizer_index_cost_adj = 25
    shared_pool_size = 32000000
    db_block_buffers # comment out on an Oracle9i database
    db_block_buffers = 2000 # on an Oracle8i database
    open_cursors = 3000
    processes = 100
    db_file_multiblock_read_count=16 # for a 4K Oracle block size
    db_file_multiblock_read_count=32 # for a 2K Oracle block size
    db_file_multiblock_read_count=8 # for a 8K Oracle block size
    Step 5b - (Oracle 9i or 10.2 DB) Install Oracle 9i or 10.2 Import and Export Utilities
    Before installing Designer Repository on an Oracle 9i or 10.2 database, you need to set up the installation workstation to use the Oracle 9i or 10.2 import and export utilities. To do so, perform the following steps at the workstation from which you will be running the repository installation:
    From the Oracle 9i or 10.2 installation media, install the Oracle 9i or 10.2 import and export utilities in a dedicated Oracle home.
    In the Windows Registry, locate the key named:
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_HomeName\REPOS61
    where HOMEn is the home number of the home installed into for a multiple Oracle home environment, but is not present where the default Oracle home is being used.
    Change the value of the EXECUTE_IMPORT and EXECUTE_EXPORT variables to point to the new Oracle home. Thus, if the new Oracle home is d:\des_9i, the settings would be:
    d:\des_9i\bin\exp.exe
    d:\des_9i\bin\imp.exe
    -- Step 6
    Log on to the Repository Admin Utility of Designer
    start - programs- Oracle Developer Suite - Designer - Repository Admin Utility
    Install Repository button
    Make sure both check boxes are checked(one is grayed out) Next
    Select the proper tablespace for the seletced box
    Start the install.

  • How do i know if my query using  SORT_AREA_SIZE   or temporary tablespace ?

    Good Morning  Everyone !
    My DB version is 10.2.0.1
    I have large table  exactly 3 million records.
    SQL> select count(*) from tab1;
    COUNT(*)
       300000
    SQL> select * from tab1 order by no DESC;
    sorting  ... in process
    300000 rows selected.
    in Terminal 2 : I tried to find  sorting details -   ( No rows  selected - why ? )
    SQL> select USERNAME , USER , TABLESPACE , SQL_ID from v$tempseg_usage  ;
    no rows selected
    SQL> /
    no rows selected
    When i google i have seen this ;
    If  Oracle cannot do the sort in memory  (SORT_AREA_SIZE initialisation parameter), space will be allocated in a temporary tablespace for doing the sort operation.
    REF_LINK : TEMPORARY Tablespaces and TEMPFILES | Oracle FAQ
    MY DOUBT QUESTION :   How do i know if my query using  SORT_AREA_SIZE   or temporary tablespace ?
    Thanks in advance.

    @ JohnWatson
    I have seen some articles from ORA - FAQ. Good.
    SQL> select USERNAME , USER , TABLESPACE , SQL_ID from v$tempseg_usage;
    USERNAME                       USER   TABLESPACE                      SQL_ID
       SCOTT                               SYS          TEMP                            fh9vqgyd6m0d1
    PGA management means that sorting only 300000 rows  may well occur in memory
                Is this (3 million rows) -  standard  value for 10g version ?
    Thanks JohnWatson

  • Problem using template in database configuration assistant Oracle 10g

    Hi,
    I created a database using the database configuration assistant for Oracle 10g on a Windows Server 2003 box. The database I created worked perfectly, and I had saved it as a template so I could save some time when creating similar databases (which I have to do on occasion)
    When I try to use the template though, I get an error (at about 4% through the database creation) saying:
    ORA-01501: CREATE DATABASE failed
    ORA-09314: sltln: error translating logical name
    I'm creating this new database on the same server as the one I created my previous database on and NOTHING has changed on it, I did this just minutes apart and can duplicate it at will (just try and use a template)
    Heres the template file contents (KM1.dbt)
    <DatabaseTemplate name="KM1" description="" version="10.1.0.2.0">
    <CommonAttributes>
    <option name="ISEARCH" value="false"/>
    <option name="OMS" value="false"/>
    <option name="JSERVER" value="false"/>
    <option name="SPATIAL" value="false"/>
    <option name="ODM" value="false">
    <tablespace id="SYSAUX"/>
    </option>
    <option name="IMEDIA" value="false"/>
    <option name="XDB_PROTOCOLS" value="false">
    <tablespace id="SYSAUX"/>
    </option>
    <option name="ORACLE_TEXT" value="false">
    <tablespace id="SYSAUX"/>
    </option>
    <option name="SAMPLE_SCHEMA" value="false"/>
    <option name="CWMLITE" value="false">
    <tablespace id="SYSAUX"/>
    </option>
    <option name="EM_REPOSITORY" value="true">
    <tablespace id="SYSAUX"/>
    </option>
    </CommonAttributes>
    <Variables/>
    <CustomScripts Execute="false"/>
    <InitParamAttributes>
    <InitParams>
    <initParam name="O7_DICTIONARY_ACCESSIBILITY" value="TRUE"/>
    <initParam name="background_dump_dest" value="{ORACLE_BASE}\admin\{DB_UNIQUE_NAME}\bdump"/>
    <initParam name="compatible" value="10.1.0.2.0"/>
    <initParam name="core_dump_dest" value="{ORACLE_BASE}\admin\{DB_UNIQUE_NAME}\cdump"/>
    <initParam name="db_block_size" value="8" unit="KB"/>
    <initParam name="db_cache_size" value="24" unit="MB"/>
    <initParam name="db_create_file_dest" value="E:\oradata"/>
    <initParam name="db_create_online_log_dest_1" value="C:\Oradata"/>
    <initParam name="db_create_online_log_dest_2" value="D:\Oradata"/>
    <initParam name="db_create_online_log_dest_3" value="E:\Oradata"/>
    <initParam name="db_domain" value="JACOBSONCO.COM"/>
    <initParam name="db_file_multiblock_read_count" value="16"/>
    <initParam name="db_name" value="UDC7"/>
    <initParam name="db_recovery_file_dest" value="E:\UDC7\flash_recovery_area"/>
    <initParam name="db_recovery_file_dest_size" value="2048" unit="MB"/>
    <initParam name="java_pool_size" value="0" unit="MB"/>
    <initParam name="job_queue_processes" value="10"/>
    <initParam name="large_pool_size" value="8" unit="MB"/>
    <initParam name="open_cursors" value="1000"/>
    <initParam name="pga_aggregate_target" value="24" unit="MB"/>
    <initParam name="processes" value="150"/>
    <initParam name="remote_login_passwordfile" value="EXCLUSIVE"/>
    <initParam name="shared_pool_size" value="80" unit="MB"/>
    <initParam name="sort_area_size" value="65536"/>
    <initParam name="undo_management" value="AUTO"/>
    <initParam name="undo_tablespace" value="UNDOTBS1"/>
    <initParam name="user_dump_dest" value="{ORACLE_BASE}\admin\{DB_UNIQUE_NAME}\udump"/>
    </InitParams>
    <MiscParams>
    <databaseType>MULTIPURPOSE</databaseType>
    <maxUserConn>20</maxUserConn>
    <percentageMemTOSGA>40</percentageMemTOSGA>
    <customSGA>true</customSGA>
    <characterSet>WE8MSWIN1252</characterSet>
    <nationalCharacterSet>AL16UTF16</nationalCharacterSet>
    <archiveLogMode>false</archiveLogMode>
    <initParamFileName>{ORACLE_BASE}\admin\{DB_UNIQUE_NAME}\pfile\init.ora</initParamFileName>
    </MiscParams>
    <SPfile useSPFile="true">{ORACLE_HOME}\database\spfile{SID}.ora</SPfile>
    </InitParamAttributes>
    <StorageAttributes>
    <ControlfileAttributes id="Controlfile">
    <maxDatafiles>100</maxDatafiles>
    <maxLogfiles>16</maxLogfiles>
    <maxLogMembers>3</maxLogMembers>
    <maxLogHistory>1</maxLogHistory>
    <maxInstances>8</maxInstances>
    <image name="&lt;OMF_CONTROL_0>" filepath="{ORACLE_BASE}\oradata\{DB_UNIQUE_NAME}\"/>
    <image name="&lt;OMF_CONTROL_1>" filepath="{ORACLE_BASE}\oradata\{DB_UNIQUE_NAME}\"/>
    <image name="&lt;OMF_CONTROL_2>" filepath="{ORACLE_BASE}\oradata\{DB_UNIQUE_NAME}\"/>
    </ControlfileAttributes>
    <DatafileAttributes id="&lt;OMF_SNIKEB_DATAFILE_0>">
    <tablespace>SNIKEB</tablespace>
    <temporary>false</temporary>
    <online>true</online>
    <status>0</status>
    <size unit="MB">300</size>
    <reuse>false</reuse>
    <autoExtend>false</autoExtend>
    <increment unit="KB">-2</increment>
    <maxSize unit="KB">-1</maxSize>
    </DatafileAttributes>
    <DatafileAttributes id="&lt;OMF_SYSAUX_DATAFILE_0>">
    <tablespace>SYSAUX</tablespace>
    <temporary>false</temporary>
    <online>true</online>
    <status>0</status>
    <size unit="MB">120</size>
    <reuse>true</reuse>
    <autoExtend>true</autoExtend>
    <increment unit="KB">10240</increment>
    <maxSize unit="MB">-1</maxSize>
    </DatafileAttributes>
    <DatafileAttributes id="&lt;OMF_SYSTEM_DATAFILE_0>">
    <tablespace>SYSTEM</tablespace>
    <temporary>false</temporary>
    <online>true</online>
    <status>0</status>
    <size unit="MB">300</size>
    <reuse>true</reuse>
    <autoExtend>true</autoExtend>
    <increment unit="KB">10240</increment>
    <maxSize unit="MB">-1</maxSize>
    </DatafileAttributes>
    <DatafileAttributes id="&lt;OMF_TEMP_DATAFILE_0>">
    <tablespace>TEMP</tablespace>
    <temporary>false</temporary>
    <online>true</online>
    <status>0</status>
    <size unit="MB">20</size>
    <reuse>true</reuse>
    <autoExtend>true</autoExtend>
    <increment unit="KB">640</increment>
    <maxSize unit="MB">-1</maxSize>
    </DatafileAttributes>
    <DatafileAttributes id="&lt;OMF_UNDOTBS1_DATAFILE_0>">
    <tablespace>UNDOTBS1</tablespace>
    <temporary>false</temporary>
    <online>true</online>
    <status>0</status>
    <size unit="MB">200</size>
    <reuse>true</reuse>
    <autoExtend>true</autoExtend>
    <increment unit="KB">5120</increment>
    <maxSize unit="MB">-1</maxSize>
    </DatafileAttributes>
    <DatafileAttributes id="&lt;OMF_USERS_DATAFILE_0>">
    <tablespace>USER_DATA</tablespace>
    <temporary>false</temporary>
    <online>true</online>
    <status>0</status>
    <size unit="MB">5</size>
    <reuse>true</reuse>
    <autoExtend>true</autoExtend>
    <increment unit="KB">1280</increment>
    <maxSize unit="MB">-1</maxSize>
    </DatafileAttributes>
    <TablespaceAttributes id="SNIKEB">
    <online>true</online>
    <offlineMode>1</offlineMode>
    <readOnly>false</readOnly>
    <temporary>false</temporary>
    <defaultTemp>false</defaultTemp>
    <undo>false</undo>
    <local>true</local>
    <blockSize>-1</blockSize>
    <allocation>1</allocation>
    <uniAllocSize unit="KB">-1</uniAllocSize>
    <initSize unit="KB">-1</initSize>
    <increment unit="KB">-1</increment>
    <incrementPercent>-1</incrementPercent>
    <minExtends>-1</minExtends>
    <maxExtends>-2</maxExtends>
    <minExtendsSize unit="KB">-1</minExtendsSize>
    <logging>true</logging>
    <recoverable>false</recoverable>
    <maxFreeSpace>0</maxFreeSpace>
    <autoSegmentMgmt>true</autoSegmentMgmt>
    <datafilesList>
    <TablespaceDatafileAttributes id="&lt;OMF_SNIKEB_DATAFILE_0>">
    <id>1</id>
    </TablespaceDatafileAttributes>
    </datafilesList>
    </TablespaceAttributes>
    <TablespaceAttributes id="SYSAUX">
    <online>true</online>
    <offlineMode>1</offlineMode>
    <readOnly>false</readOnly>
    <temporary>false</temporary>
    <defaultTemp>false</defaultTemp>
    <undo>false</undo>
    <local>true</local>
    <blockSize>-1</blockSize>
    <allocation>1</allocation>
    <uniAllocSize unit="KB">-1</uniAllocSize>
    <initSize unit="KB">64</initSize>
    <increment unit="KB">64</increment>
    <incrementPercent>50</incrementPercent>
    <minExtends>1</minExtends>
    <maxExtends>4096</maxExtends>
    <minExtendsSize unit="KB">64</minExtendsSize>
    <logging>true</logging>
    <recoverable>false</recoverable>
    <maxFreeSpace>0</maxFreeSpace>
    <autoSegmentMgmt>true</autoSegmentMgmt>
    <datafilesList>
    <TablespaceDatafileAttributes id="&lt;OMF_SYSAUX_DATAFILE_0>">
    <id>-1</id>
    </TablespaceDatafileAttributes>
    </datafilesList>
    </TablespaceAttributes>
    <TablespaceAttributes id="SYSTEM">
    <online>true</online>
    <offlineMode>1</offlineMode>
    <readOnly>false</readOnly>
    <temporary>false</temporary>
    <defaultTemp>false</defaultTemp>
    <undo>false</undo>
    <local>true</local>
    <blockSize>-1</blockSize>
    <allocation>3</allocation>
    <uniAllocSize unit="KB">-1</uniAllocSize>
    <initSize unit="KB">64</initSize>
    <increment unit="KB">64</increment>
    <incrementPercent>50</incrementPercent>
    <minExtends>1</minExtends>
    <maxExtends>-1</maxExtends>
    <minExtendsSize unit="KB">64</minExtendsSize>
    <logging>true</logging>
    <recoverable>false</recoverable>
    <maxFreeSpace>0</maxFreeSpace>
    <autoSegmentMgmt>true</autoSegmentMgmt>
    <datafilesList>
    <TablespaceDatafileAttributes id="&lt;OMF_SYSTEM_DATAFILE_0>">
    <id>-1</id>
    </TablespaceDatafileAttributes>
    </datafilesList>
    </TablespaceAttributes>
    <TablespaceAttributes id="TEMP">
    <online>true</online>
    <offlineMode>1</offlineMode>
    <readOnly>false</readOnly>
    <temporary>true</temporary>
    <defaultTemp>true</defaultTemp>
    <undo>false</undo>
    <local>true</local>
    <blockSize>-1</blockSize>
    <allocation>1</allocation>
    <uniAllocSize unit="KB">-1</uniAllocSize>
    <initSize unit="KB">64</initSize>
    <increment unit="KB">64</increment>
    <incrementPercent>0</incrementPercent>
    <minExtends>1</minExtends>
    <maxExtends>0</maxExtends>
    <minExtendsSize unit="KB">64</minExtendsSize>
    <logging>true</logging>
    <recoverable>false</recoverable>
    <maxFreeSpace>0</maxFreeSpace>
    <autoSegmentMgmt>true</autoSegmentMgmt>
    <datafilesList>
    <TablespaceDatafileAttributes id="&lt;OMF_TEMP_DATAFILE_0>">
    <id>-1</id>
    </TablespaceDatafileAttributes>
    </datafilesList>
    </TablespaceAttributes>
    <TablespaceAttributes id="UNDOTBS1">
    <online>true</online>
    <offlineMode>1</offlineMode>
    <readOnly>false</readOnly>
    <temporary>false</temporary>
    <defaultTemp>false</defaultTemp>
    <undo>true</undo>
    <local>true</local>
    <blockSize>-1</blockSize>
    <allocation>1</allocation>
    <uniAllocSize unit="KB">-1</uniAllocSize>
    <initSize unit="KB">512</initSize>
    <increment unit="KB">512</increment>
    <incrementPercent>50</incrementPercent>
    <minExtends>8</minExtends>
    <maxExtends>4096</maxExtends>
    <minExtendsSize unit="KB">512</minExtendsSize>
    <logging>true</logging>
    <recoverable>false</recoverable>
    <maxFreeSpace>0</maxFreeSpace>
    <autoSegmentMgmt>true</autoSegmentMgmt>
    <datafilesList>
    <TablespaceDatafileAttributes id="&lt;OMF_UNDOTBS1_DATAFILE_0>">
    <id>-1</id>
    </TablespaceDatafileAttributes>
    </datafilesList>
    </TablespaceAttributes>
    <TablespaceAttributes id="USER_DATA">
    <online>true</online>
    <offlineMode>1</offlineMode>
    <readOnly>false</readOnly>
    <temporary>false</temporary>
    <defaultTemp>false</defaultTemp>
    <undo>false</undo>
    <local>true</local>
    <blockSize>-1</blockSize>
    <allocation>1</allocation>
    <uniAllocSize unit="KB">-1</uniAllocSize>
    <initSize unit="KB">128</initSize>
    <increment unit="KB">128</increment>
    <incrementPercent>0</incrementPercent>
    <minExtends>1</minExtends>
    <maxExtends>4096</maxExtends>
    <minExtendsSize unit="KB">128</minExtendsSize>
    <logging>true</logging>
    <recoverable>false</recoverable>
    <maxFreeSpace>0</maxFreeSpace>
    <autoSegmentMgmt>true</autoSegmentMgmt>
    <datafilesList>
    <TablespaceDatafileAttributes id="&lt;OMF_USERS_DATAFILE_0>">
    <id>-1</id>
    </TablespaceDatafileAttributes>
    </datafilesList>
    </TablespaceAttributes>
    <RedoLogGroupAttributes id="1">
    <reuse>false</reuse>
    <fileSize unit="KB">10240</fileSize>
    <Thread>1</Thread>
    <member ordinal="0" memberName="OMF_1_REDOLOG_MEMBER_0" filepath="{ORACLE_BASE}\oradata\{DB_UNIQUE_NAME}\"/>
    </RedoLogGroupAttributes>
    <RedoLogGroupAttributes id="2">
    <reuse>false</reuse>
    <fileSize unit="KB">10240</fileSize>
    <Thread>1</Thread>
    <member ordinal="0" memberName="OMF_2_REDOLOG_MEMBER_0" filepath="{ORACLE_BASE}\oradata\{DB_UNIQUE_NAME}\"/>
    </RedoLogGroupAttributes>
    <RedoLogGroupAttributes id="3">
    <reuse>false</reuse>
    <fileSize unit="KB">10240</fileSize>
    <Thread>1</Thread>
    <member ordinal="0" memberName="OMF_3_REDOLOG_MEMBER_0" filepath="{ORACLE_BASE}\oradata\{DB_UNIQUE_NAME}\"/>
    </RedoLogGroupAttributes>
    </StorageAttributes>
    </DatabaseTemplate>
    can anyone explain why I keep getting this error?
    Thanks

    Error:     ORA-9314
    Text:     sltln: error translating logical name
    Cause:     Internal buffer may have overflowed
    Action:     See OSD error accompanying this message
    Check alertlog and trace files.
    Message was edited by:
    FeNiCrC_Neil

  • How to set sort_area_size

    hello
    I’m dealing with a query in which almost 100 inner joins involved. I will post query if needed. Basically it is insert statement but I run only it selection part it take 40 minutes. When I run ASH REPORT during execution I found direct path read temp, direct path write temp in top user event , buffer busy waits, control file sequential read,. I’m using 11g with automatic memory management 9Gb assign to memeory_target, and memeory_max_target,. My workarea_size_policy is auto and sort_area_size
    is default 64k. all sory take palce in temp almost 10 to 15 GB temp use when I executes this select statement. I know it is very difficult to sorry all in memory but it should not done all in temp. I wanted to change workarea_size_policyto manual and set sort_area_size. What would be the size of sort_area_size ? I was reading a BOOK of Jonathan Lewis COST based oracle fundamental in which he told us the way to sizing the sort_area_size. But he did not show how he calculated this size and he did only for one table in my case five table join with one table. How I calculate size
    Here is John Example
    After using the dbms_stats.gather_table_stats procedure, I can check view user_tables
    to confirm that the table fills 2,753 blocks, and holds 1,048,576 rows with an avg_row_len of
    14 bytes, and that the avg_col_len for column sortcode is 7 bytes (the v2, v3 columns are there
    simply to avoid the possibility of some funny boundary conditions appearing). These 7 bytes
    include the 1 byte that holds the column length itself, so we can work out that the total volume
    of data sorted must be 6MB, and that my memory allocation of 1MB is not going to be sufficient
    for an in-memory (optimal) sort.

    Oracle Studnet wrote:
    I know it is very difficult to sorry all in memory but it should not done all in temp. I wanted to change workarea_size_policyto manual and set sort_area_size. What would be the size of sort_area_sizeIn 11g you can check for a long running query in V$SQL_PLAN_MONITOR how much memory each workarea execution consumed (just to check if your automatic workarea_size_policy seems to be an issue).
    You can run your query with DBMS_XPLAN.DISPLAY_CURSOR get the estimated memory requirements for optimal and single pass executions in the columns "OMem", "1Mem" and "Used-Mem" of the DISPLAY_CURSOR output.
    More information about using the DISPLAY_CURSOR function properly can be found here:
    http://jonathanlewis.wordpress.com/2006/11/09/dbms_xplan-in-10g/
    http://structureddata.org/2007/11/21/troubleshooting-bad-execution-plans/
    http://rwijk.blogspot.com/2008/03/dbmsxplandisplaycursor.html
    Christian Antognini points out that the TEMPSEG_SIZE information of DISPLAY_CURSOR is using the wrong units: http://antognini.ch/2009/05/wrong-information-about-temporary-space-usage/
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Note 830576 - Parameter recommendations for Oracle 10g

    hi all DBA experts.
    I am not good familiar with Oracle database while i read a Note 830576 - Parameter recommendations for Oracle 10g. in which SAP General Recommendation:
    You should delete obsolete initialization parameters from the profile.
    To determine which obsolete parameters are currently set, proceed as follows:
    SQL> SELECT NAME FROM V$OBSOLETE_PARAMETER WHERE ISSPECIFIED = 'TRUE';
    when i execute above command then result is no rows selected
    while there are many parameters in above SAP Note which are already obsolete and not set in initSID.ora file.
    for exp.  the parameter OPTIMIZER_INDEX_COST_ADJ  is showing
    #### OPTIMIZER MODE
    #optimizer_index_cost_adj = 10
    as you know that this parameter is very important regarding System Performance.
    now please guide me . I have to set these parameter or no need while there is not showing any parameters against obsolete command.
    waiting you valuable reply.
    Regards,

    hi both,
    thanks for knowledge sharing with me other SDN users,
    Dear Orkun,
    Ok. At this stage, I can recommend you that apply what they have suggested,
    in the message. So, you already did a part of it by configuring
    Oracle parameters, already.
    SAP support sent me this file (PRD_Parameters)
    *** INFORMATION  1 ***
    *** INFORMATION  2 ***
    *** INFORMATION  3 ***
    *** INFORMATION  4 ***
    *** INFORMATION  5 ***
    *** INFORMATION  6 ***
    *** INFORMATION  7 ***
    *** INFORMATION  8 ***
    *** INFORMATION  9 ***
    *** INFORMATION 10 ***
    *** INFORMATION 11 ***
    _b_tree_bitmap_plans
    _fix_control (4728348)
    event (10753)
    event (38087)
    event (10183)
    optimizer_index_cost_adj
    star_transformation_enabled
    event (10027)
    event (10028)
    event (10411)
    event (10629)
    event (14532)
    _fix_control (5705630)
    _fix_control (5765456)
    _optimizer_mjc_enabled
    _sort_elimination_cost_ratio
    event (10091)
    event (10142)
    event (38068)
    event (38085)
    event (44951)
    parallel_execution_message_size
    parallel_threads_per_cpu
    query_rewrite_enabled
    log_archive_dest_1
    log_archive_format
    max_dump_file_size
    optimizer_features_enable
    log_archive_dest
    _push_join_union_view
    _cursor_features_enabled
    _first_spare_parameter
    event (10049)
    db_writer_processes
    parallel_max_servers
    db_cache_size
    pga_aggregate_target
    processes
    sessions
    dml_locks
    job_queue_processes
    log_checkpoint_interval
    remote_login_passwordfile
    sga_max_size
    shared_pool_reserved_size
    sort_area_retained_size
    sort_area_size
    statistics_level
    workarea_size_policy
    they only highlighted these following parameters from above
    **** INFORMATION  8 ***     DB Patchset: 10.2.0.4.0
    **** INFORMATION  9 ***     DB Mergefix: 0 (released before 2008-07-11)
    FYI... recently, i applied the Oracle Patches 10.2.0.4 in this sequence
    MS Windows x86-64 (64-bit)
    Patchset_10204_MSWIN-x86-64aa.bin
    Patchset_10204_MSWIN-x86-64ab.bin
    Patchset_10204_MSWIN-x86-64ac.bin
    OPatch
    OPatch_10205_Generic_v0.zip
    Generic (32-bit / 64-bit)
    p8350262_10204_Generic.zip
    p7592030_10204_WIN_GENERIC.zip
    p9254968_10204_WIN_GENERIC.zip
    10204_Patch44_MSWIN-x86-64.zip
    p9584028_102040_Generic.zip
    p9843740_10204_Generic.zip
    and please tell me , still i have to apply highlighted parameters or now no need.
    Regards,

  • Oracle 9i & 10g replicated to MSSQL 2005 Enterprise: Problem !

    Hi,
    I have been doing some oracle 9i and 10g Replication to MSSQL 2005 Enterprise Database using the SQL 2005 Server Enterprise replication tool. This is working great, however, we recentrly had some problems on the Oracle side getting errors on new connection for both 9i and 10g servers. Only restarting the server has solved the problem so far....
    The complete procedure to to this setup is available on Microsoft Technet:
    http://www.microsoft.com/technet/prodtechnol/sql/2005/technologies/repl_quickstart_for_oracle.mspx
    If anyone could help me regarding the problem on new connections problem I would appreciate
    Here are the errors we are getting:
    10g Agent connection Error on the Database 10g:
    Timestamp=Jul 4, 2008 2:29:03 PM EDT
    Severity=Critical
    Message=Failed to connect to database instance: ORA-12518: TNS:listener could not hand off client connection (DBD ERROR: OCIServerAttach).
    10g Agent connection Error on the Database 9i:
    Timestamp=Jul 10, 2008 10:51:16 AM EDT
    Severity=Critical
    Message=Failed to connect to database instance: ORA-04031: unable to allocate %s bytes of shared memory ("%s","%s","%s","%s") (DBD ERROR: OCISessionBegin).
    Notification Rule Name=Send Email For Database Event
    Notification Rule Owner=SYSMAN
    Notification Count=1
    The clients applications are having similar errors when trying to connect. This seems to be happening after replication has been running for a while (1 -2 weeks) on the SQL server 2005 side...
    We are using Snapshot Replication for the 10g database (every 20 minutes)
    and transactional replication on the 9i database...
    We are replicating 28 tables from the 10g database (500Mb Via Snapshot Replication)
    And 171 Tables for the 9i databases (Near 3Gb Via Transactional Replication)
    Thanks for the help !

    Here is an error from the 9i database Client: (this seems to be correct %s values)
    ORA-04031: Unable to allocate 20236 bytes of shared memory("shared pool", "unknown object", "sga heap(1,0)", "session param values");
    Here is the 9i database Init.ora:
    # Copyright (c) 1991, 2001, 2002 by Oracle Corporation
    # Cache and I/O
    db_block_size=8192
    db_cache_size=25165824
    db_file_multiblock_read_count=16
    # Cursors and Library Cache
    open_cursors=300
    # Database Identification
    db_domain=Something.com
    db_name=Something
    # Diagnostics and Statistics
    background_dump_dest=C:\oracle\admin\Something\bdump
    core_dump_dest=C:\oracle\admin\Something\cdump
    timed_statistics=TRUE
    user_dump_dest=C:\oracle\admin\Something\udump
    # File Configuration
    control_files=("D:\oracle\oradata\Something\CONTROL01.CTL", "D:\oracle\oradata\Something\CONTROL02.CTL", "D:\oracle\oradata\Something\CONTROL03.CTL")
    # Instance Identification
    instance_name=Something
    # Job Queues
    job_queue_processes=10
    # MTS
    dispatchers="(PROTOCOL=TCP) (SERVICE=SomethingXDB)"
    # Miscellaneous
    aq_tm_processes=1
    compatible=9.2.0.0.0
    # Optimizer
    hash_join_enabled=TRUE
    query_rewrite_enabled=FALSE
    star_transformation_enabled=FALSE
    # Pools
    java_pool_size=33554432
    large_pool_size=8388608
    shared_pool_size=50331648
    # Processes and Sessions
    processes=150
    # Redo Log and Recovery
    fast_start_mttr_target=300
    # Security and Auditing
    remote_login_passwordfile=EXCLUSIVE
    # Sort, Hash Joins, Bitmap Indexes
    pga_aggregate_target=25165824
    sort_area_size=524288
    # System Managed Undo and Rollback Segments
    undo_management=AUTO
    undo_retention=10800
    undo_tablespace=UNDOTBS1
    Here is the Database 10g init.ora:
    SomeDB.__db_cache_size=1216348160
    SomeDB.__java_pool_size=8388608
    SomeDB.__large_pool_size=8388608
    SomeDB.__shared_pool_size=343932928
    SomeDB.__streams_pool_size=0
    *.audit_file_dest='D:\oracle\product\10.2.0\admin\SomeDB\adump'
    *.background_dump_dest='D:\oracle\product\10.2.0\admin\SomeDB\bdump'
    *.compatible='10.2.0.3.0'
    *.control_files='D:\oracle\product\10.2.0\oradata\SomeDB\control01.ctl','D:\oracle\product\10.2.0\oradata\SomeDB\control02.ctl','D:\oracle\product\10.2.0\oradata\SomeDB\control03.ctl'
    *.core_dump_dest='D:\oracle\product\10.2.0\admin\SomeDB\cdump'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_name='SomeDB
    *.job_queue_processes=10
    *.log_archive_dest='D:\Backup\SomeDB\Archives'
    *.log_archive_start='true'
    *.open_cursors=300
    *.pga_aggregate_target=525336576
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=1578106880
    *.undo_management='AUTO'
    *.undo_tablespace='RBS'
    *.user_dump_dest='D:\oracle\product\10.2.0\admin\SomeDB\udump'
    On the 10g database we get the error: ORA-12518: TNS:listener could not hand off client connection (DBD ERROR: OCIServerAttach).
    The application for the Database 10g Is web based and uses Tomcat, I seems to get similar errors in the tomcat log:
    java.sql.SQLException: ORA-04030: out of process memory when trying to allocate 1046552 bytes

  • SORT_AREA_SIZE+Oracle dedicated servers

    Hi Friends,
    I am using Oracle 10g server release 2,Today i have gone through the Orcale docs,its written there that
    "Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_SIZE is retained for backward compatibility"
    My database is designed in dedicated mode..now how to handle large sorts in that case,as oracle recommends something different
    thanx
    somy

    Oracle document covers nicely the [PGA Memory Management|http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#PFGRF01401]
    Check out [V$PGA_TARGET_ADVICE|http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#i49570] for getting an idea about the ideal size of your PGA.
    Thanks,
    Karthick.

  • Oracle 10g DB connecting for sys,system but not for other users

    Hi,
    I have oracle 10g in Windows XP. I am able to connect to database using sys/pwd@db as sysdba. All SYSDBA users able to connect DB.
    When I try to connect using user, Its not throwing any error but not connecting. Just the cursor is blinking...
    How to fix this issue.
    Thanks in advance
    -Mani

    Hi,
    I didnt see any error message in alert log. Its not logging any message while connecting DB using SYSDBA.
    My DB is in NOARCHIVELOG mode.
    Sill non DBA users are not able to login.
    what could be the reason for this issue?
    Any help....
    Below is my alert log......
    Dump file d:\oracle\product\10.1.0\admin\orcl10g\bdump\alert_orcl10g.log
    Sat Apr 26 13:51:24 2008
    ORACLE V10.1.0.2.0 - Production vsnsta=0
    vsnsql=13 vsnxtr=3
    Windows XP Version V5.1 Service Pack 2
    CPU : 2 - type 586
    Process Affinity: 0x00000000
    Memory (A/P) : PH:270M/1014M, PG:852M/2441M, VA:1959M/2047M
    Sat Apr 26 13:51:24 2008
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 2
    KCCDEBUG_LEVEL = 0
    Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
    Autotune of undo retention is turned on.
    Dynamic strands is set to TRUE
    Running with 2 shared and 18 private strand(s). Zero-copy redo is FALSE
    IMODE=BR
    ILAT =18
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    Starting up ORACLE RDBMS Version: 10.1.0.2.0.
    System parameters with non-default values:
    processes = 150
    shared_pool_size = 83886080
    large_pool_size = 8388608
    java_pool_size = 50331648
    resource_manager_plan = INTERNAL_QUIESCE
    control_files = D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\CONTROL01.CTL, D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\CONTROL02.CTL, D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\CONTROL03.CTL
    db_block_size = 8192
    db_cache_size = 25165824
    compatible = 10.1.0.2.0
    db_file_multiblock_read_count= 16
    db_recovery_file_dest = D:\oracle\product\10.1.0\flash_recovery_area
    db_recovery_file_dest_size= 2147483648
    undo_management = AUTO
    undo_tablespace = UNDOTBS1
    remote_login_passwordfile= EXCLUSIVE
    db_domain =
    dispatchers = (PROTOCOL=TCP) (SERVICE=orcl10gXDB)
    job_queue_processes = 10
    background_dump_dest = D:\ORACLE\PRODUCT\10.1.0\ADMIN\ORCL10G\BDUMP
    user_dump_dest = D:\ORACLE\PRODUCT\10.1.0\ADMIN\ORCL10G\UDUMP
    core_dump_dest = D:\ORACLE\PRODUCT\10.1.0\ADMIN\ORCL10G\CDUMP
    sort_area_size = 65536
    db_name = orcl10g
    open_cursors = 300
    pga_aggregate_target = 25165824
    PMON started with pid=2, OS id=1840
    MMAN started with pid=3, OS id=4044
    DBW0 started with pid=4, OS id=2324
    LGWR started with pid=5, OS id=3460
    CKPT started with pid=6, OS id=720
    SMON started with pid=7, OS id=964
    RECO started with pid=8, OS id=1780
    Sat Apr 26 13:51:24 2008
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    CJQ0 started with pid=9, OS id=232
    Sat Apr 26 13:51:24 2008
    starting up 1 shared server(s) ...
    Sat Apr 26 13:51:25 2008
    alter database mount exclusive
    Sat Apr 26 13:51:25 2008
    Controlfile identified with block size 16384
    Sat Apr 26 13:51:29 2008
    Setting recovery target incarnation to 2
    Sat Apr 26 13:51:29 2008
    Successful mount of redo thread 1, with mount id 837414429
    Sat Apr 26 13:51:29 2008
    Database mounted in Exclusive Mode.
    Completed: alter database mount exclusive
    Sat Apr 26 13:51:29 2008
    alter database open
    Sat Apr 26 13:51:29 2008
    Beginning crash recovery of 1 threads
    attempting to start a parallel recovery with 2 processes
    parallel recovery started with 2 processes
    Sat Apr 26 13:51:30 2008
    Started first pass scan
    Sat Apr 26 13:51:30 2008
    Completed first pass scan
    2 redo blocks read, 3 data blocks need recovery
    Sat Apr 26 13:51:30 2008
    Started redo application at
    Thread 1: logseq 199, block 6043, scn 0.0
    Recovery of Online Redo Log: Thread 1 Group 3 Seq 199 Reading mem 0
    Mem# 0 errs 0: D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\REDO03.LOG
    Sat Apr 26 13:51:30 2008
    Completed redo application
    Sat Apr 26 13:51:30 2008
    Completed crash recovery at
    Thread 1: logseq 199, block 6045, scn 0.1325285
    3 data blocks read, 3 data blocks written, 2 redo blocks read
    Sat Apr 26 13:51:31 2008
    Thread 1 advanced to log sequence 200
    Maximum redo generation record size = 120832 bytes
    Maximum redo generation change vector size = 116476 bytes
    Private_strands 7 at log switch
    Thread 1 opened at log sequence 200
    Current log# 1 seq# 200 mem# 0: D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL10G\REDO01.LOG
    Successful open of redo thread 1
    Sat Apr 26 13:51:31 2008
    MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
    Sat Apr 26 13:51:31 2008
    SMON: enabling cache recovery
    Sat Apr 26 13:51:32 2008
    Successfully onlined Undo Tablespace 1.
    Sat Apr 26 13:51:32 2008
    SMON: enabling tx recovery
    Sat Apr 26 13:51:32 2008
    Database Characterset is WE8MSWIN1252
    Sat Apr 26 13:51:32 2008
    Published database character set on system events channel
    Sat Apr 26 13:51:33 2008
    All processes have switched to database character set
    Sat Apr 26 13:51:35 2008
    Starting background process QMNC
    QMNC started with pid=15, OS id=2160
    Sat Apr 26 13:51:37 2008
    replication_dependency_tracking turned off (no async multimaster replication found)
    Sat Apr 26 13:51:38 2008
    Starting background process MMON
    Starting background process MMNL
    MMON started with pid=16, OS id=3952
    MMNL started with pid=17, OS id=3960
    Sat Apr 26 13:51:39 2008
    Completed: alter database open
    Sat Apr 26 13:51:43 2008
    db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.

Maybe you are looking for