|
Тема |
Re: Oracle 9 - 2 passwords for SYS [re: legato] |
|
Автор | svircho (Нерегистриран) | |
Публикувано | 20.11.03 12:30 |
|
|
Eto ti veroqtnoto reshenie na problema:
--------------------------------------
what was the password you used when you created the password file and have you
tried that?
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>
-------------------------------------------------
Nadqvam se tova da pomogne
|
| |
|
|
|