Change username in DBA_USERS
Change username in DBA_USERS 2005-10-02 - By Sunil Bhola
Hi Chirag, I have did the same as you did, but mine is working.. I think there is some problem with your end... Here is the case study : SQL> select name from v$database; NAME -- ---- ---- ---- ---- ---- VED SQL> select user#,name from user$ where name like 'SCO%'; USER# -- ---- -- NAME -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- 59 SCOTT SQL> update user$ set name='HERMESNEW' where user#=64; 0 rows updated. SQL> updated user$ set name='SUNIL' where user#=59; SP2-0734: unknown command beginning "updated us..." - rest of line ignored. SQL> update user$ set name='SUNIL' where user#=59; 1 row updated. SQL> commit; Commit complete. SQL> select user#,name from user$ where name like 'HER%'; no rows selected SQL> ed Wrote file afiedt.buf 1* select user#,name from user$ where name like 'SUN%' SQL> / USER# -- ---- -- NAME -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- 59 SUNIL SQL> alter user sunil identified by sunil; User altered. SQL> connect sunil/sunil Connected. SQL> QUERIES in Oracle, Feel free to Join: http://groups.yahoo.com/group/oracle_expert/ Regards, Sunil Bhola Oracle_Expert, Moderator Chirag DBA <chiragdba@(protected)> wrote: Hi, I am changing the name of user in USER$ table. SQL> select user#,name from user$ where name like 'SCO%'; USER# NAME -- ---- -- -- ---- ---- ---- ---- ---- -- 59 SCOTT 64 SCOTT1 SQL> update user$ set name='HERMESNEW' where user#=64; 1 row updated. SQL> commit; Commit complete. SQL> select user#,name from user$ where name like 'SCO%'; USER# NAME -- ---- -- -- ---- ---- ---- ---- ---- -- 59 SCOTT SQL> select user#,name from user$ where name like 'HER%'; USER# NAME -- ---- -- -- ---- ---- ---- ---- ---- -- 65 HERMES 64 HERMESNEW SQL> alter user hermesnew identified by chirag; User altered. SQL> conn hermesnew/chirag ERROR:ORA-01017 (See ORA-01017.ora-code.com ): invalid username/password; logon denied Warning: You are no longer connected to ORACLE. SQL> select username from dba_users; SP2-0640: Not connected SQL> conn / as sysdba Connected. SQL> select username from dba_users where username like 'HE%'; USERNAME -- ---- ---- ---- ---- ---- -- HERMES This seems not to be permanent. Which view will help me to change it permanently? Regards -- Chirag -- ---- ---- ---- ---- ---- ----- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. <DIV>Hi Chirag,</DIV> <DIV> </DIV> <DIV>I have did the same as you did, but mine is working.. I think there is some problem with your end... </DIV> <DIV> </DIV> <DIV>Here is the case study :</DIV> <DIV> </DIV> <DIV>SQL> select name from v$database;</DIV> <DIV>NAME<BR>-- ---- ---- ---- ---- ----<BR>VED</DIV> <DIV>SQL> select user#,name from user$ where name like 'SCO%';</DIV> <DIV> USER#<BR>-- ---- --<BR>NAME<BR>-- ---- ---- ----- -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----<BR> 59<BR>SCOTT</DIV> <DIV><BR>SQL> update user$ set name='HERMESNEW' where user#=64;</DIV> <DIV>0 rows updated.</DIV> <DIV>SQL> updated user$ set name='SUNIL' where user#=59;<BR>SP2-0734: unknown command beginning "updated us..." - rest of line ignored.<BR>SQL> update user$ set name='SUNIL' where user#=59;</DIV> <DIV>1 row updated.</DIV> <DIV>SQL> commit;</DIV> <DIV>Commit complete.</DIV> <DIV>SQL> select user#,name from user$ where name like 'HER%';</DIV> <DIV>no rows selected</DIV> <DIV>SQL> ed<BR>Wrote file afiedt.buf</DIV> <DIV> 1* select user#,name from user$ where name like 'SUN%'<BR>SQL> / </DIV> <DIV> USER#<BR>-- ---- --<BR>NAME<BR>-- ---- ---- ----- -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----<BR> 59<BR>SUNIL</DIV> <DIV><BR>SQL> alter user sunil identified by sunil;</DIV> <DIV>User altered.</DIV> <DIV>SQL> connect sunil/sunil<BR>Connected.<BR>SQL> </DIV> <DIV> </DIV> <DIV> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><STRONG><B><FONT face=Verdana color=#434343 size=3><SPAN style="FONT-SIZE: 12pt; COLOR: #434343; FONT-FAMILY: Verdana">QUERIES in Oracle, Feel free to Join:</SPAN></FONT></B></STRONG><?xml :namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o :p></P> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><STRONG><B><FONT face=Verdana size=3><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana"><A href="http:/ /groups.yahoo.com/group/oracle_expert/"><FONT color=#434343><SPAN style="COLOR: #434343">http://groups.yahoo.com/group/oracle_expert/</SPAN></FONT></A><FONT color=yellow><SPAN style="COLOR: yellow"> </SPAN></FONT></SPAN></FONT></B>< /STRONG><o:p></o:p></P> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><STRONG><B><FONT face=Verdana size=3><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Regards,</SPAN>< /FONT></B></STRONG><o:p></o:p></P> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><STRONG><B><FONT face=Verdana color=red><SPAN style="FONT-SIZE: 12pt; COLOR: red; FONT-FAMILY: Verdana">S< /SPAN></FONT></B></STRONG><STRONG><B><FONT face=Verdana size=3><SPAN style="FONT -FAMILY: Verdana">unil <FONT color=red><SPAN style="COLOR: red">B</SPAN></FONT >hola</SPAN></FONT></B></STRONG><o:p></o:p></P> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><STRONG><B><FONT face=Verdana> <SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Oracle_Expert, Moderator< /SPAN></FONT></B></STRONG><o:p></o:p></P> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size =2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o :p></SPAN></FONT></P><BR><BR><B><I>Chirag DBA <chiragdba@(protected)></I></B > wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER -LEFT: #1010ff 2px solid"> <DIV>Hi,</DIV> <DIV> </DIV> <DIV>I am changing the name of user in USER$ table.</DIV> <DIV> <P>SQL> select user#,name from user$ where name like 'SCO%';</P> <P> USER# NAME<BR>-- ---- -- -- ---- ---- ---- ---- --- ----<BR> 59 SCOTT<BR>   ; 64 SCOTT1</P></DIV> <DIV> <P>SQL> update user$ set name='HERMESNEW' where user#=64;</P> <P>1 row updated.</P> <P>SQL> commit;</P> <P>Commit complete.</P> <P>SQL> select user#,name from user$ where name like 'SCO%';</P> <P> USER# NAME<BR>-- ---- -- -- ---- ---- ---- ---- --- ----<BR> 59 SCOTT</P> <P>SQL> select user#,name from user$ where name like 'HER%';</P> <P> USER# NAME<BR>-- ---- -- -- ---- ---- ---- ---- --- ----<BR> 65 HERMES<BR> 64 HERMESNEW<BR></P> <P>SQL> alter user hermesnew identified by chirag;</P> <P>User altered.</P> <P>SQL> conn hermesnew/chirag<BR>ERROR:<BR>ORA-01017 (See ORA-01017.ora-code.com ): invalid username /password; logon denied</P> <P><BR>Warning: You are no longer connected to ORACLE.<BR>SQL> select username from dba_users;<BR>SP2-0640: Not connected<BR>SQL> conn / as sysdba <BR>Connected.</P> <P>SQL> select username from dba_users where username like 'HE%';</P> <P>USERNAME<BR>-- ---- ---- ---- ---- ---- --<BR>HERMES</P> <P> </P> <P>This seems not to be permanent. Which view will help me to change it permanently?</P> <P> </P> <P>Regards -- Chirag </P></DIV></BLOCKQUOTE><p> <hr size=1>Yahoo! for Good<br> <a href="http://store.yahoo.com/redcross-donate3/">Click here to donate</a> to the Hurricane Katrina relief effort.