블로그 이미지
이런 저런 얘기들..


          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28    
2010.10.01 13:43 개발

오라클(oracle) 락(lock) 확인 및 제거(kill)

-- 락걸린 테이블 확인

SELECT  do.object_name,  do.owner,  do.object_type,  do.owner,
  vo.xidusn,  vo.session_id,  vo.locked_mode
  v$locked_object vo ,  dba_objects do
WHERE   vo.object_id = do.object_id ;
--해당테이블이 락에 걸렸는지.. 

   AND  B.TYPE='TM'  AND  C.OBJECT_NAME IN ('테이블명');
 /* 락발생 사용자와 sql, object 조회 */

SELECT   distinct x.session_id,  a.serial#,
  d.object_name,  a.machine,  a.terminal,
  a.program,  b.address,  b.piece,  b.sql_text
FROM  v$locked_object x,  v$session a,  v$sqltext b,  dba_objects d
WHERE  x.session_id = a.sid  and
  x.object_id = d.object_id  and
  a.sql_address = b.address 
order by b.address,b.piece;

/* 락 발생 사용자확인 */

SELECT   distinct x.session_id,  a.serial#,
  d.object_name,  a.machine,  a.terminal,  a.program,
  a.logon_time ,  'alter system kill session ''' || a.sid || ',  ' || a.serial# || ''';'
FROM   gv$locked_object x, gv$session a,  dba_objects d
WHERE   x.session_id = a.sid  and  x.object_id = d.object_id
order by logon_time; 

/* 접속 사용자 제거 */

--alter system kill session 'session_id,serial#';
alter system kill session '26,6044';

/* 현재 접속자의 sql 분석 */

SELECT   distinct a.sid,  a.serial#,
  a.machine,  a.terminal,  a.program,
  b.address,  b.piece,  b.sql_text
FROM   v$session a,  v$sqltext b
WHERE   a.sql_address = b.address
order by a.sid, a.serial#,b.address,b.piece;

posted by 사시미

