Topic: Database Administration >> Password File
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Kaiz |
Posted: Jan 04, 2008 09:15:33 AM |
Total Post: 104
Joined: Sep, 2007
|
Dear Friends,
When we create a password file.....
$orapwd file=$ORACLE_HOME/dbs/orapwDB01
password=orapass entries=5
You created a user and granted only the SYSDBA privilege to that user as follows:
CREATE USER dba_user
IDENTIFIED BY dba_pass;
GRANT sysdba TO dba_user;
The user attempts to connect to the database as follows:
connect dba_user/orapass as sysdba;
Beacuse - The user did not provide the password dba_pass to connect as SYSDBA.
Than why we give in password file the orapass password....
Please can someone clearify....With Regards
|
|
|
MOH_DBA |
| Posted: Jan 04, 2008 04:40:29 PM | |
|
Total Post: 133
Joined: Nov, 2007
|
I hope that will help you to understand the relation. if it did not plz tell me so.
Your Answer:
the sysdba trick is generally used to allow other NON-SYS users to connect btw, best to
use your OWN account that has been granted sysdba!
Anyway, hopeful this will clear up the confusion and show how this works:
$ orapwd file=orapw password=foobar entries=40
I just recreated my password file with a password foobar. My sys password is NOT
foobar
$ svrmgrl
SVRMGR> connect internal
Connected.
SVRMGR> startup
ORACLE instance started.
Total System Global Area 193073136 bytes
Fixed Size 69616 bytes
Variable Size 141639680 bytes
Database Buffers 45056000 bytes
Redo Buffers 6307840 bytes
Database mounted.
Database opened.
SVRMGR> connect sys/change_on_install@ora816dev
Connected.
that works OK, lets try as sysdba:
SVRMGR> connect sys/change_on_install@ora816dev as sysdba;
ORA-01017: invalid username/password; logon denied
there I got your error. My SYS password is change_on_install but the password file has
foobar in it. SYS is special -- sys connecting as sysdba is like internal -- you have to
use the password file password! Lets try that:
SVRMGR> connect sys/foobar@ora816dev as sysdba;
Connected.
SVRMGR> grant sysdba to scott;
Statement processed.
now, we'll see this does not hold true for other users:
SVRMGR> connect scott/tiger@ora816dev as sysdba;
Connected.
That worked great, now lets just modify sys's password (not really, didn't change it
but Oracle won't notice that
SVRMGR> alter user sys identified by change_on_install;
Statement processed.
SVRMGR> connect sys/change_on_install@ora816dev as sysdba;
Connected.
SVRMGR>
Hey, now we can use change_on_install -- that is because altering SYS's password will
sync up the password in the password file -- sys is a very very close cousin of INTERNAL.
sys's password will be burned into the password file now. the password foobar is
obsolete
SVRMGR> connect sys/foobar@ora816dev as sysdba;
ORA-01017: invalid username/password; logon denied
SVRMGR>
|
|
|
|
|
Mohammed Taj |
| Posted: Jan 04, 2008 11:44:16 PM | |
|
Total Post: 746
Joined: Jul, 2007
|
There is two user authentication method.
1. password file
2. os authentication
1. if you create password file then your using password file authentication method. otherwise you have to use OS authentication method.
NOTE: whenever you connect to database with any user with 'sysdba' privileges then connected user is only "sys".
like
SQL> select username from dba_users where username in ('A','B','C');
no rows selected
SQL> conn a/a as sysdba
Connected.
user "a,b,c" user doesn't exist in database but when i connect with them as sysdba i got connected becuase i am connect with "sys" not "a,b,c" user.
SQL> show user
USER is "SYS"
SQL> conn b/b as sysdba
Connected.
SQL> show user
USER is "SYS"
SQL> conn c/c as sysdba
Connected.
SQL> show user
USER is "SYS"
|
|
|
|
|
Kaiz |
| Posted: Jan 07, 2008 12:36:14 PM | |
|
Total Post: 104
Joined: Sep, 2007
|
Great Answers Thanks... You people seems to have answer for everything.... Great Work , Really appreciate it...
With Regards
Kaiz Ali
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 816 |
| Mohammed Taj | 746 |
| Jayanta Sur | 479 |
| positive fanatic | 418 |
| Vigyan Kaushik | 386 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 250 |
| Ramesh Jois | 245 |
| neeraj sharma | 243 |
| Bishal Khetan | 207 |
|
|