Auto-generate Flow Chart from Java/C++ Codes:

Raptor Flowchart Tutorial For Beginners

Monday, November 26, 2012

Simple Way To Reset Oracle Database SYSTEM Password



Cara Mudah Untuk Reset Oracle Database SYSTEM Password

Sudah menjadi kelaziman, para administrator kadang-kadang terlupa password yang dibuat untuk SYSTEM (SYS dan SYSDBA) bagi Oracle Database.

Blog berikut memberikan panduan menghadapinya bagi:
1) Sistem Linux
2) Sistem Windows

=======================================================
SISTEM LINUX 
sumber: http://rolfje.wordpress.com/2007/01/16/lost-oracle-sys-and-system-password/


Lost Oracle SYS and SYSTEM password?

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:
Method 1: SQLPLUS (Tested on AIX Oracle 9.2.0.1.0)
Log into the database server as a user belonging to ‘dba’ [unix ] or ‘ora_dba’ [windows ] group , typically ‘oracle’, 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:
$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Apr 5 15:32:09 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

SQL> show user

USER is "SYS"

SQL> passw system
Changing password for system
New password:
Retype new password:
Password changed
SQL> quit

Next, we need to change the password of SYS:
$ sqlplus "/ as system"
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Apr 5 15:36:45 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where   ::= [/][@] | /
Enter user-name: system
Enter password:

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

SQL> passw sys
Changing password for sys
New password:
Retype new password:
Password changed
SQL> quit
You should now be able to log on the SYS and SYSTEM users, with the passwords you just typed in.
Method 2: Creating pwd file (Tested on Windows Oracle 8.1.7)
  1. Stop the Oracle service of the instance you want to change the passwords of.
  2. Find the PWD###.ora file for this instance, this is usuallly located atC:\oracle\ora81\database\, where ### is the SID of your database.
  3. rename the PWD###.ora file to PWD###.ora.bak for obvious safety reasons.
  4. Create a new pwd file by issuing the command: 
    orapwd 
    file=C:\oracle\ora81\database\PWD###.ora password=XXXXX
    where ### is the SID and XXXXX is the password you would like to use for the SYS and INTERNAL accounts.
  5. 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.




=======================================================

SISTEM WINDOWS
sumber: http://www.componentworkshop.com/blog/2009/05/07/oracle-reset-forgottenunknown-system-password


If you have forgotten the SYSTEM password for an Oracle Database Server, you can reset it by logging in to Windows as Administrator and connecting to Oracle as sysdba. This tip explains how.
Great Book
For this to work you must be logged in to the Windows Server that is running Oracle as Administrator. Here are the steps to reset the password:
Start SQL*Plus 
(Start -> Programs -> Oracle – Instance Name -> Application Development -> SQL Plus).
At the login prompt, in the user-name field, type ”/as sysdba” (including the forward slash, but without the quotes). Click OK.
You are now connected as system with full DBA rights.
To reset the password of the SYSTEM password (or any other user password), run the following query:
alter user system identified by NewPasswordHere;
Change the password to whatever you want it to be. Note also that it doesn't need to be in single quotes, as you might expect. Hit ENTER to run the query and you should receive positive affirmation of the change:
“User altered.”
If you don't have SQL*Plus (for example, if you are using Oracle XE), open a console (Start -> Run -> type 'cmd.exe' followed by and then run sqlplus from the command line:
sqlplus / as sysdba
Once connected, use alter user as described above.
Apart from the more obvious uses, this tip is particularly useful if you’ve imported a database dump from another server and don’t know the system password.


No comments: