eh i know this is kindda stupid. but im a noob when it comes to oracle this kind of stuffs. ive installed SQL PLUS in my comp. im able to log into the SQL in the past. say, the last time was around 2-3 weeks ago. im not sure whether ive changed the username and the password. but i cant seem to be able to log into it anymore. does anyone knows is there any way to retrieve the username and the password without logging into the SQL first ?
You cannot retrieve passwords from Oracle, even if you logon as SYS AS SYSDBA (the root user.) This is because passwords are created using a one-way hashing algorithm and then discarded - the original password is never stored or retained by Oracle.
However, if you use Windows NT/2K/XP and you have ability to logon directly to the server, you are in luck. Just update your sqlnet.ora file to have SQLNET.AUTHENTICATION_SERVICES=(NTS), and make sure your Windows user is a member of the Windows user group ORA_DBA, then launch SQL*Plus from the DOS prompt and issue the command "CONNECT / AS SYSDBA". Viola! You're in as the root user without being prompted for a password (this is why most companies restrict who has operating system ability to logon to Oracle servers!) Now that you're in you can change the password for any given user X using the SQL*Plus command "PASSWORD X". Example, type PASSWORD MARKJ and press Return. It will prompt for the new password.
... then launch SQL*Plus from the DOS prompt and issue the command "CONNECT / AS SYSDBA". Viola! You're in as the root user without being prompted for a password (this is why most companies restrict who has operating system ability to logon to Oracle servers!) Now that you're in you can change the password for any given user X using the SQL*Plus command "PASSWORD X". Example, type PASSWORD MARKJ and press Return. It will prompt for the new password.
uh .. sorry about this. but how do i launch the sql from the dos prompt ?
cd\oracle\ora90\bin > then do i launch the sqlplusw or the sqlplus or something else to get into the root user?
Assuming Oracle 9i on Windows:
It is not mandatory to use the dos prompt u can launch sqlplus from double clicking the icon also.
Uername: /as sysdba
If its the same machine on which the db(single no other Oracle Db is present) resides then u don't need to give connection string.
then issue the following:
select username from dba_users;
select username from all_users;
U will get all the usernames present in ur DB.
Then u can very well alter any user and assign any passwrd of ur choice.
alter user scott identified by lion;
Default passwords are
Sys -> change_on_install
If u r working with oracle version lower than 9i
Svrmgrl would be another option for you where u need to connect internal
the default passwrd of internal is oracle.
Internal user has been removed in 9i.
SqlPlus is an exe just type and press enter key
u will come to
sorry, it does not need to be from DOS, but you can be more efficient from DOS as it has built-in command history buffers you can take advantage of. example, press up/down arrows to scroll through all of your prior SQL*Plus commands.
Anyways ... to launch from DOS prompt ... you don't need to change directory, so for simple example I will assume you are at C:\.
1. c:\> set oracle_sid=mysid
2. c:\> sqlplus /nolog
3. SQL> connect / as sysdba
if you have the env variable LOCAL setup, then you should not need to issue the first command (set oracle_sid=sid).
R u trying it from a client m/c or the server itself.
From the client m/c u probably are logging into the system with a different userid(OS userid) than the userid of the server(using which u installed the s/w). If u need to have windows authenticated users in the db there is a procedure for which I don't think u need it right a way.
Do one thing go to the server and issue /as sysdba
then u wil be able to get into the sql plus---this is the easiest option.