10G NEW FEATURE-HOW TO FLUSH THE BUFFER CACHE

제품 : ORACLE SERVER
작성날짜 : 2004-05-25
10G NEW FEATURE-HOW TO FLUSH THE BUFFER CACHE
===============================================
PURPOSE
이 자료는 Oracle 10g new feature 로 manual 하게
buffer cache 를 flush 할 수 있는 기능에 대하여 알아보도록 한다.
Explanation
Oracle 10g 에서 new feature 로 소개된 내용으로 SGA 내 buffer cache 의
모든 data 를 command 수행으로 clear 할 수 있다.
이 작업을 위해서는 "alter system" privileges 가 있어야 한다.
Buffer cache flush 를 위한 command 는 다음과 같다.
주의) 이 작업은 database performance 에 영향을 줄 수 있으므로 주의하여 사용하여야 한다.
SQL > alter system flush buffer_cache;
Example
x$bh 를 query 하여 buffer cache 내 존재하는 정보를 확인한다.
x$bh view 는 buffer cache headers 정보를 확인할 수 있는 view 이다.
우선 test 로 table 을 생성하고 insert 를 수행하고
x$bh 에서 barfil column(Relative file number of block) 과 file# 를 조회한다.
1) Test table 생성
SQL> Create table Test_buffer (a number)
2 tablespace USERS;
Table created.
2) Test table 에 insert
SQL> begin
2 for i in 1..1000
3 loop
4 insert into test_buffer values (i);
5 end loop;
6 commit;
7 end;
8 /
PL/SQL procedure successfully completed.
3) Object_id 확인
SQL> select OBJECT_id from dba_objects
2 where object_name='TEST_BUFFER';
OBJECT_ID
42817
4) x$bh 에서 buffer cache 내에 올라와 있는 DBARFIL(file number of block) 를 조회한다.
SQL> select ts#,file#,dbarfil,dbablk,class,state,mode_held,obj
2 from x$bh where obj= 42817;
TS# FILE# DBARFIL DBABLK CLASS STATE MODE_HELD J
9 23 23 1297 8 1 0 7
9 23 23 1298 9 1 0 7
9 23 23 1299 4 1 0 7
9 23 23 1300 1 1 0 7
9 23 23 1301 1 1 0 7
9 23 23 1302 1 1 0 7
9 23 23 1303 1 1 0 7
9 23 23 1304 1 1 0 7
8 rows selected.
5) 다음과 같이 buffer cache 를 flush 하고 위 query 를 재수행한다.
SQL > alter system flush buffer_cache ;
SQL> select ts#,file#,dbarfil,dbablk,class,state,mode_held,obj
2 from x$bh where obj= 42817;
6) x$bh 에서 state column 이 0 인지 확인한다.
0 은 free buffer 를 의미한다. flush 이후에 state 가 0 인지 확인함으로써
flushing 이 command 를 통해 manual 하게 수행되었음을 확인할 수 있다.
Reference Documents
<NOTE. 251326.1>

I am also having the same issue. Can this be addressed or does BEA provide 'almost'
working code for the bargin price of $80k/cpu?
"Prashanth " <[email protected]> wrote:
>
Hi ALL,
I am using wl:cache tag for caching purpose. My reqmnt is such that I
have to
flush the cache based on user activity.
I have tried all the combinations, but could not achieve the desired
result.
Can somebody guide me on how can we flush the cache??
TIA, Prashanth Bhat.

