cancel
Showing results for 
Search instead for 
Did you mean: 

Database need password to access

SOLVED
Go to solution
Jacky Wong_1
Occasional Advisor

Database need password to access

Dear All,
I have a database but when I try to connect it, it show I need to input the password. Unluckily, I don't know the password.
I have "system" account password. How can I know what user name of this database, it own by which user account and how to check or change the password. I am using a Oracle 8.0.5 with Unix 11.0. Below is the screen display error:

SQL> connect mbov
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
Jacky Wong
12 REPLIES
Steven Sim Kok Leong
Honored Contributor

Re: Database need password to access

Hi,

# svrmgrl
SVRMGR> connect internal
SVRMGR> select username from dba_users;
SVRMGR> alter user identified by "";

Replace with the username you lost the password and with the new password.

Hope this helps. Regards.

Steven Sim Kok Leong
Email: steven@beepz.com. Homepage: https://www.beepz.com
Jacky Wong_1
Occasional Advisor

Re: Database need password to access

But I don't know the what username can connect this database "mbov". Because it only prompt to input password. Any place I can check the information of it.

SQL> connect mbov
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied

Regards,

Jacky
Jacky Wong
Alexander M. Ermes
Honored Contributor

Re: Database need password to access

Hi there.
Do not start sqlplus. Go for the svrmgr ( servermanager ) in line mode. On the prompt svrmgr> you should type in :
connect internal
After this you should be able to change the user data.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
John Strang
Regular Advisor

Re: Database need password to access

Hi Jacky,

In the example you gave
SQL> connect mbov

This means connect to the database as user mbov

It does not mean connect to a database called mbov

Steven has already given the commands to find the list of users in the database, and how to alter the pasword of a user.

When you have found the users and set the password of a user, you will then be able to connect as that user as follows

SQL> connect user/password

HTH,

John
If you never make a mistake you'll never make anything.
Eric Ladner
Trusted Contributor

Re: Database need password to access

To connect to oracle without the password, you have to be logged in as the owner of the database (usually oracle), or someone in the dba group.

Then, you can enter one of two ways:

Via svrmgrl (as shown above) or like this:

sqlplus /

Then, you can alter the users password as shown above.

If you cannot become the oracle user or do not have membership in the oracle dba group, you need the assistance of your DBA.
Ian Dennison_1
Honored Contributor

Re: Database need password to access

There are a couple of methods you can use,..

1. set ORACLE_SID in the UNIX environment to the SID to be connected to (mbov).

2. Run 'sqlplus system/[password]@mbov'

Share and Enjoy! Ian
Building a dumber user
A. Clay Stephenson
Acclaimed Contributor

Re: Database need password to access

Hi:

Steven has given you the correct answer. If you are logged in to the system as user oracle or a member od the dba group, you are allowed to simply do a connect internal. The 'internal' user is a special login.
If it ain't broke, I can fix that.
Jacky Wong_1
Occasional Advisor

Re: Database need password to access

But when I follow Steven's instruction. I got below error message:

Oracle Server Manager Release 3.0.5.0.0 - Production

(c) Copyright 1997, Oracle Corporation. All Rights Reserved.

Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
PL/SQL Release 8.0.5.0.0 - Production

SVRMGR> connect internal
Connected.
SVRMGR> select username from dba_users;
select username from dba_users
*
ORA-01219: database not open: queries allowed on fixed tables/views only

Why??? Please suggest some idea.
Jacky Wong
Steven Sim Kok Leong
Honored Contributor

Re: Database need password to access

Hi,

Are you logged onto your oracle account? Is your database already started up? Try this:

# su - oracle
u1/> $ORACLE_HOME/bin/svrmgrl
SVRMGR> connect internal
SVRMGR> startup
SVRMGR> select username from dba_users;
SVRMGR> alter user identified by "";

If your database is already started up, startup will fail, otherwise your database will now startup.

Hope this helps. Regards.

Steven Sim Kok Leong
Email: steven@beepz.com. Homepage: https://www.beepz.com
Jacky Wong_1
Occasional Advisor

Re: Database need password to access

Dear Sir,
I already follow your instruction but still got the same error message:

# su - oracle
$ svrmgrl

SVRMGR> connect internal
Connected.
SVRMGR> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SVRMGR> select username from dba_users;
select username from dba_users
*
ORA-01219: database not open: queries allowed on fixed tables/views only
SVRMGR>

Any idea?
Jacky Wong
Eric Ladner
Trusted Contributor
Solution

Re: Database need password to access

In that case, the database was not shut down correctly.

Issue a 'shutdown abort' (check a 'ps -eaf | grep ora_' first to make sure all the database processes are really dead already'). After it says database shutdown, type startup. The database should start in a few seconds, then you can try the select statement, which should work.

If none of that works, exit out of svrmgrl and

echo $ORACLE_HOME
echo $ORACLE_SID

and see if it prints stuff that looks reasonable. If not, set these environment variables first, then re-run svrmgrl. These environment variables MUST BE CORRECT.
Steven Sim Kok Leong
Honored Contributor

Re: Database need password to access

Hi,

The database is not opened. What does the below statement show:

SVRMGR> select status from v$instance;

Try shutting down (clean shutdown) and restarting (clean startup) the oracle instance:

SVRMGR> shutdown normal
SVRMGR> startup

Hope this helps. Regards.

Steven Sim Kok Leong
Email: steven@beepz.com. Homepage: https://www.beepz.com