Lock & latch
Hello,
could any one has good stuff to monitor and diagnose lock and latch contention in database
dbcontrol comes free with the database
http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/emca.htm
HTH
Srini
Similar Messages
-
hello there. i have a broken latch mechanism. the top hooks work fine, however the bottom part of the latch mechanism is not working. looking down at the 2 slots everything seems to be fine. im not sure if it is magnet or not. i was told that i need a whole new bottom case?? which is gonna run me $200 or so. will this do the trick?
http://cgi.ebay.ca/Apple-Macbook-Pro-A1260-2-4Ghz-Bottom-cases-Lock-latchW0QQitemZ260338597876QQcmdZViewItemQQptZLH_DefaultDomain_0?trksid=p3286.m20.l1116Since yesterday, I did a little more investigating, and found a link that could shed some light on this issue, as several people posted what sounded like some good suggestions:
http://www.youtube.com/watch?v=suAPc7jp1I8
After carefully looking at my own latch, I think I may see what the problem could be, and you might be able to fix it yourself.
There are two tiny hooks on the display part of the latch, held in place by tiny springs. There are two cavities on the bottom part of the latch that have a magnet on the bottom and two silver latches which you can see through the slots. The silver catches are to the inside of the slots, and you can just see about 3/32" of them. There is a bevel to the outside, and if you push in the button, you can see these latches move back.
When you close the lid, the magnet at the bottom of the bottom latch pulls the hooks from the display part of the latch down. The hooks slide over the bevel in the bottom latch and catch.
You should be able to see the silver latches all the way across the slot. If you just see part of them, then the thin hooks may not be able to engage them properly.
There are a couple of possibilities, both addressed in the comments on the U-Tube video. One is that the mechanism has gotten gummed up and the lower latches aren't moving freely and returning to where they need to be. The other is that the latch assembly has gotten pushed in and is caught on the sheet metal, so that the latches do not fully fill the slots. The suggestion is that you might be able to make a tool from a paperclip and reach through the slots to maneuver the assembly back into position. A dental tool might also work.
I've never been inside one of these latches, but just looking at it from the outside, this is how I think it works and maybe could be fixed.
If you don't see the silver latches at all or the magnet is missing, then the latch is likely broken and would need to be replaced. I would think the one you linked would work (the cable is for the sleep light).
Good luck! -
Difference between latch and lock
Dear all
what is the different between latchs and locks? please show real example
thanks
JohnPlease have a read of this thread,
LATCHES ,LOCKS AND WAITS
Difference between a latch and a lock
latches and locks - an example?
HTH
Aman.... -
Here are my questions on Locking.:
1)
How do I use v$lock to figure out lock details ? Details like
whos has locked,on which table,who else is waiting, and what type
of locking (shared or exlusive ?), since when it is locked.
2)
Why and when exclusive/shared locks are used ? Could you give me
example please ?
3)
Could you tell me significance of v$mystat and v$locked_object ?
4)
Do we have page level locking in Oracle ?
Thanks in advance,
DNDetails about locks : All locks acquired by statements within a transaction are held for the duration of the transaction.
Oracle releases all locks acquired by the statements within a transaction when an explict or implied commit or roll back is executed. Oracle also releases locks acquired after a savepoint when rolling back to the savepoint.
Note: Only transactions not waiting for the previously locked resources can acquire locks on now available resources. Waiting transactions continue to wait until after the original transaction commits or completely rolls back.
1. How do I use v$lock to figure out lock details? Details like
whos has locked,on which table,who else is waiting, and what type
of locking (shared or exlusive ?), since when it is locked.
Better way is to use Oracle OEM. The TYPE column in v$lock shows the type of wait events and we also have the LMODE column (lock mode) and REQUEST columns.
Here is a comprehensive v$lock query by Deepak Baranwal, listing the lock types:
set echo off
col sid form 9999
col id1 form 9999999999
col id2 form 999999999
col lmode head "Lock Held" form a14
col request1 head "Lock Request" form a16
col type head "Lock Type" form a15
col ctime head "Time|Held" form 999999
col block head "No Of |Sessions|Waiting|For This|Lock" form 99999
select sid,
DECODE(TYPE,
'BL','Buffer hash table',
'CF','Control File Transaction',
'CI','Cross Instance Call',
'CS','Control File Schema',
'CU','Bind Enqueue',
'DF','Data File',
'DL','Direct-loader index-creation',
'DM','Mount/startup db primary/secondary instance',
'DR','Distributed Recovery Process',
'DX','Distributed Transaction Entry',
'FI','SGA Open-File Information',
'FS','File Set',
'IN','Instance Number',
'IR','Instance Recovery Serialization',
'IS','Instance State',
'IV','Library Cache InValidation',
'JQ','Job Queue',
'KK','Redo Log "Kick"',
'LS','Log Start/Log Switch',
'MB','Master Buffer hash table',
'MM','Mount Definition',
'MR','Media Recovery',
'PF','Password File',
'PI','Parallel Slaves',
'PR','Process Startup',
'PS','Parallel Slaves Synchronization',
'RE','USE_ROW_ENQUEUE Enforcement',
'RT','Redo Thread',
'RW','Row Wait',
'SC','System Commit Number',
'SH','System Commit Number HWM',
'SM','SMON',
'SQ','Sequence Number',
'SR','Synchronized Replication',
'SS','Sort Segment',
'ST','Space Transaction',
'SV','Sequence Number Value',
'TA','Transaction Recovery',
'TD','DDL enqueue',
'TE','Extend-segment enqueue',
'TM','DML enqueue',
'TS','Temporary Segment',
'TT','Temporary Table',
'TX','Transaction',
'UL','User-defined Lock',
'UN','User Name',
'US','Undo Segment Serialization',
'WL','Being-written redo log instance',
'WS','Write-atomic-log-switch global enqueue',
'XA','Instance Attribute',
'XI','Instance Registration',
decode(substr(TYPE,1,1),
'L','Library Cache ('||substr(TYPE,2,1)||')',
'N','Library Cache Pin ('||substr(TYPE,2,1)||')',
'Q','Row Cache ('||substr(TYPE,2,1)||')',
'????')) TYPE,
id1,id2,
decode(lmode,
0,'None(0)',
1,'Null(1)',
2,'Row Share(2)',
3,'Row Exclu(3)',
4,'Share(4)',
5,'Share Row Ex(5)',
6,'Exclusive(6)') lmode,
decode(request,
0,'None(0)',
1,'Null(1)',
2,'Row Share(2)',
3,'Row Exclu(3)',
4,'Share(4)',
5,'Share Row Ex(5)',
6,'Exclusive(6)') request1,
ctime, block
from
v$lock
where sid>5
and type not in ('MR','RT')
order by decode(request,0,0,2),block,5
2 .Why and when exclusive/shared locks are used ? Could you give me
example please ?
Exclusive Lock Mode : Prevents the associates resource from being shared. This lock mode is obtained to modify data. The first transaction to lock a resource exclusively is the only transaction that can alter the resource until the exclusive lock is released.
Share Lock Mode : Allows the associated resource to be shared, depending on the operations involved. Multiple users reading data can share the data, holding share locks to prevent concurrent access by a writer (who needs an exclusive lock). Several transactions can acquire share locks on the same resource.
Oracle Lock Types
DML locks (data locks)
DDL locks (dictionary locks)
Oracle Internal Locks/Latches
Oracle Distributed Locks
Oracle Parallell Cache Management Locks
3. Could you tell me significance of v$mystat and v$locked_object ?
v$locked_object show the information about Who is locking and what object they locking. This view is similar to v$mystat except that it shows cumulated statistics for all sessions.
4. Do we have page level locking in Oracle ? No
Sachin -
Locking and blocking - puzzlement.
I have a table - relatively simple
CREATE TABLE Sysstat
M_Time DATE,
Usr_pct NUMBER(10, 0),
Sys_pct NUMBER(10, 0),
<a few more NUMBER(10, 0) deleted...
CONSTRAINT Sysstat_PK PRIMARY KEY (M_Time)
);Issue (From an SQLPlus session) the command DELETE FROM Sysstat - but do not COMMIT.
Go to SQLDeveloper - and (try to) do the following
INSERT INTO Sysstat
SELECT ROUND(TO_DATE (Sysstat_ext.M_Time, 'DD-MM HH24:MI:SS'), 'MI') AS "Measurement Time",
ROUND(TO_NUMBER(Sysstat_ext.Usr_pct), 0) AS "% Usr",
<fields deleted>
FROM Sysstat_ext
COMMIT;The SQLDeveloper session completely hangs - forever* (at least 20 mins at this stage).
As I understood matters with Oracle there were three possibilities.
1) PK violation. The SQLDeveloper session "sees" that there are still records in Sysstat (changes
are uncommitted as far as he's concerned), but there is a PK violation in the data to
be inserted anyway, so the SQLDeveloper session should tell the user Sysstat_PK violation.... error...
2) No potential PK violation. The SQLDeveloper session doesn't know whether the SQL*Plus
session will commit its deletions or not, therefore the SQLDeveloper session commits and Oracle keeps track of the
necessary chains of pointers internally and/or when the SQL*Plus session tries to commit, it's accepted or refused
depending on whether this will cause other issues (FK violation for example)
or
3) Oracle knows that there's a deadlock and after a certain period (configurable?) rolls back the SQLDeveloper session
and informs the user.
Could some kind soul explain to me what, exactly, is going on - and why my reasoning is so obviously erroneous.
I have been looking at Kyte's architecture book, so maybe a concrete example (I've never deadlocked Oracle
before) would help clarify the concepts for me.
Paul...Paulie wrote:
>
Could some kind soul explain to me what, exactly, is going on - and why my reasoning is so obviously erroneous.
I have been looking at Kyte's architecture book, so maybe a concrete example (I've never deadlocked Oracle
before) would help clarify the concepts for me.I've now read a bit about mutexes in Oracle - not that I understood all of it.
no deadlock is occuring.Well, what else should one call a session that is blocked indefinitely? Is there another
computer science term for this phenomenon?
I suspect a Mutex wait is the cause.OK - so, some sort of device to "regulate concurrent access to a shared resource". That's fine.
The blogs and websites which discuss this seem to be a propeller-head's wet dream with obscure X$_Blah
table configs and Totallyunknown_even_to_Oracle_Support parameters being bandied about like there's
no tomorrow.
What I would like to know is a bit more prosaic (and perhaps a level less technically sophisticated).
Is my reading of Oracle's Locking/Latching/Multi-User behaviour correct in what I wrote originally, i.e.
Scenarios:
1) PK violation. The SQLDeveloper session "sees" that there are still records in Sysstat (deletion
is uncommitted as far as he's concerned), but there is a PK violation in the data to
be inserted anyway, so the SQLDeveloper session should tell the user Sysstat_PK violation.... error...
no change to database - SQLDev user informed
2) No potential PK violation. The SQLDeveloper session doesn't know whether the SQL*Plus
session will commit its deletions or not, therefore the SQLDeveloper session commits and Oracle keeps track of the
necessary chains of pointers internally and/or when the SQL*Plus session tries to commit, it's accepted or refused
depending on whether this will cause other issues (FK violation for example)
or
3) Oracle knows that there's a deadlock and after a certain period (configurable?) rolls back the SQLDeveloper session
and informs the user.
Or am I still competely at sea with what Oracle is about? I was of the understanding that whatever* happened,
you should never have a situation where a session hangs indefinitely, due to Oracle's system
of multi-version concurrency - basically, I'm asking what is going on here and how does it
fit with my current* (and obviously mistaken) understanding of how Oracle works.
Thanks for your input so far.
Paul...A basic truism exist for Oracle.
Readers do not block writers & writers do not block readers!
What you fail to recognize is that your test case has two WRITERS; both are doing DML!
two sessions want to change same resource & to maintain data consistency & integrity
the changes must be serialized. One must complete before the second can proceed.
Oracle utilizes Interested Transaction List (ITL) to maintain block level data consistency.
SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess,
id1, id2, lmode, request, type
FROM V$LOCK
WHERE (id1, id2, type) IN
(SELECT id1, id2, type FROM V$LOCK WHERE request>0)
ORDER BY id1, request
/ -
Locked Objects while flushing shared_pool?
Hello guys,
a little understanding about flushing shared pool and the stored objects in it.
What happens to objects (SQL Statements, DDIC cache, and so) that are needed at this time for execution.
For example an user is executing a select statement on a table and its is running while i am executing "alter system flush shared_pool".
What happens to the parsed sql statment which is used at this time by the sql query... and what is happens to the row cache (ddic cache) of the table which is queried at this time?
For my understanding this objects have to be locked (latch) by the user that is executing the query... are they invalidated after the query ends or what happens?
I know that this are internals but maybe someone of you knows it.
Regards
StefanObjects in the shared pool can be both "locked" and "pinned"; locks and pins can be held in null, shared, or exclusive mode.
If you are holding a cursor open you are locking it (with an item from the structure x$kgllk); if you are executing a cursor you will also be pinning it (with an iterm from the structure x$kglpn). Roughly speaking, if you hold a lock you are an interested party and want to know if the object gets changed or eliminated; if you hold a pin you are using the current version of the object and it must not change or disappear until you have finished with it.
If you flush the shared pool, pinned objects cannot be removed from the shared pool and (due to some oddities which are probably not deliberate design) there may be some objects which are in "the same chain" as a pinned object which are accidentally protected because the pinned object is "in the way".
I believe the same rationale of 'objects in use are protected' applies to the dictionary cache (row cache) - and there may be some objects there which are permanently pinned anyway. Normally you would only have a dictionary cache object pinned whilst optimising a statement, though, which might be quite rare.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk -
Macbook coin operated lock & third party accessories
Hi,
Question, the coin operated lock/latch on my white macbook broke while trying to get to the battery. Can this be replace? or any suggestions as to how to affix it. I am thinking of gluing it back but I am not too sure if it would be safe to do. Also, the battery is bulging out. I have heard reports of this in other postings. I am not sure while this happens.
Also does anyone have any experiences using a third party for mac accessories. I am considering replacing my battery with one from Newer Technology? They have a compatible battery for my model, and it is selling about $40 cheaper than Apple's.
All comments will be greatly appreciated.Apple or an authorized service provider can fix the battery lock.
-
Advice needed on locking co-ordination
Ok, this takes a little explaining. I have 5 databases, A, B, C, D and E.
I insert a record into A, and create secondaries automatically in B and C. A record in D and E is then created based on the key value of the record in A (so not via a secondary database).
The problem is that I am not always inserting into A. I actually look to see if the entry is in A first. If it is, I just update a count which causes no action in B or C, but still results in writes or updates to D and E.
It is all co-ordinated from the key value in A. What I want to do is to create a transactional lock where from the momeny I look up the key value in A that until I release that lock, nothing can do anything related to that value. The reason I want to do this is that multiple threads need to work on these tables, all updating A. I can't use transactions as they are too slow and the volumes are very large, so performance is critical.
I do a search key on A first to see if the record exists before deciding to update or write a new one. Am I write that if I use a cursor to do the getSearchKey() with a lock mode of RMW that this will lock the record in database A? If so, how do I release that lock?
Basically, I figured if I could lock the record in A that I do the getSearchKey() on, then I could happily do whatever I wanted to B, C, D, E and once finished, release the lock on A, but I am little confused as to how to do it!
I am not worried about lock contention because the chances of hitting the same record are slight, but are definitely there.Hi Tony,
Ok, implemented it as you suggested and the results
are a bit worrying. Firstly, doing the
putNoOverwrite() caused a problem as I cannot create
the right record for the first putted instance of a
record until I know it is the first! So I must put
something (anything), then overwrite it with the
right thing, which causes a problem with secondary
indices. I have got round this, but it is
inefficient.When you say "I cannot create the right record for the first putted instance of a record until I know it is the first" I assume you mean that the data contents of the record depends on whether it is an insert or an update. Is that right?
If so, I suggest that you create the record contents assuming that it does not exist (that it is the first write for that key). Call putNoOverwrite. If it succeeds, you're done. If it fails, change the record contents to be appropriate for an update, then call put().
If I misunderstand, please post the code you're using for doing the put() operations and I may be able to give better advice.
Using Lockmode.RMW has slowed things down, but the
multiple thread route using a 2 CPU dual-core (core-2
duo) XEON processor machine gives me only a 10%
performance improvement! I have not done any locking
of my own. The design lends itself to multiple
threads with no contention, just using the record
locking discussed before, so I am at aloss to know
where to start looking for what obviously is a
performance problem. I have configured so it can run
threaded or not. In the example file I am using it is
running 11 threads. This is data source dependent,
and as I said fits the design well. The number of
threads makes no difference really, as long as it is
over 3 you get the 10% benefit, but no more.You say that "design lends itself to multiple threads with no contention". Are you sure that one thread is not trying to update the key that is currently locked by another thread? If you can describe how your keys are assigned, and also post the code for doing the put() operations, I may be able to give more help.
JE uses record locking, as you probably know, so as long as multiple threads are working on different keys there should not be a lot of contention between threads. However, each time you do a put operation there is a Btree lookup, so there is still some contention. The locks on the Btree nodes are short lived, but they are still locks. We call these short lived locks "latches".
If you set the environment config parameter je.env.sharedLatches to true, JE will use shared (non-exclusive) latches for higher level Btree nodes. This will improve concurrency when multiple threads are accessing the Btree. You can set this config parameter in the je.properties file or by calling EnvironmentConfig.setConfigParam.
Mark -
Ultrabay eject latch, spring/elastic device or not? (t420s)
Hi
I have been switching between my DVD drive and my ultrabay battery. When I slide the bay eject latch to eject the ultrabay Slim device, I was thinking that the latch should go back into position by itself, but it does not. Should there be some spring/elastic device or is the latch just without. Seems very loose on my machine. (Its not the bay lock latch I am referring to)hey hhjensen,
It is hard to say if the latch on your unit is loose or not. I believe this would be a matter of user preference.
however, if you have any friends or know of a place where they have the same T420s ; check the latch which you have mention.
WW Social Media
Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
Follow @LenovoForums on Twitter!
Have you checked out the Community Knowledgebase yet?!
How to send a private message? --> Check out this article. -
Explain one query in 256M shared pool and ORA-4031 .
Hi,
looks like Oracle 9.2.0.8 got some problems with explaining huge (1000 lines) queries, here
goes ORA-4031 dump, shared pool is about 256 M but there are no other sessions in that DB only mine .
I can reproduce that in 1GB shared pool as well .
*** 2010-09-06 09:43:24.005
*** SESSION ID:(13.24) 2010-09-06 09:43:23.997
=================================
Begin 4031 Diagnostic Information
=================================
The following information assists Oracle in diagnosing
causes of ORA-4031 errors. This trace may be disabled
by setting the init.ora parameter _4031_dump_bitvec = 0
======================================
Allocation Request Summary Information
======================================
Current information setting: 00654fff
Dump Interval=300 seconds SGA Heap Dump Interval=3600 seconds
Last Dump Time=09/06/2010 09:43:22
Allocation request for: qknAllocate : qkn
Heap: 70000002aa6f4e8, size: 640
HEAP DUMP heap name="sga heap" desc=700000000000058
extent sz=0xfe0 alt=200 het=32767 rec=9 flg=-126 opc=0
parent=0 owner=0 nex=0 xsz=0x0
HEAP DUMP heap name="sql area" desc=70000002aa6f4e8
extent sz=0x1040 alt=32767 het=32 rec=0 flg=2 opc=2
parent=700000000000058 owner=0 nex=0 xsz=0x1
Subheap has 102506016 bytes of memory allocated
====================
Process State Object
====================
SO: 7000000222fe540, type: 2, owner: 0, flag: INIT/-/-/0x00
(process) Oracle pid=12, calls cur/top: 700000021736ba0/700000021736ba0, flag: (0) -
int error: 0, call error: 0, sess error: 0, txn error 0
(post info) last post received: 199 0 4
last post received-location: kslpsr
last process to post me: 7000000222fca88 1 6
last post sent: 0 0 16
last post sent-location: ksasnd
last process posted by me: 7000000222fca88 1 6
(latch info) wait_event=0 bits=0
Process Group: DEFAULT, pseudo proc: 7000000212e7290
O/S info: user: oracle, term: UNKNOWN, ospid: 6766752
OSD pid info: Unix process pid: 6766752, image: oracle@prod3 (TNS V1-V3)
=========================
User Session State Object
=========================
SO: 7000000226ee540, type: 4, owner: 7000000222fe540, flag: INIT/-/-/0x00
(session) trans: 0, creator: 7000000222fe540, flag: (100045) USR/- BSY/-/-/-/-/-
DID: 0001-000C-00000002, short-term DID: 0000-0000-00000000
txn branch: 0
oct: 50, prv: 0, sql: 70000002aa7fbf8, psql: 0, user: 2622/INSTALL
program: sqlplus.exe
application name: SQL*Plus, hash value=3669949024
last wait for 'db file sequential read' blocking sess=0x0 seq=93 wait_time=11432
file#=1, block#=106e8, blocks=1
temporary object counter: 0
=========================
Current Parent KGL Object
=========================
LIBRARY OBJECT HANDLE: handle=70000002aa7fbf8
name=
explain plan for
select *
from salda
where saldo <> 0
and konta in ('361','362','363','371','372','373','380','381','382','383','384','385','386','387','388','389','390','391','392','393',
'394','395','396','397','398','399','400','401','402','403','404','405','406','407','408','409','410','411','412','413',
hash=ff099bfd timestamp=09-06-2010 09:41:45
namespace=CRSR flags=RON/KGHP/TIM/PN0/[10010000]
kkkk-dddd-llll=0000-0001-0001 lock=N pin=X latch#=7
lwt=70000002aa7fc28[70000002aa7fc28,70000002aa7fc28] ltm=70000002aa7fc38[70000002aa7fc38,70000002aa7fc38]
pwt=70000002aa7fc58[70000002aa7fc58,70000002aa7fc58] ptm=70000002aa7fce8[70000002aa7fce8,70000002aa7fce8]
ref=70000002aa7fc08[70000002aa7fc08, 70000002aa7fc08] lnd=70000002aa7fd00[70000002aa7fd00,70000002aa7fd00]
LIBRARY OBJECT: object=70000002aa6fc98
type=CRSR flags=EXS[0001] pflags= [00] status=VALD load=0
CHILDREN: size=16
child# table reference handle
0 70000002aa6ff08 70000002aa6fbc0 70000002aa6f7a0
==================
Current KGL Object
==================
LIBRARY OBJECT HANDLE: handle=70000002aa6f7a0
namespace=CRSR flags=RON/KGHP/PN0/[10010000]
kkkk-dddd-llll=0000-0000-0000 lock=N pin=X latch#=7
lwt=70000002aa6f7d0[70000002aa6f7d0,70000002aa6f7d0] ltm=70000002aa6f7e0[70000002aa6f7e0,70000002aa6f7e0]
pwt=70000002aa6f800[70000002aa6f800,70000002aa6f800] ptm=70000002aa6f890[70000002aa6f890,70000002aa6f890]
ref=70000002aa6f7b0[70000002aa6fbc0, 70000002aa6fbc0] lnd=70000002aa6f8a8[70000002aa6f8a8,70000002aa6f8a8]
LIBRARY OBJECT: object=70000002aa6f3b8
type=CRSR flags=EXS[0001] pflags= [00] status=VALD load=0
===========================
Current Instatiation Object
===========================
INSTANTIATION OBJECT: object=1102fa2e0
type="cursor"[2] lock=70000002865ffe0 handle=70000002aa7fbf8 body=0 level=0
flags=FST[60] executions=0
cursor name:
explain plan for
select *
from salda
where saldo <> 0
and nr_konta in ('361','362','363','371','372','373','380','381','382','383','384','385','386','387','388','389','390','391','392','393',
'394','395','396','397','398','399','400','401','402','403','404','405','406','407','408','409','410','411','412','413',
'414','432','450','453','454','455','456','457','458','459','460','461','462','463','464','465','466','467','468','469',
'470','471','472','473','474','475','476','477','478','479','480','481')
and (
(umowa = lpad('2169725150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2170639147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2170815147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2170991138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2173034150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2173821138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2174491138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2176065138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2177180150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2178183150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2178609150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2180241147',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2180252147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2180377148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2180787148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2181011148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2183314150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2187754150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189036150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189362150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189685150',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2191061124',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2194768150',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2195063150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2195568150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2196774143',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2196872143',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2196964143',10) and nr_klasy = lpad('7',3)) or
.... a lot off similar lines
child pin: 0, child lock: 70000002865fb18, parent lock: 70000002865ffe0
xscflg: 4004, parent handle: 70000002aa7fbf8, xscfl2: 0
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
ksm_4031_dump+065c bl ksedst 110006450 ?
ksmasg+0084 bl ksm_4031_dump FFFFFFFFFFF5F60 ? 10299AAF8 ?
000000000 ? 70000002A9007F8 ?
000000000 ? 000000000 ?
kghnospc+0178 bl _ptrgl
kghalp+00f0 bl kghnospc FFFFFFFFFFF6150 ?
422222247FFFFFFC ?
100107620 ? 080000000 ?
000000000 ?
kksalc+0048 bl kghalp 100107620 ? 000000000 ?
FFFFFFFFFFF62C0 ? 000000000 ?
000000080 ? 000000003 ?
qknAllocate+0040 bl kksalc 70000002AC2E1C0 ?
70000002C873DD8 ?
70000002AC2E1C0 ?
qknltAllocate+00d0 bl qknAllocate FFFFFFFFFFF65C0 ?
7000000345292A0 ? 000000000 ?
000000003 ?
qkatab+0ec8 bl qknltAllocate 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
70000002C874170 ?
qkajoi+0b30 bl qkatab 000000000 ? 110378F00 ?
000000000 ? 000000042 ?
100002100050000 ? 110378530 ?
qkaqkn+08d0 bl qkajoi 000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
000000000 ? 000000000 ?
qkadrv+07a0 bl qkaqkn 000000000 ? 10299B690 ?
===============================
Memory Utilization of Subpool 1
===============================
Allocation Name Size
"free memory " 148632616
"miscellaneous " 3998104
"qmps connections " 1454200
"errors " 0
"txncallback " 246640
"PL/SQL MPCODE " 506520
"enqueue " 6054632
"KSXR pending messages que" 853952
"KQR L PO " 221192
"parameters " 1064
"Checkpoint queue " 1026560
"1M buffer " 528384
"db_block_hash_buckets " 589824
"fixed allocation callback" 1112
"sim trace entries " 196608
"KGLS heap " 374728
"KGK heap " 552
"channel handle " 780672
"MTTR advisory " 34088
"DML lock " 1022032
"trigger source " 2288
"trigger defini " 280
"dictionary cache " 2137216
"table definiti " 456
"KQR X PO " 28352
"transaction " 2747760
"constraints " 824960
"library cache " 2030512
"message pool freequeue " 213264
"sql area " 1546168
"sessions " 4467008
"replication session stats" 1004720
"event statistics per sess" 18791304
"KQR S SO " 5632
"sim memory hea " 157768
"PL/SQL DIANA " 80104
"KQR M PO " 141320
"messages " 624000
===============================
Memory Utilization of Subpool 2
===============================
Allocation Name Size
"free memory " 6285488
"miscellaneous " 8927008
"log_buffer " 1056800
"FileOpenBlock " 16270720
"sim memory hea " 162008
"KQR S SO " 9472
"transaction " 3297312
"PL/SQL DIANA " 0
"KGLS heap " 47776
"table definiti " 0
"db_handles " 3480000
"KQR L PO " 213056
"Temporary Tables State Ob" 775488
"trigger inform " 0
"message pool freequeue " 558720
"trigger defini " 0
"fixed allocation callback" 1168
"branch " 1180120
"ktlbk state objects " 1948360
"PLS non-lib hp " 2088
"KGK heap " 6448
"KQR M SO " 1024
"dictionary cache " 2137216
"parameters " 0
"Checkpoint queue " 1026560
"trigger source " 0
"enqueue resources " 768192
"library cache " 1798152
"KSXR receive buffers " 1034000
"sql area " 105380864
"processes " 4104000
"sessions " 4469712
"joxs heap init " 4240
"errors " 0
"event statistics per sess" 18779936
"PL/SQL MPCODE " 0
"KQR M PO " 173592
"UNDO INFO SEGMENTED ARRAY" 649856
LIBRARY CACHE STATISTICS:
namespace gets hit ratio pins hit ratio reloads invalids
CRSR 3184 0.874 12550 0.950 97 11
TABL/PRCD/TYPE 1917 0.871 2293 0.811 0 0
BODY/TYBD 52 0.788 52 0.788 0 0
TRGR 33 0.939 33 0.939 0 0
INDX 74 0.514 43 0.140 0 0
CLST 353 0.977 489 0.980 0 0
OBJE 0 0.000 0 0.000 0 0
PIPE 0 0.000 0 0.000 0 0
LOB 0 0.000 0 0.000 0 0
DIR 0 0.000 0 0.000 0 0
QUEU 0 0.000 0 0.000 0 0
OBJG 0 0.000 0 0.000 0 0
PROP 0 0.000 0 0.000 0 0
JVSC 0 0.000 0 0.000 0 0
JVRE 0 0.000 0 0.000 0 0
ROBJ 0 0.000 0 0.000 0 0
REIP 0 0.000 0 0.000 0 0
CPOB 0 0.000 0 0.000 0 0
EVNT 8 0.750 91 0.978 0 0
SUMM 0 0.000 0 0.000 0 0
DIMN 0 0.000 0 0.000 0 0
CTX 0 0.000 0 0.000 0 0
OUTL 0 0.000 0 0.000 0 0
RULS 0 0.000 0 0.000 0 0
RMGR 0 0.000 0 0.000 0 0
IFSD 0 0.000 0 0.000 0 0
PPLN 0 0.000 0 0.000 0 0
PCLS 0 0.000 0 0.000 0 0
SUBS 0 0.000 0 0.000 0 0
LOCS 0 0.000 0 0.000 0 0
RMOB 0 0.000 0 0.000 0 0
RSMD 0 0.000 0 0.000 0 0
JVSD 0 0.000 0 0.000 0 0
ENPR 0 0.000 0 0.000 0 0
RELC 0 0.000 0 0.000 0 0
STREAM 0 0.000 0 0.000 0 0
APPLY 0 0.000 0 0.000 0 0
APPLY SOURCE 0 0.000 0 0.000 0 0
APPLY DESTN 0 0.000 0 0.000 0 0
TEST 0 0.000 0 0.000 0 0
CUMULATIVE 5621 0.874 15551 0.928 97 11
Permanent space allocted for Load Locks
LATCH:0 TOTAL SPACE: 4248
FREELIST CHUNK COUNT:59 OBJECT SIZE:72
Permanent space allocted for KGL pins
LATCH:0 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:13 OBJECT SIZE:128
LATCH:1 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:15 OBJECT SIZE:128
LATCH:2 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:18 OBJECT SIZE:128
LATCH:3 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:19 OBJECT SIZE:128
LATCH:4 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:21 OBJECT SIZE:128
LATCH:5 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:27 OBJECT SIZE:128
LATCH:6 TOTAL SPACE: 4224
FREELIST CHUNK COUNT:16 OBJECT SIZE:128
Permanent space allocted for KGL locks
LATCH:0 TOTAL SPACE: 4216
FREELIST CHUNK COUNT:11 OBJECT SIZE:136
LATCH:1 TOTAL SPACE: 4216
FREELIST CHUNK COUNT:13 OBJECT SIZE:136
LATCH:2 TOTAL SPACE: 4216
FREELIST CHUNK COUNT:16 OBJECT SIZE:136
...<snipped>...any ideas ?GregG wrote:
Thanks,
but I'm interested in what is the particular problem. Looks like sql area is short on free chunks .I can't say if it is an oracle bug so feel free to ignore my post.
select *
from salda
where saldo 0
and nr_konta in ('361','362','363','371','372','373','380','381','382','383','384','385','386','387','388','389','390','391','392','393',
'394','395','396','397','398','399','400','401','402','403','404','405','406','407','408','409','410','411','412','413',
'414','432','450','453','454','455','456','457','458','459','460','461','462','463','464','465','466','467','468','469',
'470','471','472','473','474','475','476','477','478','479','480','481')
and (
(umowa = lpad('2169725150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2170639147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2170815147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2170991138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2173034150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2173821138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2174491138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2176065138',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2177180150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2178183150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2178609150',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2180241147',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2180252147',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2180377148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2180787148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2181011148',10) and nr_klasy = lpad('13',3)) or
(umowa = lpad('2183314150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2187754150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189036150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189362150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2189685150',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2191061124',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2194768150',10) and nr_klasy = lpad('27',3)) or
(umowa = lpad('2195063150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2195568150',10) and nr_klasy = lpad('9',3)) or
(umowa = lpad('2196774143',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2196872143',10) and nr_klasy = lpad('7',3)) or
(umowa = lpad('2196964143',10) and nr_klasy = lpad('7',3)) or
.... a lot off similar linesThis looks like an ideal candidate for using a Global Temporary table (if you can).
So if you can insert all combination of valid values for "umowa" and "nr_klasy" columns in a GTT,
you can simplify your query as
select *
from salda
where saldo 0
and nr_konta in ('361','362','363','371','372','373','380','381','382','383','384','385','386','387','388','389','390','391','392','393',
'394','395','396','397','398','399','400','401','402','403','404','405','406','407','408','409','410','411','412','413',
'414','432','450','453','454','455','456','457','458','459','460','461','462','463','464','465','466','467','468','469',
'470','471','472','473','474','475','476','477','478','479','480','481')
and (umowa, nr_klasy) in (select lpad(col1,10), lpad(col2,3) from gtt_temp) -
New NLE Build Specs I've Selected for My Client - Comments?
OK, after mucho work, I've come up with what seems to be the best bang for the buck for my video conversion client who needs new systems.
Here's what I selected:
Antec DF-85 Black ATX Full Tower Computer Case (tons of space, USB 3.0 ports, CPU cooler cutout, 9 internal 3.5" drives, 7 fans, long video cards fit) - $156
CORSAIR HX Series CMPSU-1000HX 1000W Power Supply (any chance I need more than 1000W?) - $230
ASUS P6X58D Premium LGA 1366 Intel X58 SATA 6Gb/s USB 3.0 ATX Intel Motherboard (Note: only available board supported by BlackMagic for their DeckLink/IntensityPro video capture cards, so this is pretty much it unless I want to chance a non-supported board with equivalent specs) - $290
Intel Core i7-950 Bloomfield 3.06GHz 4 x 256KB L2 Cache 8MB L3 Cache LGA 1366 130W Quad-Core Processor BX80601950 (I intend to overclock to some degree, probably under 4GHz) - $270
Prolimatech Armageddon CPU Cooler - Intel Socket LGA 775/1156/1366 Heatsink, 140mm Fan Compatible (Selected this one because one Web site review of the ASUS board specifically used this cooler which fit nicely without covering up the 6 RAM slots; also this one gets good reviews everywhere) - $65
XIGMATEK eXTREME SILENT Series XSF-F1452 140mm Case Fan x 2 (for the above cooler to improve cooling) - $20
G.SKILL Ripjaws Series 24GB (6 x 4GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 10666) Desktop Memory Model F3-10666CL9T2-24GBRL - $285
Palit NE5X56T01142-1041F GeForce GTX 560 Ti (Fermi) 2GB 256-bit GDDR5 PCI Express 2.0 x16 HDCP Ready SLI Support Video Card (lots of DDR5 RAM, 384 cores, 256-bit memory path, well reviewed) - $280
SAMSUNG Spinpoint F4 HD322GJ/U 320GB 7200 RPM 16MB Cache SATA 3.0Gb/s 3.5" Internal Hard Drive -Bare Drive (for OS and programs) - $43
SAMSUNG Spinpoint F3 HD103SJ 1TB 7200 RPM 32MB Cache SATA 3.0Gb/s 3.5" Internal Hard Drive -Bare Drive x 4 (for RAID 0) - $260
SONY Black 12X BD-R 2X BD-RE 8X DVD+R 5X DVD-RAM 8X BD-ROM 8MB Cache SATA Internal Blu-ray Burner Blu-ray Burner BD-5300S-0B - OEM - $110
Link Depot 39.37" SATA II Cable with Locking Latch Model LD-SATA-1 $4 X 5 Drives + DVD Burner - $24
Total Cost: $2033.00
With Windows 7 Professional OEM and an Adobe Premiere Pro CS5 upgrade, that adds another $434 making a total of $2,467. I think the client can handle that. He will also probably get a Matrox MX02 Mini or a BlackMagic DeckLink/IntensityPro card to handle video capture. I'm leaving that decision up to his tech. If he needs to go to a full CS5 Production Suite, then he needs to tack on another $500-600 over the Premiere Pro upgrade price which will bring him up to $3,000 for the whole system.
He needs to replace three machines in the video department, but my guess is we'll start with one, maybe two, and the productivity improvement over the crap he's using now may mean he doesn't need a third one. Considering he's upgrading from six-year-old+ Pentium 4 machines with 2GB RAM, no RAID, Adobe Premiere 1.5, these new systems should come as a shock. Hopefully the price for the upgrade won't be as big a shock.
I welcome any comments on the system laid out above, positive or negative.
I know I could improve this slightly with say, 10,000 RPM Velociraptors for the OS drive, and stuff like that, but I've tried to keep this pretty vanilla to hold the cost down.
Let me know what you guys think.On the other hand, I just found this Tom's Hardware memory benchmark article which shows the difference between various RAM speeds and timings while doing video editing with Adobe Premiere CS4. The differences are minimal at best maybe 2-3 percent.
http://www.tomshardware.com/reviews/memory-scaling-i7,2325-10.html
It's not clear to me that the difference is worth either the difference in cost or more importantly how much work it might take to get a stable system.
In the last half hour I've looked up a LOT of Web postings about the ASUS P6X58D Premium and 1600 memory. It's all over the place as to whether the issues people have had are with the RAM, the CPU memory controller, or their memory settings. I don't want to go through a couple weeks of RMAing memory back and forth to get it right. I need to have this machine up within the next 6 weeks and the client isn't going to be able to order for another two weeks.
For one thing, if I decide to go with the 970, I'll have less need to overclock. I was not intending to overclock the 950 that high anyway, and if I go to the 970, I can overclock even less. So whether the RAM can be speeded up may not matter as much.
I definitely won't buy multiple sets like you did, I've heard too many warnings about that not being guaranteed by the vendors.
I also just found this Adobe Hardware Forum post which addresses this issue:
http://forums.adobe.com/thread/695662?tstart=60
I quote Mr. Bowen:
Quote
When the I7 platform released, Intel's official supported specs were really low. They only officially supported DDR3 1333 and that was with 3 sticks of ram only. If you had 6 sticks then the supported clock speed of the ram was 1066. Intel also only supported a QPI of 4.8 on most cpu's accept for the top 1 or 2 which had a QPI support of 6.4. The Motherboard manufacturers decided to go well beyond those specs because they were way to conservative and to push their products. The manufacturers like ASUS supported DDR3 1600 or even DDR2000 but only in 3 stick configurations. If you had any problems with 6 stick configurations at DDR3 1600 or higher, they would respond they only supported specs greater than Intel's with 3 stick configurations( I was surprised they hid behind that back then when I talked to the engineers of one of the companies). This does not mean that it will not work. It just means you wont get support from the motherboard manufacturer if you have problems. It really was a joke. So much so one of the companies I can't name here changed their website to reflect that just because I brought the subject up and told them this policy was no where on their website at all when we tested their board.
So what does this all mean. The QVL is the Qualified Vendor List. This is the hardware officially tested by the motherboard manufacturer's R&D or tech support. This hardware is approved to work without issues and will be fully supported by their tech support. The caveat is though only in the officially supported configuration. Normally as long as you buy ram off the QVL list, you can run those in 6 stick configurations and you likely wont have problems as long as you set the bios up right. If you buy ram that is not listed on the QVL now days with DDR3 then it's a gamble on whether it will work or not without issues unless you have some company like us that tests all of this and works with the Ram company's engineering to fix any problems. So the best advice here for DYI is stick to the QVL but remember you are not locked into the official supported config. That is way to conservative. I hope that helps.
End Quote
It's that "as long as you set the bios right" bit that concerns me. I don't want to spend two days tweaking the RAM settings as well as the CPU overclock considering the performance gain is likely to be less than 5%.
Further comments on this? -
ACTIVE DEDICATED USER ...PROD
Hi,
This process is taking more time and degrade performance. ple let me know regarding this....
from the front end we realize Workflow back ground process is taking more time when iteam type-OM Order Line
SID/Serial : 414,6226
Foreground : PID: 2286 - STANDARD@xxx (TNS V1-V3)
Shadow : PID: 10604 - oracle@XXXXX
Terminal : / UNKNOWN
OS User : appXXX on XXX
Ora User : APPS
Details : Concurrent Request - FNDWFBG
Status Flags: ACTIVE DEDICATED USER
Tran Active : NONE
Login Time : Mon 15:05:12
Last Call : Mon 15:05:13 - 44.0 min
Lock/ Latch : NONE/ NONE
Latch Spin : NONE
Current SQL statement:
SELECT /*+ ORDERED USE_NL (WIASP WI WPAP WAP) INDEX
(WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */ WIASP.ROWID ROW_ID FROM
WF_ITEM_ACTIVITY_STATUSES WIASP, WF_ITEMS WI, WF_PROCESS_ACTIVIT
IES WPAP, WF_ACTIVITIES WAP WHERE WIASP.ITEM_TYPE = :B2 AND WIAS
P.PROCESS_ACTIVITY = WPAP.INSTANCE_ID AND WPAP.ACTIVITY_ITEM_TYP
E = WAP.ITEM_TYPE AND WPAP.ACTIVITY_NAME = WAP.NAME AND WIASP.IT
EM_TYPE = WI.ITEM_TYPE AND WIASP.ITEM_KEY = WI.ITEM_KEY AND WI.B
EGIN_DATE >= WAP.BEGIN_DATE AND WI.BEGIN_DATE < NVL(WAP.END_DATE
, WI.BEGIN_DATE+1) AND WAP.TYPE = :B1 AND WIASP.ACTIVITY_STATUS
= 'ACTIVE' AND NOT EXISTS (SELECT NULL FROM WF_ITEM_ACTIVITY_STA
TUSES WIASC, WF_PROCESS_ACTIVITIES WPAC WHERE WAP.ITEM_TYPE = WP
AC.PROCESS_ITEM_TYPE AND WAP.NAME = WPAC.PROCESS_NAME AND WAP.VE
RSION = WPAC.PROCESS_VERSION AND WPAC.INSTANCE_ID = WIASC.PROCES
S_ACTIVITY AND WIASC.ITEM_TYPE = WI.ITEM_TYPE AND WIASC.ITEM_KEY
= WI.ITEM_KEY AND WIASC.ACTIVITY_STATUS IN ('ACTIVE','NOTIFIED'
,'SUSPEND', 'DEFERRED','ERROR'))
Previous SQL statement:
SELECT S.ROWID ROW_ID FROM WF_ITEM_ACTIVITY_STATUSES S WHERE S.D
UE_DATE < SYSDATE AND S.ACTIVITY_STATUS IN ('ACTIVE','WAITING','
NOTIFIED', 'SUSPEND','DEFERRED') AND S.ITEM_TYPE = :B1
Session Waits:
WAITED SHORT TIME: db file sequential read
Locks:
TYPE=TO H: RX R: NONE - ID1=125472 ID2=1
PLS USR LOCK H: X R: NONE - ID1=1073797669 ID2=0
TYPE=AE H: S R: NONE - ID1=471643 ID2=0
=====================================================================
1 sessions were found with 10604 as their unix process id.
Please scroll up to see details of all the sessions.
=====================================================================
Rgds...
MJ
Edited by: user6351413 on Jul 6, 2011 10:39 PM
Edited by: user6351413 on Jul 6, 2011 11:02 PM
Edited by: user6351413 on Jul 6, 2011 11:09 PMPlease post the details of the application release, database version and OS.
Please see if these docs help.
Performance Degradation when the Workflow Background Process is Running [ID 743338.1]
When Conventional Thinking Fails: A Performance Case Study in Order Management Workflow customization [ID 431619.1]
FAQ: Best Practices For Custom Order Entry Workflow Design [ID 402144.1]
Workflow Background Process For OEOH Is Looping In The Workflow Deferred Queue [ID 345090.1]
Speeding Up And Purging Workflow [ID 132254.1]
Performance Issues caused by Purge Obsolete Workflow Runtime Data not purging everything [ID 148678.1]
Thanks,
Hussein -
Hi Guys,
I am planning to write a procedure, that basically gives me every information about a SID which I pass as an
argument.
I am looking to get the following information.
1. Username, module, program, connection_time
2. Locks / latch they current hold
3. SGA consumption by verious areas / cursor usage
4. temp space/ undo tablespace usage
5. SQL currently being executed
6. Waits
I am not a PL/SQL expert but have used it sparingly in the past. With the new features introduced, I would like
to know the way to go about desgining this piece of code. I am thinking of cursor drilldown based on parameters ( parameterized cursors )
Is that the best way to go about it ?
Your comments would be greatly appreciated.
Thanks
GI'm guessing you need to get familiar with STATSPACK:
Here is [ one link.|http://www.akadia.com/services/ora_statspack_survival_guide.html]
And another .
And another . -
Microsoft T-SQL v. Oracle 9i SQL
Hi
I'am looking for any materials (e-documents) in subject:
- SQL'99 standard
- differences & similiarities between MS SQL Server and Oracle SQL
Please help me.For the SQL 99 - you could look at Oracle's SQL Language reference manual (http://docs.oracle.com) which contains a description of the differences between Oracle's SQL dialect and the ANSI standard.
For the T-SQL vs Oracle PL/SQL ... the migration workbench as well as a lot of reading between the lines might help. It's not so much as the two have different dialects as the two require a completely different programming style to accomodate the differences in locking, latching, parameterization, parsing and rollback. Coding for one simply means bad performance in the other ... read Tom Kyte's books (see http://apress.com) to get an understanding of what this means. -
hi,
I need to check user session like how much cpu a particular user consuming, user's session time and what activity he is doing(i.e. how many sql statement worked on and currently working).The below query will give you details on :
SID/Serial, Foreground, Shadow, OS User, Ora User, User Module, Status Flags, Tran Active, Login Time, Last Call, Lock/Latch, Latch Spin, Current SQL stmt, Previous SQL stmt, Session Waits, WAITED Locks.
set serveroutput on size 50000
set echo off feed off veri off
accept 1 prompt 'Enter Unix process id: '
DECLARE
v_sid number;
s sys.v_$session%ROWTYPE;
p sys.v_$process%ROWTYPE;
BEGIN
begin
select sid into v_sid
from sys.v_$process p, sys.v_$session s
where p.addr = s.paddr
and (p.spid = &&1
or s.process = '&&1');
exception
when no_data_found then
dbms_output.put_line('Unable to find process id &&1!!!');
return;
when others then
dbms_output.put_line(sqlerrm);
return;
end;
select * into s from sys.v_$session where sid = v_sid;
select * into p from sys.v_$process where addr = s.paddr;
dbms_output.put_line('=====================================================================');
dbms_output.put_line('SID/Serial : '|| s.sid||','||s.serial#);
dbms_output.put_line('Foreground : '|| 'PID: '||s.process||' - '||s.program);
dbms_output.put_line('Shadow : '|| 'PID: '||p.spid||' - '||p.program);
dbms_output.put_line('Terminal : '|| s.terminal || '/ ' || p.terminal);
dbms_output.put_line('OS User : '|| s.osuser||' on '||s.machine);
dbms_output.put_line('Ora User : '|| s.username);
dbms_output.put_line('User Module : '|| s.module);
dbms_output.put_line('Status Flags: '|| s.status||' '||s.server||' '||s.type);
dbms_output.put_line('Tran Active : '|| nvl(s.taddr, 'NONE'));
dbms_output.put_line('Login Time : '|| to_char(s.logon_time, 'Dy HH24:MI:SS'));
dbms_output.put_line('Last Call : '|| to_char(sysdate-(s.last_call_et/60/60/24), 'Dy HH24:MI:SS') || ' - ' || to_char(s.last_call_et/60, '990.0') || ' min');
dbms_output.put_line('Lock/ Latch : '|| nvl(s.lockwait, 'NONE')||'/ '||nvl(p.latchwait, 'NONE'));
dbms_output.put_line('Latch Spin : '|| nvl(p.latchspin, 'NONE'));
dbms_output.put_line('Current SQL statement:');
for c1 in ( select * from sys.v_$sqltext
where HASH_VALUE = s.sql_hash_value order by piece) loop
dbms_output.put_line(chr(9)||c1.sql_text);
end loop;
dbms_output.put_line('Previous SQL statement:');
for c1 in ( select * from sys.v_$sqltext
where HASH_VALUE = s.prev_hash_value order by piece) loop
dbms_output.put_line(chr(9)||c1.sql_text);
end loop;
dbms_output.put_line('Session Waits:');
for c1 in ( select * from sys.v_$session_wait where sid = s.sid) loop
dbms_output.put_line(chr(9)||c1.state||': '||c1.event);
end loop;
-- dbms_output.put_line('Connect Info:');
-- for c1 in ( select * from sys.v_$session_connect_info where sid = s.sid) loop
-- dbms_output.put_line(chr(9)||': '||c1.network_service_banner);
-- end loop;
dbms_output.put_line('Locks:');
for c1 in ( select /*+ ordered */
decode(l.type,
-- Long locks
'TM', 'DML/DATA ENQ', 'TX', 'TRANSAC ENQ',
'UL', 'PLS USR LOCK',
-- Short locks
'BL', 'BUF HASH TBL', 'CF', 'CONTROL FILE',
'CI', 'CROSS INST F', 'DF', 'DATA FILE ',
'CU', 'CURSOR BIND ',
'DL', 'DIRECT LOAD ', 'DM', 'MOUNT/STRTUP',
'DR', 'RECO LOCK ', 'DX', 'DISTRIB TRAN',
'FS', 'FILE SET ', 'IN', 'INSTANCE NUM',
'FI', 'SGA OPN FILE',
'IR', 'INSTCE RECVR', 'IS', 'GET STATE ',
'IV', 'LIBCACHE INV', 'KK', 'LOG SW KICK ',
'LS', 'LOG SWITCH ',
'MM', 'MOUNT DEF ', 'MR', 'MEDIA RECVRY',
'PF', 'PWFILE ENQ ', 'PR', 'PROCESS STRT',
'RT', 'REDO THREAD ', 'SC', 'SCN ENQ ',
'RW', 'ROW WAIT ',
'SM', 'SMON LOCK ', 'SN', 'SEQNO INSTCE',
'SQ', 'SEQNO ENQ ', 'ST', 'SPACE TRANSC',
'SV', 'SEQNO VALUE ', 'TA', 'GENERIC ENQ ',
'TD', 'DLL ENQ ', 'TE', 'EXTEND SEG ',
'TS', 'TEMP SEGMENT', 'TT', 'TEMP TABLE ',
'UN', 'USER NAME ', 'WL', 'WRITE REDO ',
'TYPE='||l.type) type,
decode(l.lmode, 0, 'NONE', 1, 'NULL', 2, 'RS', 3, 'RX',
4, 'S', 5, 'RSX', 6, 'X',
to_char(l.lmode) ) lmode,
decode(l.request, 0, 'NONE', 1, 'NULL', 2, 'RS', 3, 'RX',
4, 'S', 5, 'RSX', 6, 'X',
to_char(l.request) ) lrequest,
decode(l.type, 'MR', o.name,
'TD', o.name,
'TM', o.name,
'RW', 'FILE#='||substr(l.id1,1,3)||
' BLOCK#='||substr(l.id1,4,5)||' ROW='||l.id2,
'TX', 'RS+SLOT#'||l.id1||' WRP#'||l.id2,
'WL', 'REDO LOG FILE#='||l.id1,
'RT', 'THREAD='||l.id1,
'TS', decode(l.id2, 0, 'ENQUEUE', 'NEW BLOCK ALLOCATION'),
'ID1='||l.id1||' ID2='||l.id2) objname
from sys.v_$lock l, sys.obj$ o
where sid = s.sid
and l.id1 = o.obj#(+) ) loop
dbms_output.put_line(chr(9)||c1.type||' H: '||c1.lmode||' R: '||c1.lrequest||' - '||c1.objname);
end loop;
dbms_output.put_line('=====================================================================');
END;
undef 1
set feedback on;
set veri on;
Maybe you are looking for
-
HT201612 clearing disk space in mac drive in windows partition
I am using MacBook Air and having both the operating system installed (Windows and linux). My windows partition "BOOTCAMP" is having 79 GB (30 GB is still free) and Macintosh HD is of 32 GB (only 19.6 MB is free). I am not able to login to Linux oper
-
Unable to Restore iPad. How do I fix it?
I am having major trouble restoring my iPad. Here are the steps I did: 1) I was trying to upgrade my iPad to iOS5. So I first upgraded iTunes on my Mac to the latest 10.5 version. That went ok although it was crashing several times in the beginning.
-
RCCTBI01 : Characterstics upload using lsmw
Hi All, I am using SAP std program RCCTBI01 in lsmw to upload characteristics. Program is working fine with t-code CT01, however i am facing one problem. When passing characteristics value in structure BIMZW, multiple values are read properly and con
-
JFileChooser in mode FILES_ONLY
Hi, I've a little problem with the JFileChooser. I open a JFileChooser in FILES_ONLY mode with a default filename. The default filename is displayed fine but when I click on a directory name my filename is overwritten by the selected directory name.
-
Decription/Text of value field
Hi. I have a field of Data Dictionary and i want the text that describe the value of this field. But I don't know the text table and the name of field 'Description'. For example, -I have the field PA0001-PERSK -the user insert the value '03' -the pro