Script to find the " List of objects to be pinned in the shared pool"

hi all,
please suggest me any script is there to find the recommended objects to be pinned in to shared pool.
Regards,
Vamsi.

I think the important question here is – do you really need to PIN objects? Are you facing any ORA-4031 errors?
Oracle would tell you to PIN packages such as STANDARD, DBMS_STANDARD, DBMS_UTILITY, DBMS_OUTPUT. It really depends on your application. So I am afraid there is no exact answer for that, but you can work with your application team to learn if there is some large object that is very frequently used that you might want to PIN.
I suggest that you check the larger objects from your SGA using the view v$db_object_cache that folks already pointed out checking the column SHARABLE_MEM.
You can refer to v$sql or v$sqlarea (which is a grouping of v$sql) to find the most executed stored procedures and packages and so on.
However, most of the problems shared pool problems I have faced were related to bad application coding - such as lack of bind variables - or shared pool undersized. Once those problems were fixed, I hardly had to PIN anything into the SGA.
Regards

Similar Messages

  • Script to find if list of Apps patches exists in DB 'A' but not in DB 'B'

    Hi All,
    DB:11.1.0.7
    Oracle Apps:12.1.1
    OS:Linux 86x64 bits Red Hat
    Could anyone please share the script to find if list of patches exists in DB 'A' but not in DB 'B'
    Thanks for your time
    Regards,

    We have already answered you, not sure why you keep asking the same question!
    SELECT bug_number,creation_date from ad_bugs where bug_number in
    ('1234','5678','56783','4321','765432');
    I get the list of patches out of the above say - '1234','5678'
    Now how to get the list of patches out of the above list of 5 patches which are not in the DB 'A' .I know this could be done manually but this is just an example as there may be hundreds of patches like this in ad_bugs to extract and we cannot manually do it in excel or any other way bit through a queryRun the same query in Database B and compare it with the output of Database A. Or, simply create a database link for Database B from Database A and run this query from DB A:
    SQL> SELECT bug_number, creation_date
    from ad_bugs
    where bug_number in ('1234','5678','56783','4321','765432')
    minus
    SELECT bug_number, creation_date
    from ad_bugs@<DBlink to DB B>
    where bug_number in ('1234','5678','56783','4321','765432');Thanks,
    Hussein

  • VB Script to find the last modified file and time in a directory

    Hi,
    I am new to VB script i need a script to find the latest modifed file and last modifed time in a directory(Contains  folders and sub folders inside it). it has to go through all the folders and get the latest file and last modifed time.

    Thanks it worked for me Get-ChildItem C:\Users\sujith.reddy.komma\Desktop\Suj1\* -recurse |?{-not $_.PsIsContainer} |Sort LastWriteTime -desc | select -first 1 now in my script i have hard coded the directory i need to run this script in different
    servers from one location i will put all the different paths in one text file and ineed to pass them to this script can you help me with this?
    Essentially you are incrementally asking us to write each line for you.  I recommend freeing yourself of this misery and leraning PowerShell.  THe answers to all of your questions are learned in the first few hours of study.
    Start here:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    ¯\_(ツ)_/¯

  • I need help writing a script that finds the first instance of a paragraph style and then changes it

    I need help writing a script that finds the first instance of a paragraph style and then changes it to another paragraph style.  I don't necessarily need someone to write the whole thing, by biggest problem is figuring how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thanks!

    Hi,
    Do you mean first instance of the paragraph style
    - in a chosen story;
    - on some chosen page in every text frames, looking from its top to the bottom;
    - in a entire document, looking from its beginning to the end, including hidden layers, master pages, footnotes etc...?
    If story...
    You could set app.findTextPreferences.appliedParagraphStyle to your "Style".
    Story.findText() gives an array of matches. 1st array's element is a 1st occurence.
    so:
    Story.findText()[0].appliedParagraphStyle = Style_1;
    //==> this will change a paraStyle of 1st occurence of story to "Style_1".
    If other cases...
    You would need to be more accurate.
    rgds

  • Script to find the Concurrent Request ID from its associated SID

    Hi,
    In one of my production system, my server load is going very high. From the top used process ID of server, I found the SID and found out that the program running is "ora_rw20_run@acgerp (which is a concurrent program)
    How do I find out the Request ID using the SID/PID? Can someone please provide me the script to find the Concurrent Request ID from its associated SID?
    Thanks!

    There has been no new changes in the report server or in the database. Suddenly of late, we have been observing this program running and it never ends, consuming major part of the cpu load. Not sure what this program is -> ora_rw20_run. There is no mention about it in metalink or in google.
    I followed MOS Doc 1058210.6 and tried to debug more. But the formatted output doesnt give any info either.
    TKPROF: Release 10.2.0.2.0 - Production on Tue Oct 20 09:44:21 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Trace file: prod_ora_15721.trc
    Sort options: default
    count = number of times OCI procedure was executed
    cpu = cpu time in seconds executing
    elapsed = elapsed time in seconds executing
    disk = number of physical reads of buffers from disk
    query = number of buffers gotten for consistent read
    current = number of buffers gotten in current mode (usually for update)
    rows = number of rows processed by the fetch or execute call
    0 statements EXPLAINed in this session.
    Trace file: prod_ora_15721.trc
    Trace file compatibility: 10.01.00
    Sort options: default
    1 session in tracefile.
    0 user SQL statements in trace file.
    0 internal SQL statements in trace file.
    0 SQL statements in trace file.
    0 unique SQL statements in trace file.
    96507 lines in trace file.
    0 elapsed seconds in trace file.
    When I use the below query, I can find that the session is running a module named "PAXMGSLS" and the action is Concurrent Request.
    But I am not sure how to find out the Concurrent Request ID using this info to dig more (look into the concurrent request log files etc)
    select s.sid,s.serial#,p.spid os_pid,s.status,
    s.osuser,s.username,s.COMMAND,s.MACHINE,s.MODULE, s.SCHEMANAME,
    s.LOCKWAIT,s.action
    from v$session s, v$process p
    WHERE s.paddr = p.addr
    and s.sid = 823
    SID     SERIAL#     OS_PID     STATUS     OSUSER     USERNAME     COMMAND     MACHINE     MODULE     SCHEMANAME     LOCKWAIT     ACTION
    823     47     4559     ACTIVE     applprod     APPS     3     acgerp     PAXMGSLS     APPS          Concurrent Request

  • Script to find the currently active sql

    hey,
    Can somebody post me a script to find the currently active sql in the database ???

    Hi,
    You can try these below:
    select s.username
           c1,t.sql_text
    from v$session s, v$sqltext t
    where
    s.sql_address = t.address and
    s.sql_hash_value = t.hash_value and
    s.username is not null
    order by s.username,s.prev_sql_addr,s.prev_hash_value,t.piece;
    or
    select sesion.sid,
           sesion.serial#,
           sesion.username,
           sesion.sql_id,
           sesion.sql_child_number,
           optimizer_mode,
           hash_value,
           address,
           sql_text
      from v$sqlarea sqlarea, v$session sesion
    where sesion.sql_hash_value = sqlarea.hash_value
       and sesion.sql_address    = sqlarea.address
       and sesion.username is not nullCheers

  • Cannot find the shared library on linux

    Hello everyone!
    I'm running labviee 2010 on ubuntu 10.10 64bit. Everything works fine except calling shared object files.
    As long as I use gcc without any optimization, there is no problem at all, but if I switch on optimization in gcc labview claims being unable to find the shared object file, though I can find an select it in the corresponding dialog window.
    Whenever I use the actual intel compiler (composer xe 2011) with, or without optimization, the same problem occurs. As expected ldd doens't show any other dependencies for the optimized and unoptimized case.
    can anybody help me please??

    Perhaps this KB Entry might be helpfull.
    Troubleshooting Shared Library Errors When Launching LabVIEW on Linux
    http://digital.ni.com/public.nsf/allkb/7E7ABC9629523E6A862576B3005700E0?OpenDocument
    Stefan

  • Keeps an object in the shared pool

    hello all
    please tell me, when should we keep an object in the shared pool?how can we find out which should be kept in shared pool? please tell me in detail..........
    thank you all in advance

    mohammed_dba wrote:
    hi dear,
    please tell me how can find out which package is frequently pins? please give query for thatI guess you mean which packages are frequently accessed and are candidate for the pinning in the keep pool.
    Use the following query:
    SELECT substr(owner,1,10)||'.'||substr(name,1,35) "Object Name",
    ' Type: '||substr(type,1,12)||
    ' size: '||sharable_mem ||
    ' execs: '||executions||
    ' loads: '||loads||
    ' Kept: '||kept
    FROM v$db_object_cache
    WHERE type in ('TRIGGER','PROCEDURE','PACKAGE BODY','PACKAGE')
    AND executions > 0
    ORDER BY executions desc,
    loads desc,
    sharable_mem desc;Then check which objects have high value for the EXECS column. Also consult with your application developers to identify the frequently used code.
    regards

  • Photos tells me it is connecting to Library for shared photos. It's been saying this for about ten hours. I can't stop it from searching or get it to do anything else. I can go back to my photos but I can't get Photos to find the shared items.

    Photos tells me it is connecting to Library for shared photos. It's been saying this for about ten hours. I can't stop it from searching or get it to do anything else. I can go back to my photos but I can't get Photos to find the shared items.

    Be sure Safari does not have the Block Pop-Up Windows preference set.
    Where I work now there are several unencrypted VLANs that require authentication, and Safari promptly pops up a window for me to register every time.

  • Contention for latches related to the shared pool was consuming significant

    We are having performance issue on our database. When I look at the AWR, I see that there is a contention for latches. Below is the AWR Report.
    ADDM Report for Task 'ADDM:1775307360_12808'
    Analysis Period
    AWR snapshot range from 12807 to 12808.
    Time period starts at 10-MAY-11 01.00.15 PM
    Time period ends at 10-MAY-11 02.00.23 PM
    Analysis Target
    Database 'ADVFDWP' with DB ID 1775307360.
    Database version 11.1.0.7.0.
    ADDM performed an analysis of all instances.
    Activity During the Analysis Period
    Total database time was 27827 seconds.
    The average number of active sessions was 7.71.
    Summary of Findings
    Description Active Sessions Recommendations
    Percent of Activity
    1 Shared Pool Latches 6.43 | 83.42 0
    2 Top SQL by DB Time 2.41 | 31.24 3
    3 "Concurrency" Wait Class 2.18 | 28.22 0
    4 PL/SQL Execution 1.53 | 19.86 1
    5 "User I/O" wait Class 1.33 | 17.24 0
    6 Hard Parse 1.24 | 16.14 0
    7 Undersized Buffer Cache .83 | 10.73 0
    8 CPU Usage .7 | 9.02 0
    9 Top SQL By I/O .31 | 4.04 1
    10 Top Segments by I/O .24 | 3.12 1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Findings and Recommendations
    Finding 1: Shared Pool Latches
    Impact is 6.43 active sessions, 83.42% of total activity.
    Contention for latches related to the shared pool was consuming significant
    database time in some instances.
    Instances that were significantly affected by this finding:
    Number Name Percent Impact ADDM Task Name
    1 ADVFDWP1 99.31 ADDM:1775307360_1_12808
    Check the ADDM analysis of affected instances for recommendations.
    Finding 2: Top SQL by DB Time
    Impact is 2.41 active sessions, 31.24% of total activity.
    SQL statements consuming significant database time were found.
    Recommendation 1: SQL Tuning
    Estimated benefit is 1.07 active sessions, 13.82% of total activity.
    Action
    Run SQL Tuning Advisor on the SQL statement with SQL_ID "fdk73nhpt93a5".
    Related Object
    SQL statement with SQL_ID fdk73nhpt93a5.
    INSERT INTO SFCDM.F_LOAN_PTFL_MOL_SNPSHT SELECT * FROM
    F_LOAN_PTFL_MOL_SNPSHT_STG
    Recommendation 2: SQL Tuning
    Estimated benefit is 1 active sessions, 12.96% of total activity.
    Action
    Tune the PL/SQL block with SQL_ID "7nvgzsgy9ydn9". Refer to the "Tuning
    PL/SQL Applications" chapter of Oracle's "PL/SQL User's Guide and
    Reference".
    Related Object
    SQL statement with SQL_ID 7nvgzsgy9ydn9.
    begin
    insert into SFCDM.F_LOAN_PTFL_MOL_SNPSHT select * from
    F_LOAN_PTFL_MOL_SNPSHT_STG;
    end;
    Recommendation 3: SQL Tuning
    Estimated benefit is .4 active sessions, 5.2% of total activity.
    Action
    Investigate the SQL statement with SQL_ID "fcvfq2gzmxu0t" for possible
    performance improvements.
    Related Object
    SQL statement with SQL_ID fcvfq2gzmxu0t.
    select
    a11.DT_YR_MO DT_YR_MO,
    a11.IND_SCRTZD IND_SCRTZD,
    a13.CD_LNSTAT CD_LNSTAT_INTGRTD,
    sum(a11.CNT_LOAN) WJXBFS1,
    sum(a11.AMT_PART_EOP_UPB) WJXBFS2,
    sum(a11.AMT_LST_VLD_PART_UPB) WJXBFS3
    from
    SFCDM.F_LOAN_PTFL_MOL_SNPSHT
    a11
    join
    SFCDM.D_DETD_LNSTAT_CURR
    a12
    on
    (a11.ID_CYCL_CLOS_DETD_LNSTAT_SRGT = a12.ID_DETD_LNSTAT_SRGT)
    join
    SFCDM.D_LNSTAT_CD
    a13
    on
    (a12.ID_LNSTAT_CD_SRGT = a13.ID_LNSTAT_CD_SRGT)
    join
    SFCDM.D_LOAN_CHARTC_CURR_MINI
    a14
    on
    (a11.ID_LOAN_CHARTC_SRGT = a14.ID_LOAN_CHARTC_SRGT)
    where
    (a11.DT_YR_MO in (201103)
    and a14.CD_SFCRM_LOAN_BUS_LI not in ('L', 'T', 'W')
    and a13.CD_LNSTAT in (14)
    and not exists
    (select * from SFCDM.F_LOAN_PTFL_MOL_SNPSHT s
    where s.id_loan_syst_gend = a11.id_loan_syst_gend
    and s.dt_yr_mo

    It is worth checking the actual size of the shared pool e.g.
    select pool,sum(bytes)/1024/1024/1024 from v$sgastat group by pool;
    the parameters you ahve posted suggest you have set a minimum but no maximum, so it could very large.
    Next up is looking for unhared SQL i.e.
    select column1 from some_table where column2='A_VALUE';
    select column1 from some_table where column2='Another_Value';
    where the code should be using binds instead of literals for security and performance reasons, a simple way to find this is to look in v$sql for sql having the same plan_hash_value but different sql_Ids and compare the sql_fulltext of each statement.
    Also a possibility is sql with many child cursors, this is trickier as the cause may vary and may not be easy to fix. check th econtents of v$sql for sql that have high values in the child_number column anmd investigate the contents of v$sql_shared_cursor for the reason there are multiple child cursors.
    Chris

  • Set a dbms job which will flush the shared pool on box everyday 12.00am on

    Hello ,
    i want to set dbms job to flush shared pool everyday at 12.00 am on windows box.
    so can you please provide me script for that or idea on that.
    also i want to know where i have to set that job on sys or system or in user account.
    Thanks

    Receiving the 404 on box. Since the Oracle 404 error is
    ORA-00404: Convert file not found: "string"
    Cause: The file used for converting the database from V7 to V8 could not be found.
    Action: Verify that the migration process has been started on this database and that the convert filename is accessable.
    I'm going to go out on a limb and assume that you're talking about the HTTP 404 (Not Found) error. If that's the case, that would seem to be an issue with your web server/ web application and not with the database. Why do you believe that the database has any involvement with the error you're getting or that flushing the shared pool will resolve the error?
    Justin

  • How to pin sequences in the shared pool for RAC?

    We have a RAC environment with two instances. I want to pin some sequences in the shared pool to boost the performance. Do I need to pin them in both of the instances or just pin them in one instance?
    Thanks in advance

    If you cannot tolerate gaps, you must not use sequences. Period. A sequence-generated key will have gaps because transactions roll back, because databases get shut down, etc. If you want to ensure that there are no gaps, you have to write code that serializes access to a resource (i.e. a custom table of sequences) over the full length of a transaction. Of course, this is hugely inefficient and kills the application's scalability, but it does prevent gaps. Sequences are much faster and much more scalable, but they do not and can not guarantee that there are no gaps.
    Assuming the intention is to minimize gaps, rather than to eliminate them, NOCACHE & ORDER can help. That means, though, that you may need to communicate with the other nodes in the cluster every time you need a new value from the sequence, which is the slow part. Pinning the sequence is not going to be beneficial.
    Justin

  • How to calculate the shared pool size ..........

    Does anyone know if there is a decent algorithm/method to calculate the shared pool size in Oracle 8.1.7.

    look my answer on your thread about db cache size
    How to Calculate the DB Block Buffer value.

  • PS Script to find the list of users and the groups in a Workgroup server

    Hi There, could you please explain on how to get a complete list of local users and local groups in a "Workgroup" server to which they belong to using Powershell. I'm able to get the users list but couldn't find any help in finding
    the script to find to which localgroup the user belong to. Anticipating your response. Also let me know the cmdlet for Win2k3 servers to find the same.

    Here's some code from David Pham (don't remember wher I fund this code):
    Trap {"Error: $_"; Break;}
    Function EnumLocalGroup($LocalGroup)
    $Group = [ADSI]"WinNT://$strComputer/$LocalGroup,group"
    "Group: $LocalGroup"
    # Invoke the Members method and convert to an array of member objects.
    $Members= @($Group.psbase.Invoke("Members"))
    ForEach ($Member In $Members)
    $Name = $Member.GetType().InvokeMember("Name", 'GetProperty', $Null, $Member, $Null)
    $Name
    # Specify the computer.
    $strComputer = gc env:computername
    "Computer: $strComputer"
    $computer = [adsi]"WinNT://$strComputer"
    $objCount = ($computer.psbase.children | measure-object).count
    $i=0
    foreach($adsiObj in $computer.psbase.children)
    switch -regex($adsiObj.psbase.SchemaClassName)
    "group"
    { $group = $adsiObj.name
    EnumLocalGroup $group }
    } #end switch
    $i++
    } #end foreach

  • Script to find the list of Queries currently running in database with User Login Name and Host Name.

    Hai,
    How to find the list of queries currently running in the Database with User Login Information.
    Since my database application is running slow, to find the slow queries.

    Try the below query
    SELECT r.start_time [Start Time],r.session_id [SPID],
    DB_NAME(database_id) [Database],
    s.host_name,
    s.program_name,
    s.login_name,
    SUBSTRING(t.text,(r.statement_start_offset/2)+1,
    CASE WHEN statement_end_offset=-1 OR statement_end_offset=0
    THEN (DATALENGTH(t.Text)-r.statement_start_offset/2)+1
    ELSE (r.statement_end_offset-r.statement_start_offset)/2+1
    END) [Executing SQL],
    r.status,command,wait_type,wait_time,wait_resource,
    last_wait_type
    FROM sys.dm_exec_requests r
    OUTER APPLY sys.dm_exec_sql_text(sql_handle) t
    inner join sys.dm_exec_sessions s
    on s.session_id = r.session_id
    WHERE r.session_id !=@@SPID -- don't show this query
    AND r.session_id > 50 -- don't show system queries
    ORDER BY r.start_time
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

