V$SQLAREA.sharable_mem column !!
Hi, all.
What is the unit of V$SQLAREA.sharable_mem column, bytes or bits?
One of sqls has the value of 4846245 in sharable_mem column!
It means 4,846,245 bytes or bits?
I cannot believe the sql is using 450 MegaBytes.
In addition, which memory component includes "sharable_mem"?
Is it part of shared pool?
Thanks and Regards.
SHARABLE_MEM is memory in bytes. There are no v$views that I know of that list in bits. 4846245 bytes is roughly 4.8MB, or to be more correct 4.621MB.
Shared sql is stored in the library cache in the shared pool. You can increase the size of SHARED_POOL_SIZE or pin this sql statement in the pool so it is not aged out, hence increasing performace, by using the dbms_shared_pool.keep(); procedure. You may need to run \rdbms\admin\dbmspool.sql for this package to be created.
--andrew
Similar Messages
-
Parallel run of the same function from multiple jobs
Hello, everyone!
I have a function which accepts a date range, reads invoices from a partitioned by date table and writes output to a partitioned by invoice table. Each invoice can have records only with one date, so both tables may have one invoice only in one partition, i.e. partitions do not overlap. Function commits after processing each date. The whole process was running about 6 hrs with 46 million records in source table.
We are expecting source table to grow over 150 million rows, so we decided to split it into 3 parallel jobs and each job will process 1/3 of dates, and, as a result, 1/3 of invoices.
So, we call this function from 3 concurrent UNIX jobs and each job passes its own range of dates.
What we noticed, is that even if we run 3 jobs concurrently, they do not run this way! When 1st job ends after 2 hrs of run, the number of commited rows in the target table is equal to the number of rows inserted by this job. When 2nd job ends after 4 hrs of run, the number of rows in the target table is equal the summary of two jobs. And the 3rd job ends only after 6 hrs.
So, instead of improving a process by splitting it into 3 parallel jobs we ended up having 3 jobs instead of one with the same 6 hrs until target table is loaded.
My question is - How to make it work? It looks like Oracle 11g is smart enough to recognize, that all 3 jobs are calling the same function and execute this function only once at the time. I.e. it looks like only one copy of the function is loaded into the memory at the same even if it called by 3 different sessions.
The function itself has a very complicated logic, does a lot of verifications by joining to another tables and we do not want to maintain 3 copies of the same code under different names. And beside this, the plan is that if with 150 mln rows we will have a performance problem, then split it to more concurrent jobs, for example 6 or 8 jobs. Obviously we do not want to maintain so many copies of the same code by copying this function into another names.
I was monitoring jobs by quering V$SESSION and V$SQLAREA ROWS_PROCESSED and EXECUTIONS and I can see, that each job has its own set of SID's (i.e. runs up to 8 parallel processes), but number of commited rows is always eqal to the number of rows from the 1st job, then 2nd+1st, etc. So, it looks like all processes of 2nd and 3rd jobs are waiting until 1st one is done.
Any ideas?OK, this is my SQL and results (some output columns are ommited as irrelevant)
SELECT
TRIM ( SESS.OSUSER ) "OSUser"
, TRIM ( SESS.USERNAME ) "OraUser"
, NVL(TRIM(SESS.SCHEMANAME),'------') "Schema"
, SESS.AUDSID "AudSID"
, SESS.SID "SID"
, TO_CHAR(SESS.LOGON_TIME,'HH24:MI:SS') "Sess Strt"
, SUBSTR(SQLAREA.FIRST_LOAD_TIME,12) "Tran Strt"
, NUMTODSINTERVAL((SYSDATE-TO_DATE(SQLAREA.FIRST_LOAD_TIME,'yyyy-mm-dd hh24:mi:ss')),'DAY') "Tran Time"
, SQLAREA.EXECUTIONS "Execs"
, TO_CHAR(SQLAREA.ROWS_PROCESSED,'999,999,999') "Rows"
, TO_CHAR(TRAN.USED_UREC,'999,999,999') "Undo Rec"
, TO_CHAR(TRAN.USED_UBLK,'999,999,999') "Undo Blks"
, SQLAREA.SORTS "Sorts"
, SQLAREA.FETCHES "Fetches"
, SQLAREA.LOADS "Loads"
, SQLAREA.PARSE_CALLS "Parse Calls"
, TRIM ( SESS.PROGRAM ) "Program"
, SESS.SERIAL# "Serial#"
, TRAN.STATUS "Status"
, SESS.STATE "State"
, SESS.EVENT "Event"
, SESS.P1TEXT||' '||SESS.P1 "P1"
, SESS.P2TEXT||' '||SESS.P2 "P2"
, SESS.P3TEXT||' '||SESS.P3 "P3"
, SESS.WAIT_CLASS "Wait Class"
, NUMTODSINTERVAL(SESS.WAIT_TIME_MICRO/1000000,'SECOND') "Wait Time"
, NUMTODSINTERVAL(SQLAREA.CONCURRENCY_WAIT_TIME/1000000,'SECOND') "Wait Concurr"
, NUMTODSINTERVAL(SQLAREA.CLUSTER_WAIT_TIME/1000000,'SECOND') "Wait Cluster"
, NUMTODSINTERVAL(SQLAREA.USER_IO_WAIT_TIME/1000000,'SECOND') "Wait I/O"
, SESS.ROW_WAIT_FILE# "Row Wait File"
, SESS.ROW_WAIT_OBJ# "Row Wait Obj"
, SESS.USER# "User#"
, SESS.OWNERID "OwnerID"
, SESS.SCHEMA# "Schema#"
, TRIM ( SESS.PROCESS ) "Process"
, NUMTODSINTERVAL(SQLAREA.CPU_TIME/1000000,'SECOND') "CPU Time"
, NUMTODSINTERVAL(SQLAREA.ELAPSED_TIME/1000000,'SECOND') "Elapsed Time"
, SQLAREA.DISK_READS "Disk Reads"
, SQLAREA.DIRECT_WRITES "Direct Writes"
, SQLAREA.BUFFER_GETS "Buffers"
, SQLAREA.SHARABLE_MEM "Sharable Memory"
, SQLAREA.PERSISTENT_MEM "Persistent Memory"
, SQLAREA.RUNTIME_MEM "RunTime Memory"
, TRIM ( SESS.MACHINE ) "Machine"
, TRIM ( SESS.TERMINAL ) "Terminal"
, TRIM ( SESS.TYPE ) "Type"
, SQLAREA.MODULE "Module"
, SESS.SERVICE_NAME "Service name"
FROM V$SESSION SESS
INNER JOIN V$SQLAREA SQLAREA
ON SESS.SQL_ADDRESS = SQLAREA.ADDRESS
and UPPER(SESS.STATUS) = 'ACTIVE'
LEFT JOIN V$TRANSACTION TRAN
ON TRAN.ADDR = SESS.TADDR
ORDER BY SESS.OSUSER
,SESS.USERNAME
,SESS.AUDSID
,NVL(SESS.SCHEMANAME,' ')
,SESS.SID
AudSID SID Sess Strt Tran Strt Tran Time Execs Rows Undo Rec Undo Blks Sorts Fetches Loads Parse Calls Status State Event P1 P2 P3 Wait Class Wait Time Wait Concurr Wait Cluster Wait I/O Row Wait File Row Wait Obj Process CPU Time Elapsed Time Disk Reads Direct Writes Buffers Sharable Memory Persistent Memory RunTime Memory
409585 272 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED SHORT TIME PX Deq: Execute Reply sleeptime/senderid 200 passes 2 0 Idle 0 0:0:0.436000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 7 21777 22739 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 203 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.9674000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 25 124730 4180 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 210 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.11714000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 24 124730 22854 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 231 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.4623000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 46 21451 4178 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 243 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED SHORT TIME PX qref latch function 154 sleeptime 13835058061074451432 qref 0 Other 0 0:0:0.4000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21451 3550 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 252 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.19815000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 49 21451 22860 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 273 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.11621000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 22 124730 4182 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 277 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 20 blocks 125 requests 125 User I/O 0 0:0:0.242651000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 39 21451 4184 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 283 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.2781000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 42 21451 3552 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 295 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.24424000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 40 21451 22862 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409585 311 22:30:01 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.15788000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 31 21451 22856 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 242 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITED KNOWN TIME PX Deq: Execute Reply sleeptime/senderid 200 passes 1 0 Idle 0 0:0:0.522344000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 28 137723 22736 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 192 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.14334000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 31 21462 4202 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 222 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.16694000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 37 21462 4194 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 233 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.7731000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 44 21462 4198 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 253 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 21 blocks 125 requests 125 User I/O 0 0:0:0.792518000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 39 21462 4204 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 259 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.2961000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21462 4196 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409586 291 22:29:20 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq Credit: send blkd sleeptime/senderid 268566527 passes 1 qref 0 Idle 0 0:0:0.9548000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 35 21462 4200 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 236 22:15:36 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Table Q Normal sleeptime/senderid 200 passes 2 0 Idle 0 0:0:0.91548000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 25 124870 22831 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 207 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Execution Msg sleeptime/senderid 268566527 passes 3 0 Idle 0 0:0:0.644662000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 43 21423 4208 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 241 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING PX Deq: Execution Msg sleeptime/senderid 268566527 passes 3 0 Idle 0 0:0:0.644594000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 47 21423 4192 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448
409587 297 22:30:30 22:15:36 0 0:14:52.999999999 302 383,521 305 0 1 3598 WAITING db file parallel read files 20 blocks 109 requests 109 User I/O 0 0:0:0.793261000 0 0:0:1.124995000 0 0:0:0.0 0 1:56:15.227863000 12 21316 4206 0 0:25:25.760000000 0 2:17:1.815044000 526959 0 25612732 277567 56344 55448Here I found one interesting query http://www.pythian.com/news/922/recent-spike-report-from-vactive_session_history-ash/
But it does not help me -
Proving prepared statements are being reused
How can I prove that a prepared statement from a JDBC driver is being reused / pooled ?
What essentially I want to do is to have prepared statements reused to reduce hard parsing ... but I also need to prove that the statements are being reused. If I query the statement in V$SQLAREA, the column PARSE_CALLS does not seem to be distinguish between hard parse and soft parse:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch3204.htm#1126299
I am only interested for now in proving the just ONE statement is being reused ... which mean that the number of hard parses is very low compared to the number of soft parses for that ONE statement.
Regards,
jms
Message was edited by:
jmsHi,
No, parse calls is all soft and hard parse together. What you would see, if used absolutely correctly, would be 1 hard parse per session and many executions.
But since v$sql is obviously not linked to v$session other than at the time of exection, you see the aggregated parse calls and executions for each cursor. So what you should see is parse calls go up relatively slowly to the number of exections.
However, you can see soft and hard parses using the v$sesstat and v$statname views so you can see soft and hard parses on a session by session basis, be these are again aggregated, so you can't see soft / hard counts per cursor, only the total for a session.
What I see a lot of the time is they don't get it quite right, so hard parses is low but soft parses are high, so they are still parsing when they don't need to, but at least they are binding and using shareable SQL, which is a step in the right direction.
When I say 'they', it is a generic reference to all Java/.Nyet programmers writing front end code where they just don't 'get' parsing and binding because it's just too complicated and hey, SQL Server isn't like this...!
HTH
Chris -
SQL_FULLTEXT Column of v$sqlarea
All,
What do I need to do so that the full text stored in sql_fulltext column of v$sqlarea is displayed.
At the moment, when I run the following sql:
select SQL_FULLTEXT from v$sqlarea
where sql_id='0n6x4f5kaaymb';
I get the output below:
SQL_FULLTEXT
SELECT INSTALLED_APP_ID, ORIGINATED_DATE, APPLICATION_ID, RECEIVED_DATE, EFFECTI
Thanks in advance
BaffySQL> select SQL_FULLTEXT from v$sqlarea
2 where sql_id='2j0qhrtccbz4u'
3 /
SQL_FULLTEXT
SELECT GA.VALUE FROM SYS.SCHEDULER$_GLOBAL_ATTRIBUTE GA, OBJ$ GO WHERE GA.OBJ# =
SQL> set long 999999999
SQL> select SQL_FULLTEXT from v$sqlarea
2 where sql_id='2j0qhrtccbz4u'
3 /
SQL_FULLTEXT
SELECT GA.VALUE FROM SYS.SCHEDULER$_GLOBAL_ATTRIBUTE GA, OBJ$ GO WHERE GA.OBJ# =
GO.OBJ# AND GO.NAME = 'LOG_HISTORY' -
What's unit of CPU_TIME & ELAPSED_TIME columns in v$sqlarea
Hi,
Oracle 9.2.0.4 on Solaris 9.
What is the time unit of CPU_TIME & ELAPSED_TIME columns in v$sqlarea?
The Database Reference says it is in microseconds (1/1000 seconds?).
My java code would get the query result even before the database engine finishes parsing the query string. Either the doc is wrong, or the data in the v$sqlarea is not right.
It seems to me that the unit should be 1/1000000 seconds.
Anybody knows what the unit really is in those columns?
Thanks,
HarryAnyone any idea by what logic "10s of milliseconds" can translate to .000001 seconds?
I can see how it could mean .01 seconds (10 times a millisecond) or .0001 seconds (a tenth of a millisecond), but .000001 seconds seems a long way off.
Would you remember where you found those numbers? -
Reg: Rows_Processed column in v$SQLAREA
Hi all,
I had a request to check the rows processed while an insert statement is running in the database.
Can anyone clarify me on this from v$sqlarea (rows_processed) is it possible to get the rows processed till that time.
As i am in thinking that it depends on how application has commit transactions.
Can any one throw some light on this request...
Thanks in advance...
Satya GHi,
Rows_processed column of v$sql gives the count of total rows that has been processed whether it is committed or not committed. It gives the sum of rows processed by the query even if some of the transaction has been rollbacked.
I suppose you are looking for USED_UREC in v$transaction.
Regards
Anurag -
Possible to find session/user who ran SQL in v$SQLAREA ?
Using this:
select * from v$sqlarea where sql_text like '%2412982%' and sql_text like '%prms%' and module != 'sqlplusw.exe';
I am able to locate a particular instance of a piece of SQL being executed and stored in the library cache.
However, I would really like to know who run it but I never "catch them".
Is there a way?
1* select * from v$sqlarea where sql_text like '%2412982%' and sql_text like '%prms%' and module != 'sqlplusw.exe'
SQL> /
SQL_TEXT
SHARABLE_MEM PERSISTENT_MEM RUNTIME_MEM SORTS VERSION_COUNT LOADED_VERSIONS OPEN_VERSIONS USERS_OPENING FETCHES EXECUTIONS USERS_EXECUTING LOADS FIRST_LOAD_TIME INVALIDATIONS
PARSE_CALLS DISK_READS BUFFER_GETS ROWS_PROCESSED COMMAND_TYPE OPTIMIZER_MODE PARSING_USER_ID PARSING_SCHEMA_ID KEPT_VERSIONS ADDRESS HASH_VALUE
MODULE MODULE_HASH ACTION ACTION_HASH SERIALIZABLE_ABORTS CPU_TIME ELAPSED_TIME I
CHILD_LATCH
select it.company, it.product, p.description, it.transaction_code, ifsapp.km_util_api.conv_to_date_fmt(it.company,to_date(it.transaction_date,'YYYY-MM-DD')) order_date, it.reference, it.wareh
ouse_id warehouse, it.transaction_quantity, it.inventory_unit_of_measure, it.location_aisle, it.location_row, it.location_tier, it.lot_identifier, it.user_profile, it.reference_2, it.referenc
e_3 from ifsapp.prms_inventory_transaction it, ifsapp.prms_product p where it.company=p.company (+) and it.product=p.product (+) and it.company=upper('OKM') and ((it.lot_identifier like upp
er('%2412982%')) or ('' is not null and it.lot_identifier like upper('%%')) or ('' is not null and it.lot_identifier like upper('%%')) or ('' is not null and it.lot_identifier like upper('%%')) or
('' is not null and it.lot_identifier like upper('%%'))) and (('' is null or rtrim(it.product)=upper('')) or (rtrim(it.product)=upper('')) or (rtrim(it.product)=upper('')) or (rtrim(it.product)=
8328 3616 17240 1 1 0 1 1 1 1 0 1 2006-09-28/08:47:09 0
1 134719 134846 0 3 CHOOSE 166 166 0 07000004A8D88FB0 1040757058
Repetitive Distribution.exe 0 0 0 34410000 58880847 N
3I think the SQL listed is wrong, as it only display the SQL created by Oracle whenever the user login, which is:
SELECT DECODE('A','A','1','2') FROM DUAL
And all subsequent SQL issued by the user during the session is not listed.
I am also in the midst of trying of get the user issuing the SQL :-).....MANY THANKS AHEAD.... -
Oracle 8i: full sql text in v$sqlarea
I work with oracle 8i.
is there a v$... that shows the execution plan for a query.
in thev$sqlarea there isn't the full_sqltext column, and I need to know what oracle is doing now.
Message was edited by:
user596611v$sqltext_with_newlines will produce multiple rows per statement.
You'll need an inline view
select t.hash_value, t.sorts, t.executions, t.buffer_gets, t.disk_reads, tn.sql_text
from v$sqlarea t,
(select hash_value,sql_text
from v$sqltext_with_newlines
order by hash_value, piece) tn
where sn.hash_value = t.hash_value
Sybrand Bakker
Senior Oracle DBA -
Hello Experts ;
I am testing few things on pl-sql supplies packages (DBMS_SHARED_POOL.PURGE )
but i have few doubts please clear my doubt.
<< On Terminal 1 >>
SQL>desc tab1;
Name Null? Type
NO NUMBER
NAME VARCHAR2(15)
EMAIL VARCHAR2(15)
CITY VARCHAR2(15)
SQL>select count(*) from tab1;
COUNT(*)
300000
SQL>select * from t ab1;
In Process
<< On Terminal 2 >>
SQL. conn /as sysdba
Connected.
SQL>select sql_text,address, hash_value, executions, loads, version_count, invalidations, parse_calls from v$sqlarea
where sql_text ='SELECT * FROM TAB1';
no rows selected
Why i did n't get values in terminal 2 , when query running on terminal 1;
MY DB VRSION IS : 10.2.0.1.0
Thanks in dvance ..@BCV
i got 268 lines ..then i have created spool file . i am pasting output for following query..
SYS>select * From v$sqlarea
2 order by FIRST_LOAD_TIME desc;
SQL_TEXT
--------------------------------------------------------------------------------SQL_FULLTEXT
--------------------------------------------------------------------------------SQL_ID SHARABLE_MEM PERSISTENT_MEM RUNTIME_MEM SORTS VERSION_COUNT
LOADED_VERSIONS OPEN_VERSIONS USERS_OPENING FETCHES EXECUTIONS
PX_SERVERS_EXECUTIONS END_OF_FETCH_COUNT USERS_EXECUTING LOADS
FIRST_LOAD_TIME INVALIDATIONS PARSE_CALLS DISK_READS DIRECT_WRITES
BUFFER_GETS APPLICATION_WAIT_TIME CONCURRENCY_WAIT_TIME CLUSTER_WAIT_TIME
USER_IO_WAIT_TIME PLSQL_EXEC_TIME JAVA_EXEC_TIME ROWS_PROCESSED COMMAND_TYPE
OPTIMIZER_ OPTIMIZER_COST
OPTIMIZER_ENV
--------------------------------------------------------------------------------OPTIMIZER_ENV_HASH_VALUE PARSING_USER_ID PARSING_SCHEMA_ID
PARSING_SCHEMA_NAME KEPT_VERSIONS ADDRESS HASH_VALUE OLD_HASH_VALUE
PLAN_HASH_VALUE MODULE
--------------- ----------------------------------------------------------------MODULE_HASH ACTION
ACTION_HASH SERIALIZABLE_ABORTS
OUTLINE_CATEGORY CPU_TIME
ELAPSED_TIME OUTLINE_SID LAST_ACT R
OBJECT_STATUS LITERAL_HASH_VALUE LAST_LOAD I CHILD_LATCH
SQL_PROFILE PROGRAM_ID
PROGRAM_LINE# EXACT_MATCHING_SIGNATURE FORCE_MATCHING_SIGNATURE LAST_ACTI
BIND_DATA
select * From v$sqlarea order by FIRST_LOAD_TIME desc -
Which user/schema executed query in V$SQLAREA
I am looking on one row/query in view "V$SQLAREA" and want to which user/schema was used to log in to the database when that one query was executed. How i can get that schema name?
Should i look this column maybe:
V$SQLAREA
PARSING_SCHEMA_NAME VARCHAR2(30) Schema name that was used to parse this child cursor( http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2129.htm )
I have Java software that uses different database schemas/users to make connections to my database. And i want to know for one query which schema/user was used to connect to database before running the query.
I think i need to join "V$SQLAREA" to view V$SESSION and there the column "USERNAME" tells me the connection user name for the executed query.
V$SESSION
USERNAME VARCHAR2(30) Oracle username
( http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm )Seems like i fail to join "V$SQLAREA" to view V$SESSION:
select q.SQL_TEXT, q.sql_id, q.PARSING_SCHEMA_NAME, q.ADDRESS, q.last_active_time, s.USERNAME, s.SCHEMANAME from v$sqlarea q, v$session s
where q.last_active_time > sysdate - 1
and q.sql_text like 'DELETE FROM casino.lgngameoperationlog WHERE sessionCode%'
and s.sql_address=q.address
order by last_active_time desc
no rows found
select q.SQL_TEXT, q.sql_id, q.PARSING_SCHEMA_NAME, q.ADDRESS, q.last_active_time from v$sqlarea q
where q.last_active_time > sysdate - 1
and q.sql_text like 'DELETE FROM casino.lgngameoperationlog WHERE sessionCode%'
order by last_active_time desc
'DELETE FROM casino.lgngameoperationlog WHERE sessionCode = :1 and sessionType = :2'; 51thfgbubkkg6; JAVA; 0000000392523658; 28.10.2010 18:09:14;
*/I have Java software that uses different database schemas/users to make connections to my database. And i want to know for one query which schema/user was used to connect to database before running the query.If the SQL-text sits inside your Java code, that is the text does not sit inside some stored pl/sql program unit, then you can use parsing_schema_id, yes.
If the SQL-text sits inside a stored procedure, then depending on how that procedure is defined (invoker rights or definer rights), you could use parsing_schema_id too (in the first case (invoker rights)). -
V$session and v$sqlarea
Hi All,
How can i join the v$session and v$sqlarea? I am trying to find out who has executed the sql statement or still executing the statement. I think without joining with v$session its not possible.
Is there a way to get this information?
And I am using Oracle 10g.
Edited by: Ratna Bikram on Sep 25, 2010 11:45 PMRatna Bikram wrote:
Hi All,
How can i join the v$session and v$sqlarea? I am trying to find out who has executed the sql statement or still executing the statement. I think without joining with v$session its not possible.
Is there a way to get this information?
And I am using Oracle 10g.
Edited by: Ratna Bikram on Sep 25, 2010 11:45 PMhttp://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm#REFRN30223
SQL_ADDRESS RAW(4 | 8) Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed
SQL_HASH_VALUE NUMBER Used with SQL_ADDRESS to identify the SQL statement that is currently being executed
SQL_ID VARCHAR2(13) SQL identifier of the SQL statement that is currently being executed
SQL_CHILD_NUMBER NUMBER Child number of the SQL statement that is currently being executedFrom V$SESSION will map into the column in V$SQLAREA. There they will lose the SQL_ prefix (so HASH_VALUE and ADDRESS), but SQL_ID stays the same. -
V$sqlarea and plan_hash_value
If I have a query with multiple child cursors, I can have more than 1 plan_hash_value for the same sql_id.
how does oracle decide which plan_hash_value to put into v$sqlarea which is a rollup to the sql_id level?Guess2 wrote:
If I have a query with multiple child cursors, I can have more than 1 plan_hash_value for the same sql_id.
how does oracle decide which plan_hash_value to put into v$sqlarea which is a rollup to the sql_id level?Let's try a bit of an experiment (in 11.2.0.2) to determine which child cursor's PLAN_HASH_VALUE appears in V$SQLAREA. First, we will create a test table with skewed data:
CREATE TABLE T1 AS
SELECT
ROWNUM C1,
DECODE(ROWNUM,1,1,0) C2,
LPAD('A',255,'A') C3
FROM
DUAL
CONNECT BY
LEVEL<=10000;
CREATE UNIQUE INDEX IND_T1_C1 ON T1(C1);
CREATE INDEX IND_T1_C2 ON T1(C2);
ALTER TABLE T1 MODIFY (C1 NOT NULL, C2 NOT NULL);
EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',CASCADE=>TRUE,ESTIMATE_PERCENT=>100,METHOD_OPT=>'FOR ALL INDEXED COLUMNS SIZE 254')The initial test:
SET LINESIZE 120
SET PAGESIZE 1000
VARIABLE V1 NUMBER
EXEC :V1:=1
SELECT /*+ BIND_AWARE */
C1,
C2,
C3
FROM
T1
WHERE
C2=:V1;
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'TYPICAL'));
SQL_ID 7p4yxrzwwuybt, child number 0
SELECT /*+ BIND_AWARE */ C1, C2, C3 FROM T1 WHERE C2=:V1
Plan hash value: 236868917
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 2 (100)| |
| 1 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 136 | 2 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IND_T1_C2 | 1 | | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("C2"=:V1)
SELECT
PLAN_HASH_VALUE
FROM
V$SQLAREA
WHERE
SQL_ID='7p4yxrzwwuybt';
PLAN_HASH_VALUE
236868917As shown above, the PLAN_HASH_VALUE was set to 236868917, which is the most recently executed child number.
Trying again with a different bind variable value:
EXEC :V1:=0
SELECT /*+ BIND_AWARE */
C1,
C2,
C3
FROM
T1
WHERE
C2=:V1;
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'TYPICAL'));
SQL_ID 7p4yxrzwwuybt, child number 1
SELECT /*+ BIND_AWARE */ C1, C2, C3 FROM T1 WHERE C2=:V1
Plan hash value: 3617692013
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 33 (100)| |
|* 1 | TABLE ACCESS FULL| T1 | 9999 | 1327K| 33 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("C2"=:V1)
SELECT
PLAN_HASH_VALUE
FROM
V$SQLAREA
WHERE
SQL_ID='7p4yxrzwwuybt';
PLAN_HASH_VALUE
3617692013As shown above, the PLAN_HASH_VALUE changed to the value 3617692013, which is the most recently executed child number.
TRying again without changing the bind variable value:
SELECT /*+ BIND_AWARE */
C1,
C2,
C3
FROM
T1
WHERE
C2=:V1;
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'TYPICAL'));
SQL_ID 7p4yxrzwwuybt, child number 1
SELECT /*+ BIND_AWARE */ C1, C2, C3 FROM T1 WHERE C2=:V1
Plan hash value: 3617692013
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 33 (100)| |
|* 1 | TABLE ACCESS FULL| T1 | 9999 | 1327K| 33 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("C2"=:V1)
SELECT
PLAN_HASH_VALUE
FROM
V$SQLAREA
WHERE
SQL_ID='7p4yxrzwwuybt';
PLAN_HASH_VALUE
3617692013As shown above, the PLAN_HASH_VALUE remained at the value 3617692013, which is the most recently executed child number.
Switching back to the original bind variable value:
EXEC :V1:=1
SELECT /*+ BIND_AWARE */
C1,
C2,
C3
FROM
T1
WHERE
C2=:V1;
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'TYPICAL'));
SQL_ID 7p4yxrzwwuybt, child number 0
SELECT /*+ BIND_AWARE */ C1, C2, C3 FROM T1 WHERE C2=:V1
Plan hash value: 236868917
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 2 (100)| |
| 1 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 136 | 2 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IND_T1_C2 | 1 | | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("C2"=:V1)
SELECT
PLAN_HASH_VALUE
FROM
V$SQLAREA
WHERE
SQL_ID='7p4yxrzwwuybt';
PLAN_HASH_VALUE
236868917 As shown above, the PLAN_HASH_VALUE switched back to the original value.
In 11.2.0.2, V$SQLAREA is based on GV$SQLAREA, which is based on the X$KGLCURSOR_CHILD_SQLID structure. You can execute the following SQL statement to show the columns that are retrieved and the corresponding names of those columns in GV$SQLAREA:
SELECT
VIEW_DEFINITION
FROM
V$FIXED_VIEW_DEFINITION
WHERE
VIEW_NAME='GV$SQLAREA';
DESC GV$SQLAREAWe are able to confirm that the most recently executed child cursor number will appear in V$SQLAREA with the following SQL statement (I suggest not running this on a very busy database instance):
SET LINESIZE 120
SET PAGESIZE 1000
SELECT
X.KGLOBT03 SQL_ID,
X.KGLOBT30 PLAN_HASH_VALUE,
TO_CHAR(X.KGLOBCLA,'HH24:MI:SS') LAST_ACTIVE_TIME,
S.CHILD_NUMBER,
S.PLAN_HASH_VALUE S_PLAN_HASH_VALUE,
TO_CHAR(S.LAST_ACTIVE_TIME,'HH24:MI:SS') S_LAST_ACTIVE_TIME,
DECODE(X.KGLOBCLA,S.LAST_ACTIVE_TIME,NULL,'DIFFERENT') TIMESTAMP
FROM
X$KGLCURSOR_CHILD_SQLID X,
V$SQL S
WHERE
X.KGLOBT02 != 0
AND X.KGLOBT03=S.SQL_ID
ORDER BY
S.SQL_ID,
S.CHILD_NUMBER;
SQL_ID PLAN_HASH_VALUE LAST_ACT CHILD_NUMBER S_PLAN_HASH_VALUE S_LAST_A TIMESTAMP
fz2htd7p723p5 3775029212 13:01:24 0 3775029212 13:01:24
fzrshwabvtwc0 3637245398 13:21:28 0 3637245398 13:21:28
fzt8s1f6kmk5k 0 12:58:30 0 0 12:58:30
g00cj285jmgsw 315182377 13:06:24 0 315182377 12:58:30 DIFFERENT
g00cj285jmgsw 315182377 13:06:24 1 315182377 13:06:24
g3wrkmxkxzhf2 749386351 13:21:24 0 749386351 13:21:24
g3wrkmxkxzhf2 749386351 13:21:24 1 749386351 12:51:27 DIFFERENT
ga9j9xk5cy9s0 1697022209 13:01:24 0 1697022209 13:01:24
ga9j9xk5cy9s0 1697022209 13:01:24 1 1697022209 12:51:27 DIFFERENT
grwydz59pu6mc 3684871272 13:21:24 0 3684871272 13:21:24
grwydz59pu6mc 3684871272 13:21:24 1 3684871272 12:51:27 DIFFERENT
gx4mv66pvj3xz 2570921597 13:21:24 0 1932954096 12:51:27 DIFFERENT
gx4mv66pvj3xz 2570921597 13:21:24 1 2570921597 13:21:24
gzyt498gtbgt5 2826905927 12:51:23 0 2826905927 12:51:23As shown above, the child with the most recent LAST_ACTIVE_TIME timestamp appears in V$SQLAREA.
Charles Hooper
http://hoopercharles.wordpress.com/
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
I have a quick question regarding V$SQLAREA.
Oracle's Reference doc says followings about it:
DISK_READS NUMBER: Sum of the number of disk reads over all child cursors
BUFFER_GETS NUMBER: Sum of buffer gets over all child cursors
So, in order to find out real bytes read, we need to multiply DISK_READS NUMBER with DB_BLOCK_SIZE, don't we?
BYTES_READ_FROM_DISK == DISK_READS NUMBER x DB_BLOCK_SIZE
Same for BUFFER_GETS NUMBER, isn't it?
BYTES_READ_FROM_BUFFER == BUFFER_GETS NUMBER x DB_BLOCK_SIZE
Thank you for helpThank you but many of our DBs are 10g, not 11g
Unlike 11g, 10g doesn't have PHYSICAL_READ_BYTES column in V$SQLAREA
So, are these correct?
{Bytes_read_from_disk} == DISK_READS NUMBER x DB_BLOCK_SIZE
{Bytes_read_from_buffer} == BUFFER_GETS NUMBER x DB_BLOCK_SIZE
Thank you for help -
After reload of SQL in SQL Shared Pool, V$SQLAREA will show
loads > 1.
Will v$sqlarea also show cumlative statistics for other columns
(e.g. sorts, buffer gets) for execution prior to the 2nd or
later loads?After reload of SQL in SQL Shared Pool, V$SQLAREA will show
loads > 1.
Will v$sqlarea also show cumlative statistics for other columns
(e.g. sorts, buffer gets) for execution prior to the 2nd or
later loads? -
Need to set module name same as username in V$sqlarea
Hi Gurus,
I tried to set module name same as schema name in v$sqlarea, generally it was sql*plus. For that i created one after database logon trigger, but it didn't work for all users, it is only working for SYS schema only.
CREATE OR REPLACE TRIGGER LOGIN_USERS_TRIG_NEW
AFTER LOGON ON DATABASE
declare
v_dbuser varchar2(32) ;
begin
select sys_context('USERENV','SESSION_USER') into v_dbuser from dual;
dbms_application_info.set_module(v_dbuser);
end;
result will verify from
select module , parsing_schema_name from v$sqlarea;
so if i am logging with scott user then in v$sqlarea table module name should be scott only. so whatever queries was executed from scott all queries module name should scott only.
Like that for all users. Please suggest is there any other option.
If i execute the same plsql code in scott session , it is working, but when i set with logon trigger it didn't set.
see if i execute:
SQL> exec DBMS_APPLICATION_INFO.set_module(USER, 'Initialized');
PL/SQL procedure successfully completed.
SQL> SELECT sys_context('USERENV', 'MODULE') FROM DUAL;
SYS_CONTEXT('USERENV','MODULE')
SCOTT
but the same with trigger it didn't set. Any idea.
Thanks in advance,hi i take a trace of the session. in that trace statement is showing.
-bash-3.00$ cat orcl_ora_4407.trc
Trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_4407.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: localhost.localdomain
Release: 2.6.9-42.0.0.0.1.ELsmp
Version: #1 SMP Sun Oct 15 14:02:40 PDT 2006
Machine: i686
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 20
Unix process pid: 4407, image: [email protected] (TNS V1-V3)
*** 2011-10-04 23:07:35.726
*** SESSION ID:(43.19) 2011-10-04 23:07:35.726
*** CLIENT ID:() 2011-10-04 23:07:35.726
*** SERVICE NAME:(SYS$USERS) 2011-10-04 23:07:35.726
*** MODULE NAME:(SYS) 2011-10-04 23:07:35.726
*** ACTION NAME:() 2011-10-04 23:07:35.726
CLOSE #1:c=0,e=93,dep=1,type=1,tim=1317749855723627
=====================
PARSING IN CURSOR #2 len=47 dep=1 uid=0 oct=3 lid=0 tim=1317749855729023 hv=2145557917 ad='47aca488' sqlid='049t4sdzy57cx'
select dummy from dual where USER = 'SCOTT'
END OF STMT
PARSE #2:c=1000,e=969,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3752461848,tim=1317749855729018
EXEC #2:c=1000,e=1434,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3752461848,tim=1317749855732048
FETCH #2:c=0,e=15,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3752461848,tim=1317749855732153
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=0 op='FILTER (cr=0 pr=0 pw=0 time=0 us)'
STAT #2 id=2 cnt=0 pid=1 pos=1 obj=116 op='TABLE ACCESS FULL DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=2 card=1)'
CLOSE #2:c=0,e=11,dep=1,type=1,tim=1317749855734625
=====================
PARSING IN CURSOR #1 len=47 dep=1 uid=84 oct=3 lid=84 tim=1317749855737092 hv=2145557917 ad='47aca488' sqlid='049t4sdzy57cx'
select dummy from dual where USER = 'SCOTT'
END OF STMT
PARSE #1:c=1999,e=1933,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=3752461848,tim=1317749855737087
EXEC #1:c=0,e=51,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=3752461848,tim=1317749855737654
FETCH #1:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=3752461848,tim=1317749855738075
STAT #1 id=1 cnt=0 pid=0 pos=1 obj=0 op='FILTER (cr=0 pr=0 pw=0 time=0 us)'
STAT #1 id=2 cnt=0 pid=1 pos=1 obj=116 op='TABLE ACCESS FULL DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=2 card=1)'
CLOSE #1:c=0,e=7,dep=1,type=1,tim=1317749855738544
XCTEND rlbk=0, rd_only=1, tim=1317749855744024
XCTEND rlbk=0, rd_only=1, tim=1317749855745025
*** 2011-10-04 23:07:40.799
=====================
PARSING IN CURSOR #2 len=406 dep=0 uid=0 oct=47 lid=0 tim=1317749860799353 hv=4178600252 ad='478e46c0' sqlid='8z5gn0mwj0s9w'
declare
v_dbuser varchar2(32) ;
var_sid NUMBER;
var_serial NUMBER;
begin
select sys_context('USERENV','SESSION_USER') into v_dbuser from dual;
SELECT SID, serial#
INTO var_sid, var_serial
FROM v$session
WHERE SYS_CONTEXT ('USERENV', 'SESSIONID') = audsid;
sys.dbms_application_info.set_module(v_dbuser, null);
SYS.DBMS_SYSTEM.set_sql_trace_in_session (var_sid, var_serial, TRUE);
end;
END OF STMT
PARSE #2:c=76988,e=109996,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1317749860799344
=====================
PARSING IN CURSOR #1 len=54 dep=1 uid=0 oct=3 lid=0 tim=1317749860821371 hv=552310686 ad='4793b5d0' sqlid='2yzdahhhfr5wy'
SELECT SYS_CONTEXT('USERENV','SESSION_USER') FROM DUAL
END OF STMT
PARSE #1:c=19997,e=19894,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,plh=1388734953,tim=1317749860821362
EXEC #1:c=0,e=39,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=1388734953,tim=1317749860822306
FETCH #1:c=0,e=58,p=0,cr=0,cu=0,mis=0,r=1,dep=1,og=1,plh=1388734953,tim=1317749860822419
STAT #1 id=1 cnt=1 pid=0 pos=1 obj=0 op='FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)'
CLOSE #1:c=1000,e=687,dep=1,type=3,tim=1317749860823263
=====================
PARSING IN CURSOR #1 len=86 dep=1 uid=0 oct=3 lid=0 tim=1317749860845379 hv=3278699504 ad='4793b444' sqlid='dv6dxh31qtyzh'
SELECT SID, SERIAL# FROM V$SESSION WHERE SYS_CONTEXT ('USERENV', 'SESSIONID') = AUDSID
END OF STMT
PARSE #1:c=21996,e=22022,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,plh=644658511,tim=1317749860845371
EXEC #1:c=0,e=76,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=644658511,tim=1317749860846365
FETCH #1:c=1000,e=1085,p=0,cr=0,cu=0,mis=0,r=1,dep=1,og=1,plh=644658511,tim=1317749860847543
STAT #1 id=1 cnt=1 pid=0 pos=1 obj=0 op='NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=0 size=117 card=1)'
STAT #1 id=2 cnt=1 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=0 size=104 card=1)'
STAT #1 id=3 cnt=1 pid=2 pos=1 obj=0 op='FIXED TABLE FULL X$KSUSE (cr=0 pr=0 pw=0 time=0 us cost=0 size=78 card=1)'
STAT #1 id=4 cnt=1 pid=2 pos=2 obj=0 op='FIXED TABLE FIXED INDEX X$KSLWT (ind:1) (cr=0 pr=0 pw=0 time=0 us cost=0 size=26 card=1)'
STAT #1 id=5 cnt=1 pid=1 pos=2 obj=0 op='FIXED TABLE FIXED INDEX X$KSLED (ind:2) (cr=0 pr=0 pw=0 time=0 us cost=0 size=13 card=1)'
CLOSE #1:c=0,e=8,dep=1,type=3,tim=1317749860848409
EXEC #2:c=46992,e=47145,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=1317749860848519
*** 2011-10-04 23:07:48.446
CLOSE #2:c=0,e=44,dep=0,type=0,tim=1317749868446462
=====================
PARSING IN CURSOR #1 len=36 dep=0 uid=0 oct=47 lid=0 tim=1317749868452507 hv=4128301241 ad='43cc3bbc' sqlid='5t10uu7v11s5t'
BEGIN DBMS_OUTPUT.ENABLE(NULL); END;
END OF STMT
PARSE #1:c=5999,e=5409,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1317749868452500
EXEC #1:c=1000,e=1082,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=1317749868454166
CLOSE #1:c=0,e=27,dep=0,type=0,tim=1317749868456571
=====================
PARSING IN CURSOR #2 len=48 dep=1 uid=0 oct=3 lid=0 tim=1317749868460092 hv=2334772408 ad='4c94ceb4' sqlid='cjk1ffy5kmm5s'
select obj# from oid$ where user#=:1 and oid$=:2
END OF STMT
PARSE #2:c=1000,e=1645,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1964104430,tim=1317749868460085
EXEC #2:c=1000,e=531,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1964104430,tim=1317749868461643
FETCH #2:c=1999,e=1461,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=1964104430,tim=1317749868463587
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=500 op='TABLE ACCESS BY INDEX ROWID OID$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=24 card=1)'
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=501 op='INDEX UNIQUE SCAN I_OID1 (cr=2 pr=0 pw=0 time=0 us cost=1 size=0 card=1)'
CLOSE #2:c=0,e=7,dep=1,type=3,tim=1317749868464199
=====================
PARSING IN CURSOR #1 len=54 dep=1 uid=0 oct=3 lid=0 tim=1317749868465603 hv=2201826955 ad='4c97e470' sqlid='0m78skf1mudnb'
select audit$,properties from type_misc$ where obj#=:1
END OF STMT
PARSE #1:c=1000,e=422,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3506511888,tim=1317749868465597
EXEC #1:c=0,e=39,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3506511888,tim=1317749868466196
FETCH #1:c=0,e=726,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=3506511888,tim=1317749868467149
STAT #1 id=1 cnt=1 pid=0 pos=1 obj=502 op='TABLE ACCESS CLUSTER TYPE_MISC$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=46 card=1)'
STAT #1 id=2 cnt=1 pid=1 pos=1 obj=3 op='INDEX UNIQUE SCAN I_OBJ# (cr=2 pr=0 pw=0 time=0 us cost=1 size=0 card=1)'
CLOSE #1:c=0,e=144,dep=1,type=1,tim=1317749868467616
=====================
PARSING IN CURSOR #2 len=185 dep=1 uid=0 oct=3 lid=0 tim=1317749868469076 hv=1850944673 ad='4c9d8f00' sqlid='3ktacv9r56b51'
select owner#,name,namespace,remoteowner,linkname,p_timestamp,p_obj#, nvl(property,0),subname,type#,d_attrs from dependency$ d, obj$ o where d_obj#=:1 and p_obj#=obj#(+) order by order#
END OF STMT
PARSE #2:c=1000,e=478,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=4184428695,tim=1317749868468625
EXEC #2:c=999,e=923,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=4184428695,tim=1317749868470434
FETCH #2:c=3000,e=2985,p=0,cr=7,cu=0,mis=0,r=1,dep=1,og=4,plh=4184428695,tim=1317749868473470
FETCH #2:c=0,e=571,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=4184428695,tim=1317749868474130
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=0 op='SORT ORDER BY (cr=7 pr=0 pw=0 time=0 us cost=11 size=327 card=3)'
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=0 op='NESTED LOOPS OUTER (cr=7 pr=0 pw=0 time=0 us cost=10 size=327 card=3)'
STAT #2 id=3 cnt=1 pid=2 pos=1 obj=104 op='TABLE ACCESS BY INDEX ROWID DEPENDENCY$ (cr=4 pr=0 pw=0 time=0 us cost=4 size=81 card=3)'
STAT #2 id=4 cnt=1 pid=3 pos=1 obj=106 op='INDEX RANGE SCAN I_DEPENDENCY1 (cr=3 pr=0 pw=0 time=0 us cost=3 size=0 card=3)'
STAT #2 id=5 cnt=1 pid=2 pos=2 obj=18 op='TABLE ACCESS BY INDEX ROWID OBJ$ (cr=3 pr=0 pw=0 time=0 us cost=2 size=82 card=1)'
STAT #2 id=6 cnt=1 pid=5 pos=1 obj=36 op='INDEX RANGE SCAN I_OBJ1 (cr=2 pr=0 pw=0 time=0 us cost=1 size=0 card=1)'
CLOSE #2:c=0,e=10,dep=1,type=1,tim=1317749868474627
=====================
PARSING IN CURSOR #2 len=56 dep=1 uid=0 oct=3 lid=0 tim=1317749868475584 hv=3993603298 ad='4c9d8298' sqlid='8swypbbr0m372'
select order#,columns,types from access$ where d_obj#=:1
END OF STMT
PARSE #2:c=1000,e=926,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=893970548,tim=1317749868475577
EXEC #2:c=0,e=50,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=893970548,tim=1317749868476239
FETCH #2:c=0,e=132,p=0,cr=2,cu=0,mis=0,r=0,dep=1,og=4,plh=893970548,tim=1317749868476597
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=105 op='TABLE ACCESS BY INDEX ROWID ACCESS$ (cr=2 pr=0 pw=0 time=0 us cost=3 size=161 card=7)'
STAT #2 id=2 cnt=0 pid=1 pos=1 obj=108 op='INDEX RANGE SCAN I_ACCESS1 (cr=2 pr=0 pw=0 time=0 us cost=2 size=0 card=7)'
CLOSE #2:c=0,e=12,dep=1,type=1,tim=1317749868477440
=====================
PARSING IN CURSOR #2 len=47 dep=1 uid=0 oct=3 lid=0 tim=1317749868481084 hv=1023521005 ad='4ca12498' sqlid='cb21bacyh3c7d'
select metadata from kopm$ where name='DB_FDO'
END OF STMT
PARSE #2:c=1000,e=830,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3452538079,tim=1317749868481079
EXEC #2:c=0,e=54,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3452538079,tim=1317749868481617
FETCH #2:c=1000,e=385,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,plh=3452538079,tim=1317749868482481
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=552 op='TABLE ACCESS BY INDEX ROWID KOPM$ (cr=2 pr=0 pw=0 time=0 us cost=1 size=108 card=1)'
STAT #2 id=2 cnt=1 pid=1 pos=1 obj=553 op='INDEX UNIQUE SCAN I_KOPM1 (cr=1 pr=0 pw=0 time=0 us cost=0 size=0 card=1)'
CLOSE #2:c=0,e=11,dep=1,type=1,tim=1317749868482607
=====================
PARSING IN CURSOR #5 len=406 dep=0 uid=0 oct=47 lid=0 tim=1317749868920033 hv=4178600252 ad='478e46c0' sqlid='8z5gn0mwj0s9w'
declare
v_dbuser varchar2(32) ;
var_sid NUMBER;
var_serial NUMBER;
begin
select sys_context('USERENV','SESSION_USER') into v_dbuser from dual;
SELECT SID, serial#
INTO var_sid, var_serial
FROM v$session
WHERE SYS_CONTEXT ('USERENV', 'SESSIONID') = audsid;
sys.dbms_application_info.set_module(v_dbuser, null);
SYS.DBMS_SYSTEM.set_sql_trace_in_session (var_sid, var_serial, TRUE);
end;
END OF STMT
PARSE #5:c=3000,e=2993,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=0,tim=1317749868920026
=====================
PARSING IN CURSOR #6 len=54 dep=1 uid=0 oct=3 lid=0 tim=1317749868921319 hv=552310686 ad='4793b5d0' sqlid='2yzdahhhfr5wy'
SELECT SYS_CONTEXT('USERENV','SESSION_USER') FROM DUAL
END OF STMT
PARSE #6:c=1000,e=234,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=1388734953,tim=1317749868921314
EXEC #6:c=0,e=33,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=1388734953,tim=1317749868921426
FETCH #6:c=0,e=37,p=0,cr=0,cu=0,mis=0,r=1,dep=1,og=1,plh=1388734953,tim=1317749868921496
STAT #6 id=1 cnt=1 pid=0 pos=1 obj=0 op='FAST DUAL (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)'
CLOSE #6:c=0,e=8,dep=1,type=3,tim=1317749868922312
=====================
PARSING IN CURSOR #6 len=86 dep=1 uid=0 oct=3 lid=0 tim=1317749868922414 hv=3278699504 ad='4793b444' sqlid='dv6dxh31qtyzh'
SELECT SID, SERIAL# FROM V$SESSION WHERE SYS_CONTEXT ('USERENV', 'SESSIONID') = AUDSID
END OF STMT
PARSE #6:c=0,e=38,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=644658511,tim=1317749868922408
EXEC #6:c=0,e=523,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=644658511,tim=1317749868923008
FETCH #6:c=1000,e=1034,p=0,cr=0,cu=0,mis=0,r=1,dep=1,og=1,plh=644658511,tim=1317749868924071
STAT #6 id=1 cnt=1 pid=0 pos=1 obj=0 op='NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=0 size=117 card=1)'
STAT #6 id=2 cnt=1 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us cost=0 size=104 card=1)'
STAT #6 id=3 cnt=1 pid=2 pos=1 obj=0 op='FIXED TABLE FULL X$KSUSE (cr=0 pr=0 pw=0 time=0 us cost=0 size=78 card=1)'
STAT #6 id=4 cnt=1 pid=2 pos=2 obj=0 op='FIXED TABLE FIXED INDEX X$KSLWT (ind:1) (cr=0 pr=0 pw=0 time=0 us cost=0 size=26 card=1)'
STAT #6 id=5 cnt=1 pid=1 pos=2 obj=0 op='FIXED TABLE FIXED INDEX X$KSLED (ind:2) (cr=0 pr=0 pw=0 time=0 us cost=0 size=13 card=1)'
CLOSE #6:c=0,e=7,dep=1,type=3,tim=1317749868925014
EXEC #5:c=5000,e=4799,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=1317749868925309
=====================
PARSING IN CURSOR #6 len=52 dep=0 uid=0 oct=47 lid=0 tim=1317749868931018 hv=1029988163 ad='47885f94' sqlid='9babjv8yq8ru3'
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
END OF STMT
PARSE #6:c=2000,e=1998,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1317749868931012
=====================
PARSING IN CURSOR #7 len=132 dep=1 uid=0 oct=3 lid=0 tim=1317749868933509 hv=2328831744 ad='4c975250' sqlid='ga9j9xk5cy9s0'
select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece from idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by piece#
END OF STMT
PARSE #7:c=0,e=199,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1697022209,tim=1317749868933503
EXEC #7:c=0,e=121,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1697022209,tim=1317749868934465
FETCH #7:c=1000,e=975,p=0,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=1697022209,tim=1317749868935481
FETCH #7:c=0,e=28,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=1697022209,tim=1317749868936446
FETCH #7:c=0,e=37,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,plh=1697022209,tim=1317749868937047
STAT #7 id=1 cnt=2 pid=0 pos=1 obj=227 op='TABLE ACCESS BY INDEX ROWID IDL_SB4$ (cr=6 pr=0 pw=0 time=0 us cost=3 size=18 card=1)'
STAT #7 id=2 cnt=2 pid=1 pos=1 obj=238 op='INDEX RANGE SCAN I_IDL_SB41 (cr=4 pr=0 pw=0 time=9 us cost=2 size=0 card=1)'
CLOSE #7:c=0,e=14,dep=1,type=1,tim=1317749868937451
=====================
PARSING IN CURSOR #7 len=132 dep=1 uid=0 oct=3 lid=0 tim=1317749868938386 hv=4260389146 ad='4c9747c4' sqlid='cvn54b7yz0s8u'
select /*+ index(idl_ub1$ i_idl_ub11) +*/ piece#,length,piece from idl_ub1$ where obj#=:1 and part=:2 and version=:3 order by piece#
END OF STMT
PARSE #7:c=1000,e=902,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3246118364,tim=1317749868938380
EXEC #7:c=0,e=537,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=3246118364,tim=1317749868939041
FETCH #7:c=1000,e=365,p=0,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=3246118364,tim=1317749868939444
FETCH #7:c=0,e=19,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,plh=3246118364,tim=1317749868939513
STAT #7 id=1 cnt=1 pid=0 pos=1 obj=224 op='TABLE ACCESS BY INDEX ROWID IDL_UB1$ (cr=4 pr=0 pw=0 time=0 us cost=3 size=44 card=2)'
STAT #7 id=2 cnt=1 pid=1 pos=1 obj=235 op='INDEX RANGE SCAN I_IDL_UB11 (cr=3 pr=0 pw=0 time=0 us cost=2 size=0 card=2)'
CLOSE #7:c=0,e=10,dep=1,type=1,tim=1317749868940075
=====================
PARSING IN CURSOR #7 len=135 dep=1 uid=0 oct=3 lid=0 tim=1317749868940494 hv=1115215392 ad='4c973d38' sqlid='c6awqs517jpj0'
select /*+ index(idl_char$ i_idl_char1) +*/ piece#,length,piece from idl_char$ where obj#=:1 and part=:2 and version=:3 order by piece#
END OF STMT
PARSE #7:c=999,e=390,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1319326155,tim=1317749868940488
EXEC #7:c=1000,e=269,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1319326155,tim=1317749868941383
FETCH #7:c=0,e=592,p=0,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=1319326155,tim=1317749868942015
FETCH #7:c=0,e=20,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=4,plh=1319326155,tim=1317749868942341
STAT #7 id=1 cnt=1 pid=0 pos=1 obj=225 op='TABLE ACCESS BY INDEX ROWID IDL_CHAR$ (cr=4 pr=0 pw=0 time=0 us cost=3 size=20 card=1)'
STAT #7 id=2 cnt=1 pid=1 pos=1 obj=236 op='INDEX RANGE SCAN I_IDL_CHAR1 (cr=3 pr=0 pw=0 time=0 us cost=2 size=0 card=1)'
CLOSE #7:c=0,e=10,dep=1,type=1,tim=1317749868942446
=====================
PARSING IN CURSOR #7 len=132 dep=1 uid=0 oct=3 lid=0 tim=1317749868943358 hv=1684122946 ad='4c9732ac' sqlid='39m4sx9k63ba2'
select /*+ index(idl_ub2$ i_idl_ub21) +*/ piece#,length,piece from idl_ub2$ where obj#=:1 and part=:2 and version=:3 order by piece#
END OF STMT
PARSE #7:c=1000,e=883,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=2317816222,tim=1317749868943351
EXEC #7:c=0,e=549,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=2317816222,tim=1317749868944005
FETCH #7:c=2000,e=1322,p=1,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=2317816222,tim=1317749868945367
FETCH #7:c=0,e=28,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=2317816222,tim=1317749868945473
STAT #7 id=1 cnt=2 pid=0 pos=1 obj=226 op='TABLE ACCESS BY INDEX ROWID IDL_UB2$ (cr=5 pr=1 pw=0 time=0 us cost=3 size=40 card=2)'
STAT #7 id=2 cnt=2 pid=1 pos=1 obj=237 op='INDEX RANGE SCAN I_IDL_UB21 (cr=3 pr=0 pw=0 time=9 us cost=2 size=0 card=2)'
CLOSE #7:c=0,e=540,dep=1,type=1,tim=1317749868946060
EXEC #6:c=22996,e=23633,p=1,cr=49,cu=0,mis=1,r=1,dep=0,og=1,plh=0,tim=1317749868955046
Maybe you are looking for
-
Hi, I am sending quantity field to excel with three decimal places but when I open the excel after generating it shows only two decimal places.How can i obtain this function with excel it should show only 3 decimal places with thousand seperator.
-
Oracle 11i forms crash when run on Windows 7 using IE 8 or IE 9
I am trying to run oracle apps form on my windows 7 pc using ie 8 or ie 9. But the browser crashes whenever I try to open the form. I am using Oracle EBS version 11.5 and Jinitiator version 1.3.1.18. I tried replacing the jvm.dll file in Jinitiator w
-
Need Help in improving logic for determining the range
Hi guys, I need some help in my program logic to determine the range of value. My purpose of this program is to find which combinations have the lowest amplitude. In the attachment is a set of number. e.g 10 0 is a combination. Each combination, I
-
Exception is thrown after substituting Oracle standard VO
Hi All , I wanted to change the query for the particular view object in an OAF page of Oracle application . So I downloaded that VO from $JAVA_TOP directory . And created a new customized VO and a substitution . Then I migrated the VO xml file, java
-
How do you obtain albumart?
I have a not-so-small music collection (~60gb) and most of the albums miss album art. Does anybody know a better method instead of go to amazon, search album, download image, copy to the right folder, rename...? There is the app 'albumart' in AUR but