TIP: How to change ORACLE INTERNAL password on windows operating system.
This short story will guide you step by step to
deal with the situation where you
lost your internal password or your password file is deleted by mistake then probably you
will get the following error
SVRMGR>
connect internal/oracle
ORA-01017:
invalid username/password; logon denied
Now what you will do ? How do you
login now ?
But do not panic, here are the some simple steps to do this critical but
simple task. In short we have to recreate our password file to
solve this.
STEP 1
:- Stop the Oracle Service which
is having problem.
On Windows
NT : Go to Start -> Settings ->
Control Panel -> Services and stop
the oracle service which is having a problem.

STEP 2: - Rename the existing password file.
Rename existing password file to some
other name. Password file is in ORACLE_HOME\DATABASE
directory
and it is in the format of PWD<ORACLESID>.ora .
If your SID is ORA816 and ORACLE_HOME is E:\ORA816 , you will found
the Password file in
E:\ORA816\database\PWDora816.ora.
Figure ii shows renaming of PWDora816.ora to OLDPWDora816.ora
(Figure ii)
Rename PWDora816.ora to OLDPWDora816.ora
Step 3: If you have multiple oracle home proceed with this step otherwise jump to
step 4.
In
case of multiple oracle home , invoke Oracle Home selector and select the
required
home of your instance as shown In figure (iii)

(
Figure iii Change the Oracle Home)
Now you are prepared to create a new password file with the OraPWD
utility.
C:\>orapwd
Usage: orapwd file=<fname>
password=<password> entries=<users>
where
file - name of
password file (mand),
password - password for SYS and INTERNAL
(mand),
entries - maximum number of distinct DBA and
OPERs (opt),
There are no spaces around the equal-to (=) character.
(i)
Set the oracle_sid as follows :-
C:\>SET ORACLE_SID=ora816
(ii) Now execute the orapwd to
create the password file as :-
C:\>Orapwd file=e:\ora816\Database\PWDora816.ora password=SAMDBA ENTRIES=10
The new password
for my internal account is now SAMDBA and new password file has created in
e:\ora816\database directory where e:\ora816 is my oracle home.
Password
may be any alphanumeric character of max 30 chars. It is always
advisable
to put password file in
oracle_home\database directory because this is
the
place where oracle looks for it.
Step 5: Automatic startup from services.
You have
created a password file in step 4 , but to tell the oracle services that you
have new password ,you have to run the oradim utility as follows :-.
C:\>oradim
ORADIM: <command>
[options]. Please refer to the manual.
Edit an instance by specifying the following
parameters:
-EDIT -SID sid [-NEWSID sid] [-INTPWD
password] [-STARTMODE auto|manual] [-PFILE filename]
[-SHUTMODE a|i|n] [-SHUTTYPE
srvc|inst|srvc,inst] [-TIMEOUT seconds]
C:\>oradim
-EDIT -SID ora816
-INTPWD SAMDBA
-STARTMODE auto
-pfile e:\ora816\database\initora816.ora
Make
sure you specified the correct oracle SID
and pfile location.
The
above command configure oracle services
to take care of new password and oracle
will
start automatically when services starts.
Start 6: Start the oracle
service from control panel
Step 7 : Test connection with new password.
Your new password
that is in our case SAMDBA is set now . you can test this by connecting
with svrmgrl
C:>SET
ORACLE_SID=ORA816
C:>svrmgrl
Svrmgr>connect internal/SAMDBA
Connected
Note :- If remote_login_passwordfile = EXCLUSIVE is set in init parameter file . You can change
The internal password by altering the sys password as alter user sys identified by samdba; But do not forget to do step 5.
Conclusion : By following
these steps it is very easy to change the oracle internal password , But be sure about your OS account as if someone login to OS server ,
can change the oracle password and break your security .
End of Tip
|
Welcome
to send comments or feedback at Wadhwa_s@Hotmail.com |
|
Sameer Wadhwa |
Copyright © Oracle Techniques All Rights Reserved
|