Similar Messages

  • How do you flush the negative cache?

    Hi all,
    I am working with NetWeaver 2004s SR3 SP14 on SuSE 10 with Oracle.  I wrote a custom login module and was trying to get SAP to load it.  At first I made some reference mistakes (in provider.xml under the references tab) and it wouldn't load.  Then I fixed the reference errors and tried to get it to load again and it still wouldn't load.  I just keep on getting the error message:
    [EXCEPTION]
    {1}#2#com.mycompany.dc.netweaver.MyLoginModule#java.lang.ClassNotFoundException:
    com.mycompany.dc.netweaver.MyLoginModule
    Found in negative cache
    I shut down and restarted SAP several times (using stopsap and startsap) and undeploying and redeploying my login module (the fixed version), but still, SAP refuses to load my login module because it is in the "negative cache".
    If I keep the code the same, but change the name of the Java class and component name in provider.xml, then SAP happily loads my login module.
    So I can work around the issue, but it is really annoying to change your configuration every time you make a mistake with the references...  So I was hoping that someone would know how to flush the negative cache.  Do I have to go into the database to do it?
    -- Katrina

    Hi Katrina,
    did you found a way to flush the chache?
    kind Regards,
    Gerardo J

  • Flushing Database Buffer Cache

    I am trying out variants of a SQL statement in an attempt to tune it. Each variant involves joins across a different combination of tables, although some tables are common across all variants. In order to be able to do a valid comparison of the TKPROF outputs for the variants, I believe I need to flush the database buffer cache between variants so that the db block gets, consistent gets and physical reads parameters are true for each variant. By doing this, data retrieved for one variant is not already in the buffer cache for the next variant, thus not influencing the above parameters for the next variant.
    Is it possible to flush the buffer cache? The shared pool can be flushed with the ALTER SYSTEM FLUSH SHARED_POOL command. I've searched but have not been able to find an equivalent for the buffer cache. The NOCACHE option to the ALTER TABLE command only pushes retrieved data to the LRU list in the buffer cache, but does not remove it from the buffer cache.
    I'm hoping to be able to do this without bouncing the database between variants. It is a development instance, and I have it to myself after hours.

    Hi,
    I never tried this before, but if you want make a test you can try corrupt the block ID's returned by one of these queries below:
    Try corrupt the ID of the block containing the segment header
    select dbms_rowid.rowid_block_number(rowid) from hr.regions;
    Try corrupt one of the blocks returned by the query, which shows the ID of the block where each row is located
    select s.owner,t.ts#,s.header_file,s.header_block
    from
    v$tablespace t, dba_segments s
    where
    s.segment_name='REGIONS' and
    owner='HR' and
    t.name = s.tablespace_name;Legatti
    Cheers

  • Document about Oracle 10g New Features

    Hi all,
    I would like to share a document I wrote about Oracle 10g New Feature. I hope it would be useful.
    Currently, I am updating the document to include Release 2 features. Any comments or suggestion is appreciated.
    Download link:
    http://www.operflow.com/Oracle_10g_DB_Summary.pdf

    Hi Ahmed,
    Good Work !!!
    I just visit your blog it is very interesting about you and your country.
    Regards
    Taj

  • Oracle 10g new feature?

    Hi,
    Is there any link, where i can find in detail about oracle 10g new features, TIA

    You can find each doc in html and pdf format on the Documentation Library<br>
    You can too download all the documentation in html format to have all on your own computer here (445.8MB)<br>
    <br>
    Nicolas.

  • 1Z0-045: Oracle Database 10g: New Features for Oracle 8i OCPs

    Hi,
    I was looking for right reference book for the 1z0-045 upgrade certification. I could not find any reference book that is related to this certification. Only one book have found out on Amazon site, which is "OCP Oracle Database 10g: New Features for Administrators Exam Guide (Oracle Press) (Paperback)" published by McGraw Hill.
    But this book does not show exem number 1z0-045 anywhere. So I am not sure, is it a right book to buy.
    Please let me know if any one has any knowledge about that.
    I appreciate for your information.
    Thanks
    Amit

    The book you mention is for those individuals who are upgrading their 9i OCP to the 10g OCP. Since you are apparently upgrading from 8i OCP, there is possibly a gap in your learning. You might want to take a look at OCP Oracle9i Database: New Features for Administrators Exam Guide (Paperback) which explains the new features for Oracle 9i to someone coming from an 8i background. No additional exam would be needed in your case but this book may help to fill out your knowledge a bit. You could also take a look at http://download.oracle.com/docs/cd/B10501_01/server.920/a96531/toc.htm if you would rather not buy an additional book.
    Tom

  • Oracle 10g new features

    Hi,
    I want to know Oracle 10g New Features for developers. please note that i am asking for developers not DBA.
    Thanks in Advance,
    Su

    Su wrote:
    ya go through this web site ..as i'm a new to oracle development i'm confused that all topics for developers oly...pls make me clear..you want me to go through this site and figure out which articles are meant for developers only??? : O
    I would suggest an easier method for you. Open each and every article and search for the term "developer". If found, then its what you are looking for. ; )
    Vivek L

  • 10g new features(study guide 1z0-040)

    Hii,
    Can you please send me the soft copy of 10g new features(study guide 1z0-040).
    Badly needed.([email protected])
    Thank you.

    You may get study guides from the education.oracle.com site http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=189915&lang=ESA&p_exam_id=1Z0_040
    I suggest you to setup a practical environment where you can directly see behaviour, not only memorize manuals.
    HR Madrid

  • How to flush the cache of a JCO repository ?

    Does anybody now how to flush the cache of the JCO repositories of pools managed by Netweaver application server without restarting the JVM ?
    The reason I'm asking is that, whenever a tables or structure changes on ABAP side (CRM,  IS-U, R/3), even though we redeploy the J2EE applications, they do not see the new definitions, and we have to restart the JVMs.
    This is particularily annoying in an "high availability" production environment such a ours.
    We need a close to 24/7 up time, and putting down the JVM for even a few minutes is becoming a problem.
    I'd like to be able to manually flush the repositories when needed.
    For example, is it possible to write a small java application that could perform the flush on a single request ?
    I did not try writing any code to do so yet, but I guess this snippet can do the work:
    IRepository rCRM = JCO.createRepository("FLUSH_CRM", "java:comp/env/eis/pool_crm")
    while (rCRM !=null)
       String [] crmFuncts  = rCRM.getCachedFunctionInterfaces()
       String [] crmStructs = rCRM.getCachedStructureDefinitions()
       for (int i=0; crmFuncts!=null && i<crmFuncts.lenght; i++)
          rCRM.removeFunctionInterfaceFromCache(crmFuncts<i>);
       for (int i=0; crmStructs!=null && i<crmStructs.lenght; i++)
          rCRM.removeStructureDefinitionFromCache(crmStructs<i>);
       rCRM = rCRM.getNextRepository();
    Does it ?
    Edited by: Croussette Yves on Jun 9, 2008 8:46 PM
    Edited by: Croussette Yves on Jun 9, 2008 8:47 PM

    Hi,
    Please check these link:-
    1.[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3219]
    2.https://www.sdn.sap.com/irj/scn/thread?messageID=601915
    3.https://www.sdn.sap.com/irj/scn/thread?messageID=135202
    Best Regards,
    Atul Bhatia

  • Looking for 10g New Features Summary

    Anybody know where I can get a 10g new features summary?
    Thanks in advance,
    -Ken

    That link has good DETAIL. I'm looking for a SUMMARY of the features. You know, like an outline...
    Automatic Undo Management
    Automated Storage Management (ASM)
    PL/SQL Enhancements
    Enterprise Manager
    Exclusively Browser Based
    Run on the Database
    DBMS_DATAPUMP()
    etc.

  • When i update apps on my iphone they need the ID that i used when i downloaded these app and i forgot this ID and a make a new ID how i used the new one to update these apps thanks

    Hello all,
    when i update apps on my iphone they need the ID that i used when i downloaded these apps and i forgot this ID and a make a new ID
    How i used the new one to update these apps?
    thanks

    Your device can hold apps from multiple IDs, but to update them you have to swicth identities which is time consuming. If possible use only the one ID. If you need to reset the password for your old ID visit My Apple ID.
    tt2

  • How to increase the buffer size ?

    Our BI system displays the following message when I execute a query on the web : buffer too small
    How to increase the buffer size ?
    Thanks in advance

    Indeed, we are using  Bex Web 7.0
    The query uses a big structure and when I execute it on the web, it takes a long time (> 5 min) and I receive folowing message on  top of the result page : " could not buffer query structures. Buffer too small "
    When I execute the query in Bex analyzer, it takes a long time too but we dont get the message
    I have checked the cache size:
          -  Local cache : 100 MB
          - Global cache : 200 MB
    Please let me know any solution as there is no BASIS  TEAM. The guy who installed the soft was a consultant and is no more reachable.
    Thanks in adavnce

  • Having recently updated Firefox, there now seems to be a long delay before many webpages load. Is there any way to easily revert to the previous arrangement, for example by removing new features that came with the upgrade that I probably don't use?

    Having recently updated Firefox, there now seems to be a long delay before many webpages load. Is there any way to easily revert to the previous arrangement, for example by removing new features that came with the upgrade that I probably don't use?

    Having recently updated Firefox, there now seems to be a long delay before many webpages load. Is there any way to easily revert to the previous arrangement, for example by removing new features that came with the upgrade that I probably don't use?

  • Flushing the DNS cache

    I'm having trouble with a Web site when I access it on my home computer, yet this same site looks fine on my Mini at work. One section of the index page generates a "can't find server" error, and the site's own logo won't display properly. It is a free hosting site. Sometimes I can upload files to it, other times I get a can't-find-server error when I try.
    In answer to my query about this (to which I helpfully attached a screenshot of the incompletely loaded index page and its error messages), the host is telling me that I should "flush my DNS cache," which they say involves going into Terminal and giving the command "ookupd -flushcache" [sic]. (I've already surfed this briefly and the first result confirmed my suspicion that this doofus hasn't mastered copy-and-paste technique and the command actually should be "lookupd- flushcache".)
    It's not just that their site doesn't load fully, though. They have some stuff on one of their pages that they encourage users to hotlink on personal Web sites, and I have done that with one of their banners. The banner, which was fine for months, now appears on my page as a broken icon, too, although it, like the site's home page, loads fine on my computer at work.
    My first question is, is there any harm in flushing the DNS cache? The OS Daily page where I think they copied this advice from makes it sound like this is something only a Web server would need. If I do it on my home machine, could it cause problems? Could it disable my Internet connectivity?
    Second, less urgent question, more for the netgeeks out there: Do you think this is a likely solution to my problem? Especially considering that the problem involves not only their site but an element on an external site linking back to them? I hate to play the sucker for some low-level geek whose main mission is to deflect my query.
    Thanks
    Kathi

    Kathi--
    Like BDAqua says, there's nothing to worry about flushing the DNS cache. It's true that most people probably don't need to do it very often, but it's something easy and harmless to try, and it might well fix problems like yours.
    One handy feature of Safari, even if you don't use it for anything else, is the "Activity" window. Open it from the "View" menu, and watch as your page loads. You can see exactly which components on the page are loading, which aren't and where they should be coming from. If you double-click an element in that list, Safari will try to open it in a new window. That is sometimes enough to give a clue as to why something isn't working.
    You can use Safari's activity list along with the Network Utility from your Utilities folder to try to figure out why you're not getting the page elements. Suppose a graphic is listed as coming from http://www.server1.com/images/logo.jpg, but it's not loading.
    First thing I would try in the Network Utility is to see if it will respond to pings. From that example, enter "www.server1.com" on the "Ping" page of the Network Utility and see if it answers back.
    To find out if it's a DNS problem, you can use Safari's list to get the addresses of the problem elements, then see if the IP addresses match up on your computer at home to the one at work. If they don't, then it could be stale DNS.
    You can use the Network Utility for DNS lookups, but I think they're hard to read, and, since you're already thinking about using the Terminal to flush the DNS cache, you can use nslookup. It's really simple:
    <pre class="command">nslookup www.apple.com</pre>
    Will give you something like this (the first two lines will likely be different):
    Server: 208.67.222.222
    Address: 208.67.222.222#53
    Non-authoritative answer:
    www.apple.com canonical name = www.apple.com.akadns.net.
    Name: www.apple.com.akadns.net
    Address: 17.251.200.32
    If the addresses don't match, or you get a message that it can't find anything for your server, then you know it's a DNS problem. Perhaps they've changed some addresses and your home ISP's DNS servers themselves aren't updating.
    You can even use nslookup to see what different DNS servers say about an address. Just add the IP address of a DNS server after the address you want to look up:
    <pre class="command">nslookup www.apple.com 208.67.220.220</pre>
    Just do a search on the 'net for free DNS servers, and you'll find a bunch to choose from.
    charlie

  • Unused tables in the buffer cache

    I have a program that queries the V$BH view every hour and stores the name of every table in the buffer cache. There is a set of tables that are never used which are appearing in the buffer cache every hour. I did a case insensitive search of the V$SQL and V$SQLTEXT views for these table names, but found nothing. How can tables be put in the buffer cache if there is no SQL statement refering to them? I'd like to find the session and program which is using these tables that no one is supposed to be using.
    Kevin Tyson

    This can be due to recursive SQL. Means the SQL not fired directly by the app but fired by oracle to satistfy some requirment. It can be related to some system tables or other users tables.
    Example of system tables:
    Oracle use system tables to reflect the current state of the database like when you insert records it update the extent information and when you create the object it update the data dictionary so that object reflect in that etc etc etc
    Example of users tables:
    you fired an insert statement to insert one record in table emp but to insert that record oracle has to check the state of foreign key data by querying dept and other tables so enev if you didn't specify dept table oracle use it internally to check the integrity constraint.
    Daljit Singh

