Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Lost Oracle administrator username and password that run on Unix system

SOLVED
Go to solution
Jacky Wong_1
Occasional Advisor

Lost Oracle administrator username and password that run on Unix system

I lost Oracle administrator username and password but have Unix root administrator username and password. What can I do to get back the data inside the oracle? The oracle is 8.0.5 and run on Unix 10.0 Thnaks for your help.
Jacky Wong
15 REPLIES
Thierry Poels_1
Honored Contributor
Solution

Re: Lost Oracle administrator username and password that run on Unix system

Hi,

- login as root
- su - oracle
- svrmgrl
- connect interal
- and change password

(if you have a password file which disallows connect internal, you can recreate the password file when logged on as oracle)

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Jacky Wong_1
Occasional Advisor

Re: Lost Oracle administrator username and password that run on Unix system

Dear Thierry Poels ,

Thanks for your reply.But when I logon oracle by su username, do I need to provide password at the same time? Thanks for your help.
Jacky Wong
Printaporn_1
Esteemed Contributor

Re: Lost Oracle administrator username and password that run on Unix system

from root can su to any user without supply password.

su - oracle
(don't need password)
export ORACLE_SID=
svrmgrl
connect internal
alter user system identified by


enjoy any little thing in my life
T G Manikandan
Honored Contributor

Re: Lost Oracle administrator username and password that run on Unix system

Hello,
That is what Thierry is explaining.
Login as root.
issue
#passwd oracle
to change the password
or
#su - oracle
to change to oracle.
As this is super user you do not need permissions.

10 points to Thierry
Thanks
Jacky Wong_1
Occasional Advisor

Re: Lost Oracle administrator username and password that run on Unix system

And, how can I know that I succeed to change oracle administrator password?
Jacky Wong
Steven Sim Kok Leong
Honored Contributor

Re: Lost Oracle administrator username and password that run on Unix system

Hi,

Try using the changed password to connect either using sqldba or sqlplus.

I suppose you realised you had forgotten your password only after attempting an oracle connection right?

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Email: steven@beepz.com. Homepage: https://www.beepz.com
T G Manikandan
Honored Contributor

Re: Lost Oracle administrator username and password that run on Unix system

Hello,
login into oracle user.

echo $ORACLE_SID(test your ORACLE_SID)
$svrmgrl
SVRMGR>connect internal
The oracle administrator users are sys and system

to find the usernames
SVRMGR>select username from dba_users;

SVRMGR>alter user system identified by "";
The ouput will be "statement processed"

Then you can connect using the user 'system'.


Thanks
Jacky Wong_1
Occasional Advisor

Re: Lost Oracle administrator username and password that run on Unix system

Excuse me, Anyone know the backup or export oracle database method that can use simple command to backup and restore whole database. Where can I find some information for it? Many Thanks!
Jacky Wong
Steven Sim Kok Leong
Honored Contributor

Re: Lost Oracle administrator username and password that run on Unix system

Hi,

Here is the Oracle export/import FAQ:

http://www.orafaq.com/faqiexp.htm

For purpose of backup and restoration of Oracle databases, personally I prefer omniback which is more secure (encryption) and fast (software compression).

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Email: steven@beepz.com. Homepage: https://www.beepz.com
T G Manikandan
Honored Contributor

Re: Lost Oracle administrator username and password that run on Unix system

Hello,
It is good that you are backing up the database.
If it is a database of importance you/it cannot be backed up with the comments/commands,I am writing.
If the database is a normal one,then

You can do a cold backup of the database.
Cold back up is to shutdown the database and continue the back up.
ORACLE_SID='instance_name'
$svrmgrl
SVRMGR>connect internal
Before you shut down the database
query for the datafiles,logfiles,controlfile
of the database that requires backup.
SVRMGR>select name from v$datafile;
SVRMGR>select * from v$controlfile;
SVRMGR>select * from v$logfile;
The above queries will return the OS path where the files reside.Then,
SVRMGR>shutdown immediate;
Now use your OS 'cp' command to copy the files
to the other part of the disk or backup to the tape.
The above method applies if your database is running on noarhivelog.
SVRMGR>select log_mode from v$database;
If your database is running on archivelog,
then
you should also backup the archived-log files.

You can also use the export utility to backup the database

$$ORACLE_HOME/bin/exp "username/passwd"@"instance_name full=y file="path of the dump file".

Here the above syntax
full--->full backup
file--->path of the dump file.
This will export all the objects into a file which you can import it on another database with appropriate user.

So when you export check the tablespace_names,datafile-names,users on the database.
If problem exists then you can recreate the database if the same-tablespace,datafile and user names and import the dump file to restore the objects.

My post will not provide you proper understanding.Please refer to
backup and administrator guide.
The size of the file is 5MB.please give your mail address,I will mail it.
Also check your oracle cd for the documentation.

Your 20 points already given are enough for my posts


Thanks
Jacky Wong_1
Occasional Advisor

Re: Lost Oracle administrator username and password that run on Unix system

I got 2 problem now. Firstly, When I input the below command in svrmgrl prompt

svrmgrl>alter user system identified by 1234

Then press "enter", it only change to next new line and not run the command. How can I run this command. I want to change the system password to 1234.

Secondly, when I use cold backup in noarhivelog mode. Can I export the datafile only and import it in the new database? Cause I will install a new one and only need the old database data. Or I must export the old database datafile, logfile, controlfile and import all to new one?
Jacky Wong
Sanjay_6
Honored Contributor

Re: Lost Oracle administrator username and password that run on Unix system

Hi Jacky,

I think you should use ";" at the end of the command in "svrmgrl".

Hope this helps.

Regds
Jacky Wong_1
Occasional Advisor

Re: Lost Oracle administrator username and password that run on Unix system

But when I typing "alter user system identified 1234;"

The output is "ORA-00988:missing or invalid password(s)"

Why I cannot change the system account password?

Please help!
Jacky Wong
T G Manikandan
Honored Contributor

Re: Lost Oracle administrator username and password that run on Unix system

Hello,
Just change your password with
the password starting with a alphabet

ex:a1234
Then,
If your database is running on the noarchivelog mode then you can take a cold backup after shutting down the database.

cp the datafiles,logfiles,controlfile to different locations of your database.
So when you need to recreate database with the copied datafiles then you can point the database to look at these files where you copied.(may be on a second machine)
you can do this easily using the RMAN where you can duplicate your existing database to another machine.
Just check your manual.

Thanks
Lim Win Hwang
Occasional Visitor

Re: Lost Oracle administrator username and password that run on Unix system

If you would like to use "1234" as your password, then you can type this:
alter user system identified "1234";

Regards,
win