{"id":148,"date":"2012-03-02T00:57:09","date_gmt":"2012-03-02T00:57:09","guid":{"rendered":"http:\/\/oranotes.tuktaroff.com\/?page_id=148"},"modified":"2013-08-29T05:52:12","modified_gmt":"2013-08-29T05:52:12","slug":"one-user","status":"publish","type":"page","link":"http:\/\/oranotes.tuktaroff.com\/?page_id=148","title":{"rendered":"One user"},"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<h2>\nAccount details<br \/>\n<\/h2>\n<pre class=\"qcode\">\r\nSET LINESIZE 145\r\nSET PAGESIZE 9999\r\nSET VERIFY   off\r\n\r\nCOLUMN username              FORMAT a15    HEAD 'Username'\r\nCOLUMN account_status        FORMAT a17    HEAD 'Status'\r\nCOLUMN expiry_date           FORMAT a20    HEAD 'Expire Date'\r\nCOLUMN default_tablespace    FORMAT a25    HEAD 'Default Tbs.'\r\nCOLUMN temporary_tablespace  FORMAT a10    HEAD 'Temp Tbs.'\r\nCOLUMN created               FORMAT a20    HEAD 'Created On'\r\nCOLUMN profile               FORMAT a10    HEAD 'Profile'\r\nCOLUMN sysdba                FORMAT a6     HEAD 'SYSDBA'\r\nCOLUMN sysoper               FORMAT a7     HEAD 'SYSOPER'\r\n\r\nSELECT distinct\r\n    a.username                                       username\r\n  , a.account_status                                 account_status\r\n  , TO_CHAR(a.expiry_date, 'DD-MON-YYYY HH24:MI:SS') expiry_date\r\n  , a.default_tablespace                             default_tablespace\r\n  , a.temporary_tablespace                           temporary_tablespace\r\n  , TO_CHAR(a.created, 'DD-MON-YYYY HH24:MI:SS')     created\r\n  , a.profile                                        profile\r\n  , DECODE(p.sysdba,'TRUE', 'TRUE','')               sysdba\r\n  , DECODE(p.sysoper,'TRUE','TRUE','')               sysoper\r\nFROM\r\n    dba_users       a\r\n  , v$pwfile_users  p\r\nWHERE\r\n    p.username (+) = a.username \r\n  and UPPER(a.username) like '%&USERNAME%'\r\nORDER BY username\r\n\/\r\n<\/pre>\n<form action=\"\"><textarea name=\"data\" cols=\"50\" rows=\"10\" style=\"display:none;\"><br \/>\nSET LINESIZE 145<br \/>\nSET PAGESIZE 9999<br \/>\nSET VERIFY   off<\/p>\n<p>COLUMN username              FORMAT a15    HEAD 'Username'<br \/>\nCOLUMN account_status        FORMAT a17    HEAD 'Status'<br \/>\nCOLUMN expiry_date           FORMAT a20    HEAD 'Expire Date'<br \/>\nCOLUMN default_tablespace    FORMAT a25    HEAD 'Default Tbs.'<br \/>\nCOLUMN temporary_tablespace  FORMAT a10    HEAD 'Temp Tbs.'<br \/>\nCOLUMN created               FORMAT a20    HEAD 'Created On'<br \/>\nCOLUMN profile               FORMAT a10    HEAD 'Profile'<br \/>\nCOLUMN sysdba                FORMAT a6     HEAD 'SYSDBA'<br \/>\nCOLUMN sysoper               FORMAT a7     HEAD 'SYSOPER'<\/p>\n<p>SELECT distinct<br \/>\n    a.username                                       username<br \/>\n  , a.account_status                                 account_status<br \/>\n  , TO_CHAR(a.expiry_date, 'DD-MON-YYYY HH24:MI:SS') expiry_date<br \/>\n  , a.default_tablespace                             default_tablespace<br \/>\n  , a.temporary_tablespace                           temporary_tablespace<br \/>\n  , TO_CHAR(a.created, 'DD-MON-YYYY HH24:MI:SS')     created<br \/>\n  , a.profile                                        profile<br \/>\n  , DECODE(p.sysdba,'TRUE', 'TRUE','')               sysdba<br \/>\n  , DECODE(p.sysoper,'TRUE','TRUE','')               sysoper<br \/>\nFROM<br \/>\n    dba_users       a<br \/>\n  , v$pwfile_users  p<br \/>\nWHERE<br \/>\n    p.username (+) = a.username<br \/>\n  and UPPER(a.username) like '%&USERNAME%'<br \/>\nORDER BY username<br \/>\n\/<br \/>\n<\/textarea><input type=\"button\" value=\"Clipboard\" onclick=\"copy(this.form.data)\"><\/form>\n<h2>\nExtract user password<br \/>\n<\/h2>\n<pre class=\"qcode\">\r\nselect  extract(xmltype(dbms_metadata.get_xml('USER',username)),'\/\/USER_T\/PASSWORD\/text()').getStringVal()\r\n from  dba_users where upper(username) = upper('%&USERNAME%');\r\n<\/pre>\n<form action=\"\"><textarea name=\"data\" cols=\"50\" rows=\"10\" style=\"display:none;\"><br \/>\nselect  extract(xmltype(dbms_metadata.get_xml('USER',username)),'\/\/USER_T\/PASSWORD\/text()').getStringVal()<br \/>\nfrom  dba_users where upper(username) = upper('%&USERNAME%');<br \/>\n<\/textarea><input type=\"button\" value=\"Clipboard\" onclick=\"copy(this.form.data)\"><\/form>\n<h2>\nExtract user password in CREATE USER command<br \/>\n<\/h2>\n<pre class=\"qcode\">\r\nselect 'alter user \"'||username||'\" identified by values '''||extract(xmltype(dbms_metadata.get_xml('USER',username)),\r\n'\/\/USER_T\/PASSWORD\/text()').getStringVal()||''';'  \r\n\told_password from  dba_users where upper(username) = upper('%&USERNAME%');\r\n<\/pre>\n<form action=\"\"><textarea name=\"data\" cols=\"50\" rows=\"10\" style=\"display:none;\"><br \/>\nselect 'alter user \"'||username||'\" identified by values '''||extract(xmltype(dbms_metadata.get_xml('USER',username)),<br \/>\n'\/\/USER_T\/PASSWORD\/text()').getStringVal()||''';'<br \/>\n\told_password from  dba_users where upper(username) = upper('%&USERNAME%');<br \/>\n<\/textarea><input type=\"button\" value=\"Clipboard\" onclick=\"copy(this.form.data)\"><\/form>\n<p><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Account details SET LINESIZE 145 SET PAGESIZE 9999 SET VERIFY off COLUMN username FORMAT a15 HEAD &#8216;Username&#8217; COLUMN account_status FORMAT a17 HEAD &#8216;Status&#8217; COLUMN expiry_date FORMAT a20 HEAD &#8216;Expire Date&#8217; COLUMN default_tablespace FORMAT a25 HEAD &#8216;Default Tbs.&#8217; COLUMN temporary_tablespace FORMAT a10 HEAD &#8216;Temp Tbs.&#8217; COLUMN created FORMAT a20 HEAD &#8216;Created On&#8217; COLUMN profile FORMAT a10 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":72,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-148","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P2NVny-2o","_links":{"self":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/148","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=148"}],"version-history":[{"count":5,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/148\/revisions"}],"predecessor-version":[{"id":463,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/148\/revisions\/463"}],"up":[{"embeddable":true,"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=\/wp\/v2\/pages\/72"}],"wp:attachment":[{"href":"http:\/\/oranotes.tuktaroff.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}