{"id":880,"date":"2014-01-17T16:21:36","date_gmt":"2014-01-17T08:21:36","guid":{"rendered":"http:\/\/j178.mtgbb.com\/?p=880"},"modified":"2014-01-17T16:25:44","modified_gmt":"2014-01-17T08:25:44","slug":"lost-oracle-sys-and-system-password","status":"publish","type":"post","link":"https:\/\/j178.mtgbb.com\/?p=880","title":{"rendered":"Lost Oracle SYS and SYSTEM password?"},"content":{"rendered":"<p>\u8cc7\u6599\u4f86\u6e90\uff1a<a href=\"http:\/\/rolfje.wordpress.com\/2007\/01\/16\/lost-oracle-sys-and-system-password\/\" target=\"_blank\">\u9019\u88e1<\/a><\/p>\n<p>If your administration is as good as anybodies, you are bound to loose the not-so-frequently used password for the SYS and SYSTEM users of oracle. Here are a few ways I found to re-set those passwords:<\/p>\n<p><!--more--><\/p>\n<p><strong>Method 1: SQLPLUS (Tested on AIX Oracle 9.2.0.1.0)<\/strong><\/p>\n<p>Log into the database server as a user belonging to \u2018dba\u2019 [unix ] or \u2018ora_dba\u2019 [windows ] group , typically \u2018oracle\u2019, or an administrator on your windos machine. You are able to log into Oracle as SYS user, and change the SYSTEM password by doing the following:<\/p>\n<p>$ sqlplus &#8220;\/ as sysdba&#8221;<br \/>\nSQL*Plus: Release 9.2.0.1.0 &#8211; Production on Mon Apr 5 15:32:09 2004<\/p>\n<p>Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.<\/p>\n<p>Connected to:<br \/>\nOracle9i Enterprise Edition Release 9.2.0.1.0 &#8211; Production<br \/>\nWith the OLAP and Oracle Data Mining options<br \/>\nJServer Release 9.2.0.1.0 &#8211; Production<\/p>\n<p>SQL&gt; show user<\/p>\n<p>USER is &#8220;SYS&#8221;<\/p>\n<p>SQL&gt; passw system<br \/>\nChanging password for system<br \/>\nNew password:<br \/>\nRetype new password:<br \/>\nPassword changed<br \/>\nSQL&gt; quit<\/p>\n<p>Next, we need to change the password of SYS:<\/p>\n<p>$ sqlplus &#8220;\/ as system&#8221;<br \/>\nSQL*Plus: Release 9.2.0.1.0 &#8211; Production on Mon Apr 5 15:36:45 2004<\/p>\n<p>Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.<\/p>\n<p>SP2-0306: Invalid option.<br \/>\nUsage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]<br \/>\nwhere ::= [\/][@&lt;connect_string&gt;] | \/<br \/>\nEnter user-name: system<br \/>\nEnter password:<\/p>\n<p>Connected to:<br \/>\nOracle9i Enterprise Edition Release 9.2.0.1.0 &#8211; Production<br \/>\nWith the OLAP and Oracle Data Mining options<br \/>\nJServer Release 9.2.0.1.0 &#8211; Production<\/p>\n<p>SQL&gt; passw sys<br \/>\nChanging password for sys<br \/>\nNew password:<br \/>\nRetype new password:<br \/>\nPassword changed<br \/>\nSQL&gt; quit<\/p>\n<p>You should now be able to log on the SYS and SYSTEM users, with the passwords you just typed in.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Method 2: Creating pwd file (Tested on Windows Oracle 8.1.7)<\/strong><\/p>\n<ul>\n<li>Stop the Oracle service of the instance you want to change the passwords of.<\/li>\n<li>Find the PWD###.ora file for this instance, this is usuallly located atC:\\oracle\\ora81\\database\\, where ### is the SID of your database.<\/li>\n<li>rename the PWD###.ora file to PWD###.ora.bak for obvious safety reasons.<\/li>\n<li>Create a new pwd file by issuing the command:<br \/>\norapwd file=C:\\oracle\\ora81\\database\\PWD###.ora password=XXXXX<br \/>\nwhere ### is the SID and XXXXX is the password you would like to use for the SYS and INTERNAL accounts.<\/li>\n<li>Start the Oracle service for the instance you just fixed. You should be able to get in with the SYS user and change other passwords from there.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u8cc7\u6599\u4f86\u6e90\uff1a\u9019\u88e1 If your administration is as good as anybodies, &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,12],"tags":[23],"class_list":["post-880","post","type-post","status-publish","format-standard","hentry","category-oracle-erp","category-database","tag-oracle-db"],"_links":{"self":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts\/880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=880"}],"version-history":[{"count":0,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts\/880\/revisions"}],"wp:attachment":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}