home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / oracle / 1332 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  2.5 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!paladin.american.edu!news.univie.ac.at!bmwf1f.bmwf.gv.at!hatzinger_m
  2. From: hatzinger_m@bmwf1f.bmwf.gv.at
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Vanishing data in Dynamic tables v$... ?
  5. Message-ID: <1992Aug21.095422.36@bmwf1f.bmwf.gv.at>
  6. Date: 21 Aug 92 08:16:12 GMT
  7. References: <BtAJKF.Axo@nntp-sc.Intel.COM>
  8. Organization: (Klaus-Michael Hatzinger), BMWF, Vienna
  9. Lines: 41
  10.  
  11. In article <BtAJKF.Axo@nntp-sc.Intel.COM>, kortikar@mipos2.intel.com () writes:
  12. > I am trying to find out type of locks held by users on various tables.
  13. > I can do this by querying tables such as v$access,v$process etc. but if any
  14. > user hold locks on table for quite long period then that data is removed from
  15. > dynamic performnce tables such as v$access. If he touches the tables again
  16. > then data will appear again.!
  17. > How can I get static data from dynamic tables!
  18.  
  19.  
  20. I can't believe that ...
  21.  
  22. v$access doesn't give you any reference wich locks held by users. I think
  23. this dynamic table only holds information about the tables used by last
  24. access. If you want to get information about the locks you must query the
  25. v$lock table for each pid.
  26.  
  27. You can decode the ID1 column joining it with the OBJECT_ID of the 
  28. ALL_OBJECT (for special tables like OBJ$ use v$access) table 
  29. (only for ID2 = 0). So you can get the table name, type and mode of the locks.
  30.  
  31. modes..............
  32.  
  33.  WHEN '1' THEN COPY 'ROW EXCLUSIVE MODE' INTO :locks.modetxt;
  34.  WHEN '2' THEN COPY 'ROW SHARE MODE' INTO :locks.modetxt;
  35.  WHEN '3' THEN COPY 'ROW EXCLUSIVE MODE' INTO :locks.modetxt;
  36.  WHEN '4' THEN COPY 'SHARE MODE' INTO :locks.modetxt;
  37.  WHEN '5' THEN COPY 'SHARE/ROW EXCLUSIVE MODE' INTO :locks.modetxt;
  38.  WHEN '6' THEN COPY 'EXCLUSIVE MODE' INTO :locks.modetxt;
  39.  
  40.  
  41. ================================================================================
  42.                                                                           ^
  43.  Federal Ministry of Science and Research                               B | M
  44. <-------------------------------------------------------------------------+---->
  45.  Computer Center                                                        W | F
  46.                                                                           |
  47.  Klaus-Michael Hatzinger            mail: hatzinger_m@bmwf1f.bmwf.gv.at   |
  48.  Bangkasse 1/209                   phone: 0043-222-53120/5188             |
  49.  1014 Vienna, Austria                fax: 0043-222-53120/5155             V
  50. ================================================================================
  51.