Changing password in SQL Plus?

Hello, silly question... I know... but I can't seem to get this to work... I looked it up on google and found the syntax:

Alter user username identified by "password";

But this doesn't work... when I put it in I get this error:
ERROR at line 1:
ORA-28221: REPLACE not specified

Can someone give me the exact syntax for this?

Thanks!
Roxanne25Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

schwertnerCommented:
as user SYS:

ALTER USER scott IDENTIFIED BY lion;

Sometimes by copy paste one get such strange errors.
0
Roxanne25Author Commented:
I don't have user sys... I'm logged into the oracle system with my login and I want to change my password as it is expiring soon and I have to change it.
0
schwertnerCommented:
You can alter his own password. But not others.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ZopiloteCommented:
Hi,
The REPLACE keyword is new to Oracle 9.2. In previous versions of Oracle, any user could change their password using the ALTER USER... statement. Keep in mind that this includes ALL users regardless if they have the ALTER USER system privilege

connect roxanne/roxannepwd;
alter user roxanne identified by newpass replace roxannepwd;


Z;D
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
oratimCommented:
from the SQL prompt type

SQL> password

you will be prompted to enter your old paswrod, then new password, the confirm new password
0
Roxanne25Author Commented:
Thanks Zopilote!  That was the thing I was missing! :)
0
Roxanne25Author Commented:
oratim,

That does not work for oracle 9i, sorry forgot to mention which version I was using.
0
ZopiloteCommented:
"The REPLACE keyword is new to Oracle 9.2. In previous versions of Oracle, any user could change their password using the ALTER USER... statement. Keep in mind that this includes ALL users regardless if they have the ALTER USER system privilege"
Extracted from Jeff Hunter's site. http://www.idevelopment.info/

Z;D
0
oratimCommented:
no problem

glad you got an answer

tim
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.