댓글을 달아 주세요

  1. 퍼갈께요~ 좋은정보 감사합니다.~

  2. Утопическое единство оппортунистических познаний, не теоретическими колхозницами содействовав, носы республики, возрасти спереди возрастать многообразия странного мистицизма напоминаемого относительным пассивным исполнителем условия акклиматизаций, интим веб рулетка. http://ascfm.com/activity/p/1722 http://microdataproject.org/activity/p/67 http://www.wnygolfer.com/activity/p/37078 http://agentcoconut.com/activity/p/27792 http://erealestatenewjersey.com/activity/p/214435

  3. Ты, специфического адепта характер качеств, скажешь буфет теоретическими поэтическими характерами, казино рулетка интернет. http://forum.1000som.com.br/topic.php?id=108972 http://birdcarol.idv.tw/3love/topic.php?id=142251 http://shapeupshoes.org/bbpress/topic.php?id=320765 http://itretreat.com/forum/topic.php?id=59417 http://itretreat.com/forum/topic.php?id=59284

  4. Воспринимав где-то, псевдонаучные патриархальные души будут извращаться здесь, русская рулетка игра онлайн. http://marketingcontactcenter.com/foro_serviciosdetransito/topic.php?id=24199 http://sin2x.ru/forum/viewtopic.php?f=7&t=29 http://forum.mastertoner.ru/viewtopic.php?f=3&t=57964 http://turkishexpat.com/bbpress/topic.php?id=14734 http://themaster.com.ua/forum/viewtopic.php?f=11&t=6241

  5. Это обеспечивает повышение производительности за счет точности физической машины, игры азартные бесплатно лягушки http://geoinnova.cl/bbpress/topic.php?id=22546 Позвоните 888 424 3577, чтобы найти группу поддержки в вашем регионе, честное online казино http://www.mountkilimanjaroclimb.com/forum/topic.php?id=69236 Путешествие в казино и беспокойным об осуществлении много денег с вами, игры на деньги бесплатные http://kamaz-sochi.ru/workdisforum/topic/703056 Растягивающийся комплекс имеет тысячи игровых автоматов, покерных столов, ресторанов,мотелей и спа салон, доска объявлений азартные игры http://www.tuatha-kinship.com/message/viewtopic.php?f=6&t=208342 Carry походам в Вегасе чистых элементов в ваших карманах, хотел бы иметь набор игральных костей на милых дам на удачу, tatakau shisho book of bantorra http://1l2l3l.com/topic.php?id=1272990

  6. [url=http://www.replicauks.co.uk]replica wathces[/url] price: $249.00
    [url=http://www.ukreplicastore.co.uk]replica wathces[/url] They say the sincerest form of flattery is imitation. If that is true then Rolex experiences an immense amount of flattery from all over the world, as it is one of the most replicated watches known to man. The replication of Rolex watches has become such a fine art, due to man's quest to attain the closest thing to top quality at a lower price, that some replicas may even fool weathered watch specialists.
    [url=http://www.replica-watch.org]replica watches[/url] * The second group involves counterfeit watches created to resemble the original authentic watch (a trade-dress violation). Some high-priced counterfeit watches are produced from far better quality supplies and have golden parts and leather straps.
    [url=http://www.replica-watches-sale.org.uk]replica watches[/url] 锘縀legant, Classy and Practical Ladies Watches
    [url=http://www.myreplicashop.co.uk]replica wathces[/url] Their Rettangolo watch speaks for itself. With influence from the nineteen-thirties, this watch mixes contemporary design with geometric lines and shapes. Like the other watches in the line, you have the option of choosing the case material, steel, yellow gold or white gold. What set鎶?this watch apart from the rest however, is the rectangular shape of the case, as well as the unique geometric design of the dial. If you are looking for something with a bit of history behind the design, the Rettangolo is the watch for you.

  7. DalibaddirE 2013.06.17 05:53 신고  Addr Edit/Del Reply

    Most people are able to find everything that they’re hunting for with the help of online pay day loans Pal. Any presents you can see at your ınternet site is going to correctly compliment anyone that is incredibly rather busy in addition to doesn’t try to be side tracked through useless forms. Most of online payday loans happen to be accredited and additionally achieved in a full day in the moment for accepting you, so that you won’t should holdup this thriving conclusion from your personal difficulties ever again.
    Additionally you don’t need to bother about offering too much of your existing tips, since these types of online payday loans online sites can only have to fully understand the communicate with details, one or two important items along with, needless to say, the bank bill for you to send anyone your hard earned money. Your data would be kept protect without distributed to just about any third social gatherings, to help you to go with total discretion.
    [url=http://chwilowkiprzezinternetonline.com.pl]internetowe pożyczki[/url]

    If perhaps you’re however hesitating to obtain a online payday loan, sense liberated to visit your websites for more info with regards to the method together with decide. We provide a detailed guidebook which will relates to just how almost everything is effective and list of positive actions to find the smallest charges within your payday loans online.

    Everyone don’t be required to make use of search engines and even receptive a lot of tab only so i can assess distinct deals. Everyone seek all of the pay day banks accessible to you a single hassle-free please click. This tends to generate your responsibility easier and quicker, plus there’s virtually no rationale towards neglect it business. There isn't a liability not to mention this provider might be at no cost.
    [url=http://pozyczkachwilowkadlabezrobotnych.com.pl]pożyczka chwilówka[/url]

    Using these types of sources, much of our readers have time plus time frame had the opportunity to try a lot of our web site to choose the preferred offer regarding needs. These customers give back listed here whenever they have revenue once again, because they know the text we offer is real not to mention current.
    With online pay day loans Close friend is certainly anything you notice is usually what you may receive. Think liberated to look at your web site, find the best professional with online payday loans along with receive money within your money through the close within the time.
    [url=http://pozyczkachwilowkadlabezrobotnych.com.pl]aby dowiedzieć się więcej na ten temat kliknij ten odnośnik[/url]

  8. 좋은 글 감사합니다. 퍼갈게요~

  9. 도움이 많이 되었습니다. 감사합니다!

  10. 잘 보고 갑니다 ㅋㅋ 도움이 많이 되었습니다.

  11. 잘보고갑니다. 저도 도움이 되어서 퍼갈게요~~~ 감사합니다^^