Administration Tool Cache vs. Cursor Cache
Hi everyone,
Someone asked me what's the difference between the cache in the administration tool ( Manage->Cache) versus cursor cache (Settings -> Administrator -> Manage Sessions), and even though I've cleared them both many-a-time, I still am not sure the difference.
Can someone explain to me the difference between the two?
Thanks!
-Joe
Hi,
The cache in the administration tool is a file based cache on the OBIEE server which stores the results of database requests. This means that if a user makes a request the OBIEE server first checks the cache to see if the query has already been run and cached, or if a superset of the query has been run and cached (i.e. a less restrictive query that the current query can be satisfied from). If it finds there is a cache entry then it will return the results from here instead of issuing any SQL to the database, thereby speeding up getting the results back to the user.
The cache shown in the cusrsor cache is the cache on the presentation server, this is a cache of the content which is being returned to the user's browser, this means if the user goes back to see results for a query they have already made then the presentation server can just return the same content to them without even having to go to the OBIEE server again at all.
So basically 2 levels of caching, one on the OBIEE server and one on the presentation server.
Regards,
Matt
Similar Messages
-
10.1.3.3.2
Can its below save in a table or where logs are saved file?
it needing for history information.
http://localhost:9704/analytics/saw.dll?Sessions
[SESSION]
User ID Host Address Session ID Browser Info Logged On Last Access
[CURSOR CACHE]
D User Refs Status Time Action Last Accessed Statement Information
Thanks.
in advance.Will Usage Tracking help you?
You will find it in the Documentation: Oracle® Business Intelligence Server Administration Guide: Chapter 10 Administering the Oracle BI Server Query Environment.
Regards,
Stefan Hess
http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31770.pdf -
Inconsistent cursor cache error still presisting
Hey I have asked this question before but no solution has been provided me. I have been facing a very serious problem. I have oracle 11g on windows 2003 on 64 bit machine. With 2 processor 8GB RAM. Sga/pga automatically features turn on and 6GB assign to memory_max_target, memory_target . My problem is when I run update 600 hundred statements in one go and every update statement update record between 1 to 30000 and after 20 records I use commit. But after 20 to 30 record oracle go down (shutdown) when i check alert log It advise to check Trace file and in trace file I got this error ORA-02103: PCC: inconsistent cursor cache (out-of-range cuc ref). I turn on my cache sharing to force but no way. Is there any other fast way to update records??
cursor_sharing string force
cursor_space_for_time boolean FALSE
open_cursors integer 300
session_cached_cursors integer 50
my update statement are following
Update jg_6july_dg0 Set Operator_code= '915724' where Operator_code= '015325';
Update jg_6july_dg0 Set Operator_code= '915715' where Operator_code= '015323';
.Update jg_6july_dg0 Set Operator_code= '915712' where Operator_code= '015374';
Cursor Caching I think is not a problem either it is a oracle bug or I’m doing something wrong. I can’t believe that oracle does not have solution for such little problem. My question is why oracle shutdown?? Waiting for you replysir no such error i got nothing. sir proces of rqasing SR is quite cumbersome. i'm stuck where SR first page ask Type of Problem it is hide how i set its value one more strange thing i have change the setting of SGA or PGA now the error in my alter log has been changed i have pasted here some part of alterlog plz check and told me what should i do now.
Checkpoint not complete
Current log# 2 seq# 1844 mem# 0: E:\APP\ADMINISTRATOR\ORADATA\ORCL\ONLINELOG\O1_MF_2_4VH0YMCK_.LOG
Current log# 2 seq# 1844 mem# 1: E:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ONLINELOG\O1_MF_2_4VH0YMLC_.LOG
Fri Apr 03 19:15:50 2009
Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_lgwr_5088.trc (incident=164082):
ORA-00494: enqueue [CF] held for too long (more than 900 seconds) by 'inst 1, osid 3604'
Incident details in: e:\app\administrator\diag\rdbms\orcl\orcl\incident\incdir_164082\orcl_lgwr_5088_i164082.trc
Killing enqueue blocker (pid=3604) on resource CF-00000000-00000000
by killing session 545.1
Killing enqueue blocker (pid=3604) on resource CF-00000000-00000000
by terminating the process
LGWR (ospid: 5088): terminating the instance due to error 2103
Fri Apr 03 19:15:51 2009
Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_j000_4256.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-02103: PCC: inconsistent cursor cache (out-of-range cuc ref)
Fri Apr 03 19:15:52 2009
Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_j001_4764.trc:
ORA-02103: PCC: inconsistent cursor cache (out-of-range cuc ref)
Instance terminated by LGWR, pid = 5088Fri Apr 03 19:25:08 2009
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =61
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 11.1.0.7.0.
Using parameter settings in server-side spfile E:\APP\ADMINISTRATOR\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEORCL.ORA
System parameters with non-default values:
processes = 500
sessions = 555
sga_max_size = 5G
nls_length_semantics = "BYTE"
resource_manager_plan = ""
sga_target = 5G
memory_target = 0
memory_max_target = 7360M
control_files = "E:\APP\ADMINISTRATOR\ORADATA\ORCL\CONTROLFILE\O1_MF_4VH0YL9L_.CTL"
control_files = "E:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\CONTROLFILE\O1_MF_4VH0YLF0_.CTL"
db_block_size = 16384
compatible = "11.1.0.0.0"
db_files = 7000
db_create_file_dest = "E:\app\Administrator\oradata"
db_recovery_file_dest = "E:\app\Administrator\flash_recovery_area"
db_recovery_file_dest_size= 2G
undo_tablespace = "UNDOTBS1"
undo_retention = 900
sec_case_sensitive_logon = FALSE
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=orclXDB)"
audit_file_dest = "E:\APP\ADMINISTRATOR\ADMIN\ORCL\ADUMP"
audit_trail = "DB"
db_name = "orcl"
open_cursors = 300
pga_aggregate_target = 2112M
enable_ddl_logging = FALSE
aq_tm_processes = 0
diagnostic_dest = "E:\APP\ADMINISTRATOR"
Fri Apr 03 19:25:09 2009
PMON started with pid=2, OS id=2752
Fri Apr 03 19:25:09 2009
VKTM started with pid=3, OS id=1252 at elevated priority
VKTM running at (20)ms precision
Fri Apr 03 19:25:09 2009
DIAG started with pid=4, OS id=2596
Fri Apr 03 19:25:09 2009
DBRM started with pid=5, OS id=1436
Fri Apr 03 19:25:09 2009
PSP0 started with pid=6, OS id=5104
Fri Apr 03 19:25:09 2009 -
Obiee 10g - schedule to clear cursor cache
hi, experts, I applied the command line to clear cache.
I found that it only clears cache at bi server level (cache entries in rpd).
it does not clear the cursor cache (those are viewed in Web , Manage Session)
can I set any schedule to clear cursor cache?Hi,
OBIEE Cursor Cache clear from Dashboard Java Script
OBIEE Cursor cache is normally cleared from the Administration - Manage Sessions Screen...
Here is a way that a piece of java can be embedded into a dashboard and call an xframe so you cant see it being called and clear the OBIEE Cursor cache - Presentation cache in effect.
1. Just insert a text box into Dashboard - Tick the "Contains HTML Markup"
2. Paste the script below into the text box
<script language="javascript">
document.write(
"<iframe width=0px height=0px src=" +
document.location.href.match(/^[^?]+/) +
"?ManageSessions" +
document.location.href.match(/&_scid=[^&]+/) +
"&Action=CloseAllCursors&Done=saw.dll%3fSessions',{ensureFreshUrl:true});return false;')></iframe>"
</script>
Voila - when ever you click on the dashboard or refresh it the cursor cache will get cleared.
Please refer the below links for more information on this.
What Is Presentation Services Cache In Fact?
http://prolynxuk.com/blog/?p=496
how to seed n clear cache of obiee
http://obiee101.blogspot.in/2008/03/obiee-manage-cache-part-1.html
How to clear the cache daily automatically
http://obiee10grevisited.blogspot.in/2012/02/cache-in-obiee.html
Award points it is useful.
Thanks,
Satya -
Cursor cache - Time. what is this time
Administration -> manage session -> Cursor cache - > Time.
I have a question about this time?
I ran a report and viewed its log through(Administration -> manage session -> Cursor cache-> View Log) . This report had no previous cache entries, because I cleared them all.
The time shown for this report under (Administration -> manage session -> Cursor cache - > Time) says 18 seconds.
I am sure when I clicked on the tab that has this report it took less than 4 seconds for the page to load with this report on it.
So I wasn't sure what this time actually is? When I look into the log ( for this particular report), one of the line at the end of the log says
[2012-03-09T15:50:04.000+00:00] [OracleBIServerComponent] [TRACE:2] [USER-33] [] [ecid: d01cd216d41a2bc8:bf26dbb:13549056e05:-8000-00000000005b8cad] [tid: 44ded940] [requestid: 7ee0096] [sessionid: 7ee0000] [username: -2327690837] -------------------- Logical Query Summary Stats: Elapsed time 23, Response time 18, Compilation time 1 (seconds) [[
But the report gave back results surely in less than 18 seconds, so what this time indicates?Hi I had this on my bank statement too. I believe TCCP stands for Town Centre Car Parks. I parked near the Royal Armouries for several hours which cost me £10. If it had said carpark on my statement it would have saved me a lot of exploring on google as I, like you had forgotten what the charge was for. Hope this helps.
The carparks run by TCCP are as follows and you may have visited one of them and payed by debit card:
Merrion Centre & First Direct Leeds Arena
Templar Street & Edward Street, Leeds
7 Whitehall Road, Leeds
9 Whitehall Road, Leeds
Clarence Dock, Leeds
1 Port Street, Manchester
33 Tariff Street, Manchester
30 Tariff Street, Manchester
21 Ducie Street, Manchester
75 Dale Street, Manchester -
ORA-13773: insufficient privileges to select data from the cursor cache
We are trying to create STS using the below query:
exec sys.dbms_sqltune.create_sqlset(sqlset_name => 'TEST_STS', -
sqlset_owner => 'SCOTT');
The below procedure will load sql starting with 'select /*MY_CRITICAL_SQL*/%' from cursor cache into STS TEST_STS.
DECLARE
stscur dbms_sqltune.sqlset_cursor;
BEGIN
OPEN stscur FOR
SELECT VALUE(P)
FROM TABLE(dbms_sqltune.select_cursor_cache(
'sql_text like ''select /*MY_CRITICAL_SQL*/%''',
null, null, null, null, null, null, 'ALL')) P;
dbms_sqltune.load_sqlset(sqlset_name => 'TEST_STS',
populate_cursor => stscur,
sqlset_owner => 'SCOTT');
END;
We were getting the following error: ORA-13761: invalid filter
After granting the below privileges to the user we are getting the below error:
Err msg:
ERROR at line 1:
ORA-13773: insufficient privileges to select data from the cursor cache
ORA-06512: at "SYS.DBMS_SQLTUNE", line 2957
ORA-06512: at line 10
For SQL Tuning Sets:
GRANT ADMINISTER ANY SQL TUNING SET TO scott;
For Managing SQL Profiles:
GRANT CREATE ANY SQL PROFILE TO scott;
GRANT ALTER ANY SQL PROFILE TO scott;
GRANT DROP ANY SQL PROFILE TO scott;
For SQL Tuning Advisor:
GRANT ADVISOR TO scott;
Others:
GRANT SELECT ON V_$SQL TO SCOTT;
GRANT SELECT ON V_$SQLAREA TO SCOTT;
GRANT SELECT ON V$SQLAREA_PLAN_HASH TO SCOTT;
GRANT SELECT ON V_$SQLSTATS TO SCOTT;
grant select on sys.DBA_HIST_BASELINE to SCOTT;
grant select on sys.DBA_HIST_SQLTEXT to SCOTT;
grant select on sys.DBA_HIST_SQLSTAT to SCOTT;
grant select on sys.DBA_HIST_SQLBIND to SCOTT;
grant select on sys.DBA_HIST_OPTIMIZER_ENV to SCOTT;
grant select on sys.DBA_HIST_SNAPSHOT to SCOTT;
Any info from your end to resolve the issue will be of great help.
ThanksWhat is the alert log reporting. Are you seeing any other errors than these in the alert log too?
-
Error reading data from static cursor cache.
Hi,
Does anyone know what causes this error below. It just started happening out of the blue. I'm running Apache Tomcat 4.1 on Win 2000 server with MS SQL Server 2000 database.
Error:
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error reading data from static cursor cache.
Thanks,
TRhi,
i had a similar sort of error, something along the lines of "error setting up static cursor cache" using the SQL JDBC drivers on Win2K. i deleted the file entries in the TEMP folder of c:\documents and settings\<user>\Local Settings\TEMP and everything was cool after it. i'm not sure what the exact issue is (probably something like maximum folder size had been reached). i ran the FileMon utility from www.sysinternals.com and it reported a DISK_FULL error on a temporary file being read by the process. to cut a long story short, everything is NOW cool.
cheer,
dara -
ORA-02103: PCC: inconsistent cursor cache
I have been hit by one error ORA-02103: PCC: inconsistent cursor cache (out-of-range cuc ref). it occur when user execute thousand of update statement in one go. I have place commit after 50 records. But problem is still there. It shutdown the oracle. I have to again startup oracle database. I’m running query from Toad. Server machine remotely connected with Toad using TNS. Why this error occur or plz guide what is the best way to update records. I have also used parallel Hint. Committing after 50 record reduce error occurrence but problem not solve completely
As per ora description:
Error: SQL 2103
Text: Inconsistent cursor cache (out-of-range CUC ref)
Cause: The precompiler generates a unit cursor entry (UCE) array. An element
in this array corresponds to an entry in the cursor cache (CUC). While
doing a consistency check on the cursor cache, SQLLIB found that the
UCE array contains an ordinal value that is either too large or less
than zero. This happens only if your program runs out of memory.
Action: Allocate more memory to your user session, then rerun the program. If
the error persists, call customer support for assistance.
How user is connected dedicated or shared? How much memory is used during update? Is it enough?
Is parameter open_cursors high enough?
And as You can see from error description - call Oracle support. Raise SR to Oracle - they will investigate and ask dump files and look through them and propose a solution. -
The SQL has aged out of the cursor cache.
Hi,
on 10g R2, Ihave the following :
The SQL has aged out of the cursor cache.
Does-it mean that undo_retention is not enough big?
For the moment it is 10800, 3 hours.
Thanks.Hi,
The issue is that when in sql advisory I click on "Schedule SQL tunning advisor" it gives me "The SQL has aged out of the cursor cache".
If shared_pool is =0 , (automatic management) would it be usefull to define shared_pool_reserved_size value ?
In documentation it is said :
7.3.8.2 When SHARED_POOL_RESERVED_SIZE Is Too Small
The reserved pool is too small when the value for REQUEST_FAILURES is more than zero and increasing. To resolve this, increase the
value for the SHARED_POOL_RESERVED_SIZE and SHARED_POOL_SIZE accordingly. The settings you select for these parameters
depend on your system's SGA size constraints.
Increasing the value of SHARED_POOL_RESERVED_SIZE increases the amount of memory available on the reserved
list without having an effect on users who do not allocate memory from the reserved list.And actually I have REQUEST_FAILURES =15.
Thank you. -
Hi All,
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
I will not be able to share the query due to company policy.
OEM plan showing as Merge cartesain for the query, I know the plan is not correct, as the query has incorrect number of cardinality. I have SQL profile set on this query:
OEM shows as :
Data Source : Cursor Cache
Additional Information : 'SYS_SQL_PROFXXXXXX' (X is some number)
Here is what is happening:
1. The table where the merge join is purged Daily (EOD i.e. 12 AM ), that means it has no rows.
2.Morning around 4 am one process will populate this table, and the same process further uses this table in a query, the query plan has merge Join cartesain (MJC), and it comes out as the number of rows is very less.
3. Next around 6am again that process is triggered, this time it has huge number of rows, and again the query picks up the same MJC plan, and this time query executes for hours, as it has incorrect cardinality. When I again run SQL advisory on this query, it shows up an optimized plan, I kill the process and re-run the process again, and it works fine (query is out within 3 seconds)
Guess it still picks up the previous plan of merge join @6am where the number of rows are less, from the cursor cache, and the OEM also shows data source as Cursor Cache. Can we invalidate the session cache if this is the case.
Please help how can we handle this one?I think you are addressing a common problem in datawarehouses... there are staging tables, some times empty, some times with millions of rows... so, maybe the statistics are not reallistic... What is the result of the following query:
select num_rows, last_analyzed from dba_tables where table_name = '<your_table>';
If this is the problem, you should to consider one of the following strategies:
1) Analize the table when is "full" and assure that never runs an analize table (or a gather_schema_stats) over this table. This strategy works fine if all days the table is populated with similar data... but maybe you need to change a gather_schema_stats job schedule... you should be aware of when and how the statistics are updated
2) Populate the table, then run a gather_table_stats over the table, wait for the completion of the gathertable_stats_, and finally trigger the 6am process... maybe you need to schedule the process before 6am because the statistics gather process
I hope this helps
Regards,
Alfonso -
When I create a sql tuning set, the OEM gives me the option to use the cursor cache. I am trying to figure out what views oracle joins to get the sql statements and them to specific schemas. I know about v$sql.
Hi,
Checks from V$SQLAREA
- Pavan Kumar N -
DICTIONARY LOOKUP CURSOR CACHED
Hi,
Can anyone please tell me what is this 'DICTIONARY LOOKUP CURSOR CACHED' cause I found that my ADF application uses to many off this cursors when the application is running and over loads my Database too fast.
Can any one please tell me the purpose for this cursors being created and how.
My environment is as follows,
Database : oracle 11g
Server : Weblogic 10My database tells me you are posting to the wrong forum:
CHE_TEST@tcp_asterix_impl> r
1 select case when 'ADF' = 'FORMS'
2 then 'correct forum'
3 else 'incorrect forum' end
4* from dual
CASEWHEN'ADF'='
incorrect forum
CHE_TEST@tcp_asterix_impl>you also may want to try google first.
cheers -
Error accesing schedules_grouping.jsp from administration Tool
Hi,
When I try to enter in the schedules option from administration Tool, I get a compilation error in schedules_grouping page (schedules_grouping.jsp), It says:
Wrong number of arguments in method:
l_freq_string = frequencyHelper.getHumanReadableStringForFrequency(l_freq.toString(), adminConstants);
^
I dont4n know where I can find documentation about FrecuencyHelper class or how to resolve this.
Thanks.Well, it was the exact same error that I got so I assumed it was the same problem you had. Did you apply the 9.0.1.3 patch too? or was it a out-of-the-blue error?
Hi,
I ran the 9.0.1.3 patch on a 9.0.1.1 database that had been running an ultrasearch instance for a couple of months and when I tried to check my old schedules i got the same error :
Wrong number of arguments in method:
l_freq_string = frequencyHelper.getHumanReadableStringForFrequency(l_freq.toString(), adminConstants);
The error disappeared when I deleted the cached jsp pages.
The cached jsp pages are located at : $ORACLE_HOME/ultrasearch/jsp/_pages/ - i simply renamed the pages directory to pages2 and when I ran ultrasearch-web again there was no problems using schedules_grouping.jsp
regards
/Anders -
I have Web Cache set up with an Apache Server and it is returning requests from the cache. I have a response monitoring tool that sends the HTTP 1.1 Cache-Control: no-cache header on the request but Web Cache still returns from cache rather than getting the page from the server. The only configuration option appears to control honoring of response headers not request headers. Shouldn't Web Cache always honor request headers?
Hi,
Yes, it should and will, as far as I have seen, honor request headers too. But, AFAIK, "Cache-Control: no-cache" is a reposne header (as given in HTTP RFC):
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1
So, specifying this in the request doesn't have effect.
Hope this helps.
Regards,
Priyanka
Oracle Web Cache Team -
先library cache pin还是先library cache lock??
Question from Oracler:
session1 给test 建主键
session2 select test 出现library cache lock
session3 select test 出现library cache pin
不是说先获得library cache lock再library cache pin吗
session1以exclusive模式获得 library cache lock
session2 以shared模式请求 library cache lock ,session1未释放,所以session2 wait
那session3 什么解释呢????as maclean answer:
SQL> select * from V$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
session A SQL> alter table maclean add a10 char(2000) default 'maclean';
session B: select 1 from maclean where rownum=1; ==> hang here !
session C: select 1 from maclean where rownum=1; ==> SAME SQL, hang here !
SQL> select event from v$session where event like 'library%';
EVENT
library cache lock
library cache pin
session 4:
SQL> oradebug setmypid;
Statement processed.
SQL> oradebug dump systemstate 266;
Statement processed.
SQL> oradebug tracefile_name;
/s01/admin/G10R21/udump/g10r21_ora_6208.trc
SO: 0x84f5b4a8, type: 4, owner: 0x84e5d4f8, flag: INIT/-/-/0x00
(session) sid: 142 trans: (nil), creator: 0x84e5d4f8, flag: (41) USR/- BSY/-/-/-/-/-
DID: 0001-0010-00000027, short-term DID: 0000-0000-00000000
txn branch: (nil)
oct: 3, prv: 0, sql: 0x7bf10088, psql: 0x7bf582f0, user: 0/SYS
O/S info: user: oracle, term: pts/1, ospid: 6159, machine: vrh8.oracle.com
program: [email protected] (TNS V1-V3)
application name: [email protected] (TNS V1-V3), hash value=0
waiting for 'library cache lock' blocking sess=0x(nil) seq=23 wait_time=0 seconds since wait started=17
handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
Dumping Session Wait History
for 'library cache lock' count=1 wait_time=2149666
handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
for 'library cache lock' count=1 wait_time=2930643
handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
for 'library cache lock' count=1 wait_time=2930300
handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
for 'library cache lock' count=1 wait_time=2930715
handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
for 'library cache lock' count=1 wait_time=2930545
handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
for 'library cache lock' count=1 wait_time=2929985
session 142 is B waiting for library cache lock
the lock handle address is 7c3a5560
SO: 0x8003b350, type: 53, owner: 0x84f98ba0, flag: INIT/-/-/0x00
LIBRARY OBJECT LOCK: lock=8003b350 handle=7c3a5560 request=S
call pin=(nil) session pin=(nil) hpc=0005 hlc=0000
htl=0x8003b3d0[0x7d034330,0x7d034330] htb=0x7d034330 ssga=0x7e9f2168
user=84f5b4a8 session=84f5b4a8 count=0 flags=RES/[0010] savepoint=0x1f9
LIBRARY OBJECT HANDLE: handle=7c3a5560 mutex=0x7c3a5690(0)
name=SYS.MACLEAN
hash=458787ae49fd6f284ccb04a892b38231 timestamp=02-09-2012 21:32:36
namespace=TABL flags=KGHP/TIM/SML/[02000000]
kkkk-dddd-llll=0000-0701-0701 lock=X pin=X latch#=3 hpc=0006 hlc=0004
lwt=0x7c3a5608[0x8003b380,0x8003b380] ltm=0x7c3a5618[0x7c3a5618,0x7c3a5618]
pwt=0x7c3a55d0[0x7c3a55d0,0x7c3a55d0] ptm=0x7c3a55e0[0x7c3a55e0,0x7c3a55e0]
ref=0x7c3a5638[0x7c3a5638,0x7c3a5638] lnd=0x7c3a5650[0x7bf75a18,0x7bf90650]
LIBRARY OBJECT: object=7c1dec60
type=TABL flags=EXS/LOC/UPD[0905] pflags=[0000] status=VALD load=0
DATA BLOCKS:
data# heap pointer status pins change whr
0 7c3a54a0 7c1ded78 I/P/A/-/- 0 NONE 00
8 7c1de7f0 7e33ed48 I/P/A/-/- 1 UPDATE 00
9 7c1de8c0 7bf109e8 I/P/A/-/- 1 NONE 00
10 7c1de948 7bf10600 I/P/A/-/- 1 NONE 00
关于session B的 library cache lock , 其原因是 add column 的session A 以 X mode lock SYS.MACLEAN, X mode pin SYS.MACLEAN 且不释放, 所以session B的 library cache lock不用多解释
session C:
SO: 0x84f5dd18, type: 4, owner: 0x84e5dce0, flag: INIT/-/-/0x00
(session) sid: 144 trans: (nil), creator: 0x84e5dce0, flag: (41) USR/- BSY/-/-/-/-/-
DID: 0001-0011-0000000A, short-term DID: 0000-0000-00000000
txn branch: (nil)
oct: 3, prv: 0, sql: 0x7bf10088, psql: 0x7bf582f0, user: 0/SYS
O/S info: user: oracle, term: pts/2, ospid: 6183, machine: vrh8.oracle.com
program: [email protected] (TNS V1-V3)
application name: [email protected] (TNS V1-V3), hash value=0
waiting for 'library cache pin' blocking sess=0x(nil) seq=19 wait_time=0 seconds since wait started=17
handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
Dumping Session Wait History
for 'library cache pin' count=1 wait_time=2568684
handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
for 'library cache pin' count=1 wait_time=2930677
handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
for 'library cache pin' count=1 wait_time=2929805
handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
for 'library cache pin' count=1 wait_time=2931420
handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
for 'library cache pin' count=1 wait_time=2930258
handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
session 144 is session C , waiting for library cache pin
handle address 7bf46e40=> 指向 一个 child cursor namespace=CRSR, 而这个child cursor已经被 session B pin住了:
SO: 0x7f03f890, type: 54, owner: 0x84f5dd18, flag: INIT/-/-/0x00
LIBRARY OBJECT PIN: pin=7f03f890 handle=7bf46e40 request=S lock=0
user=84f5dd18 session=84f5dd18 count=0 mask=0000 savepoint=0x3f flags=[00]
SO: 0x7ec4cc80, type: 53, owner: 0x84f5dd18, flag: INIT/-/-/0x00
LIBRARY OBJECT LOCK: lock=7ec4cc80 handle=7bf46e40 mode=N
call pin=(nil) session pin=(nil) hpc=0000 hlc=0000
htl=0x7ec4cd00[0x7e449348,0x80c35108] htb=0x80c35108 ssga=0x80c34ff0
user=84f5dd18 session=84f5dd18 count=1 flags=[0000] savepoint=0x0
LIBRARY OBJECT HANDLE: handle=7bf46e40 mutex=0x7bf46f70(0)
namespace=CRSR flags=RON/KGHP/PN0/[10010000]
kkkk-dddd-llll=0000-0001-0000 lock=N pin=X latch#=3 hpc=0004 hlc=0004
lwt=0x7bf46ee8[0x7bf46ee8,0x7bf46ee8] ltm=0x7bf46ef8[0x7bf46ef8,0x7bf46ef8]
pwt=0x7bf46eb0[0x7f03f8c0,0x7f03f8c0] ptm=0x7bf46ec0[0x7bf46ec0,0x7bf46ec0]
ref=0x7bf46f18[0x7bf7bfe0,0x7bf7bfe0] lnd=0x7bf46f30[0x7bf46f30,0x7bf46f30]
LIBRARY OBJECT: object=7bf29018
type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
READ ONLY DEPENDENCIES: count=1 size=16
DATA BLOCKS:
data# heap pointer status pins change whr
0 7bf20060 7bf28ba8 I/P/A/-/- 0 NONE 00
6 7bf77a20 7bf776f8 I/P/A/-/- 1 NONE 00
我们可以找到 上面这个child cursor 的 parent cursor :
SO: 0x7d03b620, type: 53, owner: 0x84f5b4a8, flag: INIT/-/-/0x00
LIBRARY OBJECT LOCK: lock=7d03b620 handle=7bf10088 mode=N
call pin=(nil) session pin=(nil) hpc=0000 hlc=0000
htl=0x7d03b6a0[0x7d034030,0x7c03c9f8] htb=0x7d034030 ssga=0x7e9f2168
user=84f5b4a8 session=84f5b4a8 count=1 flags=[0000] savepoint=0x1f7
LIBRARY OBJECT HANDLE: handle=7bf10088 mutex=0x7bf101b8(0)
name=select 1 from maclean where rownum=1
hash=324793c639b13d0954bd5421eaed6701 timestamp=03-08-2012 02:29:24
namespace=CRSR flags=RON/KGHP/TIM/KEP/PN0/SML/DBN/[12010044]
kkkk-dddd-llll=0001-0001-0001 lock=N pin=0 latch#=3 hpc=0004 hlc=0004
lwt=0x7bf10130[0x7bf10130,0x7bf10130] ltm=0x7bf10140[0x7bf10140,0x7bf10140]
pwt=0x7bf100f8[0x7bf100f8,0x7bf100f8] ptm=0x7bf10108[0x7bf10108,0x7bf10108]
ref=0x7bf10160[0x7bf10160,0x7bf10160] lnd=0x7bf10178[0x82f4f2f8,0x7bf4d608]
LIBRARY OBJECT: object=7bf7c8a8
type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
CHILDREN: size=16
child# table reference handle
0 7bf7c370 7bf7bfe0 7bf46e40 => 只有一个child handle 7bf46e40
DATA BLOCKS:
data# heap pointer status pins change whr
0 7bf2a428 7bf7c9c0 I/P/A/-/- 0 NONE 00即在session B parse SQL "select 1 from maclean where rownum=1" 的时候, 会生成一个child cursor 并 X mode pin住这个child cursor , 而session C 同时发起 一样的SQL语句 "select 1 from maclean where rownum=1" 时 需要 share 这个child cursor , 即以 S mode pin 这个child cursor , 但是session B 还没有完成 optimize 没有生成完整的child cursor , 需要等待 session A 释放 library cache lock才能 完成, 所以 session C 要等 session B build child cursor , 此时session C等" library cache pin" ;
如果 session C 执行的是不一样的SQL,那么 session C 不share 同一个child cursor , session C 会wait for library cache lock.
since 10.2.0.3 "_kks_use_mutex_pin"=TRUE or 11g 开始 使用mutex 保护cursor pin ,所以 session C 若执行 与session B 一样的SQL,那么 wiat for cursor pin S on X
SQL> select * from V$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
session A:
SQL> alter table test add t11 char(2000) default 'maclean';
session B:
SQL> select * from test where rownum=1;
session C:
SQL> select * from test where rownum=1;
SQL> select event from v$session where wait_class='Concurrency';
EVENT
cursor: pin S wait on X
library cache lock
SQL> oradebug setmypid;
Statement processed.
SQL> oradebug dump systemstate 266;
Statement processed.
session C:
SO: 0x9e2256b8, type: 4, owner: 0x9e59a1c0, flag: INIT/-/-/0x00 if: 0x3 c: 0x3
proc=0x9e59a1c0, name=session, file=ksu.h LINE:12624, pg=0
(session) sid: 179 ser: 41307 trans: (nil), creator: 0x9e59a1c0
flags: (0x41) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
flags2: (0x40009) -/-/INC
DID: , short-term DID:
txn branch: (nil)
oct: 3, prv: 0, sql: 0x956e18b8, psql: 0x956e18b8, user: 0/SYS
ksuxds FALSE at location: 0
service name: SYS$USERS
client details:
O/S info: user: oracle, term: pts/3, ospid: 26823
machine: vrh1.oracle.com program: [email protected] (TNS V1-V3)
application name: [email protected] (TNS V1-V3), hash value=1481565533
Current Wait Stack:
0: waiting for 'cursor: pin S wait on X'
idn=0xe76d0d8c, value=0xca00000000, where=0x500000000
wait_id=17 seq_num=18 snap_id=1
wait times: snap=12.671273 sec, exc=12.671273 sec, total=12.671273 sec
wait times: max=infinite, heur=12.671273 sec
wait counts: calls=1148 os=1148
in_wait=1 iflags=0x15b2
There is at least one session blocking this session.
Dumping 1 direct blocker(s):
inst: 1, sid: 202, ser: 15511
Dumping final blocker:
inst: 1, sid: 9, ser: 1
Wait State:
fixed_waits=0 flags=0x22 boundary=(nil)/-1
idn=0xe76d0d8c=> 这个是mutex的标示
KGX Atomic Operation Log 0x94aa8ca8
Mutex 0x8a328978(202, 0) idn e76d0d8c oper GET_SHRD
Cursor Pin uid 179 efd 0 whr 5 slp 1148
opr=2 pso=0x8b5a8c48 flg=0
pcs=0x8a3288e0 nxt=(nil) flg=35 cld=1 hd=0x93d4bbb8 par=0x8a328048
ct=1 hsh=0 unp=(nil) unn=0 hvl=8a328ef0 nhv=1 ses=0x9e1e0ea0
hep=0x8a328978 flg=80 ld=1 ob=0x939a30b0 ptr=0x935e0348 fex=0x935df6f0
这个mutex的 oper是 GET_SHRD 即 pin S 它指向 0x93d4bbb8 是一个child cursor
以下是parent cursor:
SO: 0x957fa9d8, type: 78, owner: 0x9e1e0ea0, flag: INIT/-/-/0x00 if: 0x3 c: 0x3
proc=0x9e593da0, name=LIBRARY OBJECT LOCK, file=kgl.h LINE:8547, pg=0
LibraryObjectLock: Address=0x957fa9d8 Handle=0x956e18b8 Mode=N CanBeBrokenCount=1 Incarnation=1 ExecutionCount=0
User=0x9e1e0ea0 Session=0x9e1e0ea0 ReferenceCount=1 Flags=CNB/[0001] SavepointNum=4f5864b8
LibraryHandle: Address=0x956e18b8 Hash=e76d0d8c LockMode=N PinMode=0 LoadLockMode=0 Status=VALD
ObjectName: Name=select * from test where rownum=1
FullHashValue=7e277fabf95d7c80e8924ed6e76d0d8c Namespace=SQL AREA(00) Type=CURSOR(00) Identifier=3882683788 OwnerIdn=0
Statistics: InvalidationCount=1 ExecutionCount=2 LoadCount=3 ActiveLocks=2 TotalLockCount=4 TotalPinCount=1
Counters: BrokenCount=1 RevocablePointer=1 KeepDependency=1 BucketInUse=3 HandleInUse=3 HandleReferenceCount=0
Concurrency: DependencyMutex=0x956e1968(0, 2, 0, 0) Mutex=0x956e19e8(0, 45, 0, 0)
Flags=RON/PIN/TIM/PN0/DBN/[10012841]
WaitersLists:
Lock=0x956e1948[0x956e1948,0x956e1948]
Pin=0x956e1928[0x956e1928,0x956e1928]
LoadLock=0x956e19a0[0x956e19a0,0x956e19a0]
Timestamp: Current=03-08-2012 02:45:45
HandleReference: Address=0x956e1a78 Handle=(nil) Flags=[00]
LibraryObject: Address=0x8a327fa8 HeapMask=0000-0001-0001-0000 Flags=EXS[0000] Flags2=[0000] PublicFlags=[0000]
ChildTable: size='16'
Child: id='0' Table=0x8a328e58 Reference=0x8a3288b8 Handle=0x956db988
Child: id='1' Table=0x8a328e58 Reference=0x8a328b80 Handle=0x93d4bbb8
NamespaceDump:
Parent Cursor: sql_id=fj4kfuvmqu3cc parent=0x8a328048 maxchild=2 plk=y ppn=n
但是很可惜 0x93d4bbb8 这个 child cursor 被 session B pin住了:
SO: 0x957fa8d8, type: 78, owner: 0x9e1e0ea0, flag: INIT/-/-/0x00 if: 0x3 c: 0x3
proc=0x9e593da0, name=LIBRARY OBJECT LOCK, file=kgl.h LINE:8547, pg=0
LibraryObjectLock: Address=0x957fa8d8 Handle=0x93d4bbb8 Mode=N CanBeBrokenCount=1 Incarnation=1 ExecutionCount=0
ClusterLock=0x8f1945f8 Context=0x7fd379518308 User=0x9e1e0ea0 Session=0x9e1e0ea0 ReferenceCount=1
Flags=CBK/[0020] SavepointNum=0
LibraryHandle: Address=0x93d4bbb8 Hash=0 LockMode=N PinMode=X LoadLockMode=0 Status=VALD
Name: Namespace=SQL AREA(00) Type=CURSOR(00)
Statistics: InvalidationCount=0 ExecutionCount=0 LoadCount=1 ActiveLocks=2 TotalLockCount=2 TotalPinCount=3
Counters: BrokenCount=1 RevocablePointer=1 KeepDependency=0 BucketInUse=0 HandleInUse=0 HandleReferenceCount=0
Concurrency: DependencyMutex=0x93d4bc68(0, 0, 0, 0) Mutex=0x956e19e8(0, 45, 0, 0)
Flags=RON/PIN/PN0/EXP/CHD/[10012111]
WaitersLists:
Lock=0x93d4bc48[0x93d4bc48,0x93d4bc48]
Pin=0x93d4bc28[0x93d4bc28,0x93d4bc28]
LoadLock=0x93d4bca0[0x93d4bca0,0x93d4bca0]
LibraryObject: Address=0x939a30b0 HeapMask=0000-0001-0001-0000 Flags=EXS[0000] Flags2=[0000] PublicFlags=[0000]
DataBlocks:
Block: #='0' name=KGLH0^e76d0d8c pins=0 Change=NONE
Heap=0x93d1a808 Pointer=0x939a3150 Extent=0x939a3030 Flags=I/-/P/A/-/-
FreedLocation=0 Alloc=1.546875 Size=4.000000 LoadTime=4385736620
Block: #='6' name=SQLA^e76d0d8c pins=0 Change=NONE
Heap=0x8a328a20 Pointer=0x935e0348 Extent=0x935df6f0 Flags=I/-/P/A/-/E
FreedLocation=0 Alloc=0.000000 Size=0.000000 LoadTime=0
NamespaceDump:
Child Cursor: Heap0=0x939a3150 Heap6=0x935e0348 Heap0 Load Time=03-08-2012 02:50:16 Heap6 Load
PinMode=X
保持这个 X mode pin的是另外一个 mutex , 这个mutex的 oper是 LONG_EXCL
Time=03-08-2012 02:50:16 ----------------------------------------
KGX Atomic Operation Log 0x8f1945f8
Mutex 0x8a328978(202, 0) idn e76d0d8c oper LONG_EXCL
Cursor Pin uid 202 efd 0 whr 1 slp 0
opr=3 pso=0x957fa8d8 flg=0
pcs=0x8a3288e0 nxt=(nil) flg=35 cld=1 hd=0x93d4bbb8 par=0x8a328048
ct=1 hsh=0 unp=(nil) unn=0 hvl=8a328ef0 nhv=1 ses=0x9e1e0ea0
hep=0x8a328978 flg=80 ld=1 ob=0x939a30b0 ptr=0x935e0348 fex=0x935df6f0
Maybe you are looking for
-
How do I set up my kids itouch?
I have one iTunes account with an iPhone 4s set up. I also have two kids...both with iTouch's. I am trying to set up their iMessaging but it wants to treat my kids iTouch as if it were mine. I have set up email addresses for them...but, we can't seem
-
Update more than one lakh records
Hi i have a table which contains around 1 million records when the end user want to update a record of more than one lakh what could be the best process to get the updation quickly the current scenario is taking 1mnt for 10k records,thanks in advance
-
SAP script linking with internal table
Hi all, This is my program to print invoices REPORT z_g_test. TABLES: sbook. DATA sflights_wa TYPE sflights. DATA: itcpo LIKE itcpo. DATA itcpp LIKE itcpp. DATA sflights_itab TYPE TABLE OF sflights WITH HEADER LINE. DATA sbook_itab TYPE TABLE OF sbo
-
Diff. b/t ale & edi
Hello, Tell me exact difference between ALE and EDI in Idoc's.which is used for sap to sap and sap to non-sap.
-
I finished my movie, went to export and got the "Unable to prepare project for publishing" message. I tried closing iMovie and coming back to my project, but now it won't let me even play my project. I've tried removing the iMovie caches and preferen