Maybe you are looking for

  • Disk caching on host or guest?

    OK, this is probably a noob question, but if we have 64GB RAM on our HyperV (2008R2) host, and we are running disk intensive software, do we: a) Allocate the 'minimum' RAM to the guest, and leave the rest for the host to use for disk caching, or b) A

  • In windows 8 on mozilla how do i switch to desktop mode

    I am trying to switch to desktop mode in the firefox browser. How do i do that

  • ZR30W blank screen on PowerMac G5

    I have a DC PowerMac G5 with a fresh copy of OS X Leopard (fully updated).  It has a 6600LE (in PCIe x8) and a 7800GT (Mac Edition, in PCIe x16). When I plug my ZR30W into the Dual-Link DVI ports of either graphics card, my monitor's LED goes blue fr

  • Creating new file structure/naming -- what to do about existing LR catalog?

    I am renaming and reorganizing all of my photo file folders according Peter Krogh's DAM system (The DAM Book) outside of LR. What then do I do about my preexisting LR catalog? How will it know where everything is? Or how do I tell it where everything

  • Defaulting rules for subinventory locators

    hi folks, i have researched a little bit, but am unable to figure out if oracle r12 has this capability inherent. before i move on to a forms-personalization / custom.pll based solution, i would like your expert opinion. i am in need of providing the