{"id":139,"date":"2012-03-02T00:48:10","date_gmt":"2012-03-02T00:48:10","guid":{"rendered":"http:\/\/oranotes.tuktaroff.com\/?page_id=139"},"modified":"2015-02-11T03:29:17","modified_gmt":"2015-02-11T03:29:17","slug":"long-operations","status":"publish","type":"page","link":"http:\/\/oranotes.tuktaroff.com\/?page_id=139","title":{"rendered":"Long operations"},"content":{"rendered":"<p><code><br \/>\n<script type=\"text\/javascript\"> \nfunction copy(what) {\n    window.clipboardData.setData('Text',what.value);\n}\nfunction paste(what) {\n    what.value = window.clipboardData.getData('Text');\n}\n<\/script><\/p>\n<form action=\"\"><textarea name=\"data\" cols=\"50\" rows=\"10\" style=\"display:none;\"><br \/>\nset linesize 200<br \/>\nSET PAGESIZE 9999<br \/>\nSET VERIFY   OFF<br \/>\nCOLUMN INST_ID\t  \t\tFORMAT 9999   \tHEADING 'INST'<br \/>\nCOLUMN sid_serial\t  \tFORMAT a15   \tHEADING 'SID \/ Serial#'<br \/>\nCOLUMN opname   \t\tFORMAT a30   \tHEADING 'Op Name'<br \/>\nCOLUMN username\t\t\tFORMAT a15   \tHEADING 'Username'<br \/>\nCOLUMN target\t\t\tFORMAT a30   \tHEADING 'Target'<br \/>\nCOLUMN done\t    \t\tFORMAT 99.99    HEADING '% completed'<br \/>\nCOLUMN start_date_time  FORMAT a20      HEADING 'Start time'<br \/>\nCOLUMN remain    \t\tFORMAT 999.99   HEADING 'Min remaining'<br \/>\nCOLUMN end_time\t\t\tFORMAT a20      HEADING 'End time (estim)'<\/p>\n<p>select INST_ID, SID||'\/'||Serial# sid_serial,<br \/>\n\t\topname,<br \/>\n\t\tusername,<br \/>\n\t\ttarget,<br \/>\n\t\tsofar\/totalwork*100 done,<br \/>\n\t\tto_char(start_time, 'dd\/mm\/yyyy hh24:mi:ss') start_date_time,<br \/>\n\t\ttime_remaining\/60 remain,<br \/>\n\t\tto_char(sysdate + TIME_REMAINING\/3600\/24, 'dd\/mm\/yyyy hh24:mi:ss') end_time<br \/>\n\tfrom gv$session_longops<br \/>\n\t\twhere sofar < totalwork\n\/\n<\/textarea><input type=\"button\" value=\"Clipboard\" onclick=\"copy(this.form.data)\"><\/form>\n<pre class=\"qcode\">\r\nset linesize 200\r\nSET PAGESIZE 9999\r\nSET VERIFY   OFF\r\nCOLUMN INST_ID\t  \t\tFORMAT 9999   \tHEADING 'INST'\r\nCOLUMN sid_serial\t  \tFORMAT a15   \tHEADING 'SID \/ Serial#'\r\nCOLUMN opname   \t\tFORMAT a30   \tHEADING 'Op Name'\r\nCOLUMN username\t\t\tFORMAT a15   \tHEADING 'Username'\r\nCOLUMN target\t\t\tFORMAT a30   \tHEADING 'Target'\r\nCOLUMN done\t    \t\tFORMAT 99.99    HEADING '% completed'\r\nCOLUMN start_date_time  FORMAT a20      HEADING 'Start time'\r\nCOLUMN remain    \t\tFORMAT 999.99   HEADING 'Min remaining'\r\nCOLUMN end_time\t\t\tFORMAT a20      HEADING 'End time (estim)'\r\n\r\nselect INST_ID, SID||'\/'||Serial# sid_serial, \r\n\t\topname, \r\n\t\tusername, \r\n\t\ttarget, \r\n\t\tsofar\/totalwork*100 done, \r\n\t\tto_char(start_time, 'dd\/mm\/yyyy hh24:mi:ss') start_date_time, \r\n\t\ttime_remaining\/60 remain,\r\n\t\tto_char(sysdate + TIME_REMAINING\/3600\/24, 'dd\/mm\/yyyy hh24:mi:ss') end_time\r\n\tfrom gv$session_longops\t\r\n\t\twhere sofar < totalwork\r\n\/\r\n<\/pre>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>set linesize 200 SET PAGESIZE 9999 SET VERIFY OFF COLUMN INST_ID FORMAT 9999 HEADING &#8216;INST&#8217; COLUMN sid_serial FORMAT a15 HEADING &#8216;SID \/ Serial#&#8217; COLUMN opname FORMAT a30 HEADING &#8216;Op Name&#8217; COLUMN username FORMAT a15 HEADING &#8216;Username&#8217; COLUMN target FORMAT a30 HEADING &#8216;Target&#8217; COLUMN done FORMAT 99.99 HEADING &#8216;% completed&#8217; COLUMN start_date_time FORMAT a20 HEADING &#8216;Start [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":37,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-139","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P2NVny-2f","_links":{"self":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=139"}],"version-history":[{"count":3,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/139\/revisions"}],"predecessor-version":[{"id":512,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/139\/revisions\/512"}],"up":[{"embeddable":true,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/37"}],"wp:attachment":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}