Maybe you are looking for

  • Report Parameter Page in 6i Web

    I am converted a Forms 4.5 character mode application to 6i Web. Forms6i Server is running on Red Hat Enterprise Linux 3. I am not running a reports server. I am not certain if I need to. So far, the application works fine on the Web. I have successf

  • How to delete photos in photo stream

    I put some pictures in Photo Stream and they sync'd correctly to all of my IOS devices (iMac, iPad, iPhone). However, when I tried to delete them, they would not disappear even though I had put them in the Trash on each IOS device. How can I selectiv

  • Bought a new Apple Macbook Air. it came with Lion. Why?

    Hi there, i just bought a new MBA from an official Apple Reseller in Greece. Although they advertise that the MBA comes with Mountain Lion preinstalled, my MBA came with Lion... Why? could anyone explain this to me? When i asked an guy at the store h

  • Function module to get Service Order details created with a Sales Order

    Hi, Could anyone tell me if there is any function module to get the details of the Service order that is created automatically for a line item in a sales order. Let me explain my requirement clearly. When a sales order is created with specific line i

  • Practical case studies for SAP XI 7.0

    Hi! I have basics ans first practical experience working with SAP XI 7.0. Now I would like extend my XI knowledge and searching for the practical case studies for the different scenarios (IDOC, PROXY, FILE, SOAP, etc.) My infrastructure constains the