改密码为何报错

[复制链接]
查看11 | 回复9 | 2014-7-15 16:56:50 | 显示全部楼层 |阅读模式
SQL> alter user querydb identified by "xxxxx";
alter user querydb identified by "xxxxx"
*
ERROR at line 1:
ORA-28221: REPLACE not specified
密码快要过期,但改又改不了,真是急死人。
我查了一下alter user的语法,没有replace这一项啊。
我是通过dblink登录的,创建dblink的用户是querydb,不能改密码与这有关吗?
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
不要加引号。
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
最初由 cxy89173 发布
[B]不要加引号。 [/B]

不加不行啊
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
Cause: User is changing password but password verification function is turned on and the original password is not specified and the user does not have the alter user system privilege.
Action: Supply the original password
你有管理员权限吗,给他一个权限?我没用过dblink。。。。
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
最初由 cxy89173 发布
[B]Cause: User is changing password but password verification function is turned on and the original password is not specified and the user does not have the alter user system privilege.
Action: Supply the original password
你有管理员权限吗,给他一个权限?我没用过dblink。。。。 [/B]


You must have ALTER USER privilege.However, you can change yourown password without this privilege.
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
最初由 csq1980 发布
[B]SQL> alter user querydb identified by "xxxxx";
alter user querydb identified by "xxxxx"
*
ERROR at line 1:
ORA-28221: REPLACE not specified
密码快要过期,但改又改不了,真是急死人。
我查了一下alter user的语法,没有replace这一项啊。
我是通过dblink登录的,创建dblink的用户是querydb,不能改密码与这有关吗? [/B]

使用了profile作了限制了。自己修改密码需要指定原来的密码,就是防止有人在你登录后,偷偷给你修改了口令
可以:alter user username identified by newpass replace oldpass;
或者,让拥有alter user权限的用户给你重置一个新的密码
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
最初由 Toms_zhang 发布
[B]
使用了profile作了限制了。自己修改密码需要指定原来的密码,就是防止有人在你登录后,偷偷给你修改了口令
可以:alter user username identified by newpass replace oldpass;
或者,让拥有alter user权限的用户给你重置一个新的密码 [/B]

谢谢指点。
为什么我查看语法没有replace呢
ALTER USER user
[IDENTIFIED {BY password | EXTERNALLY}]
[DEFAULT TABLESPACE tablespace]
[TEMPORARY TABLESPACE tablespace]
[QUOTA {integer [K|M] | UNLIMITED} ON tablespace] ...
[PROFILE profile]
[DEFAULT ROLE { role [, role] ...

| ALL [EXCEPT role [, role] ...]

| NONE}]
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
最初由 csq1980 发布
[B]
谢谢指点。
为什么我查看语法没有replace呢
ALTER USER user
[IDENTIFIED {BY password | EXTERNALLY}]
[DEFAULT TABLESPACE tablespace]
[TEMPORARY TABLESPACE tablespace]
[QUOTA {integer [K|M] | UNLIMITED} ON tablespace] ...
[PROFILE profile]
[DEFAULT ROLE { role [, role] ...

| ALL [EXCEPT role [, role] ...]

| NONE}] [/B]

看这里
http://download-west.oracle.com/ ... /statements_44a.htm
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
最初由 Toms_zhang 发布
[B]
看这里
http://download-west.oracle.com/ ... /statements_44a.htm [/B]


还是官方的好!
回复

使用道具 举报

千问 | 2014-7-15 16:56:50 | 显示全部楼层
oracle还有这功能,真是没想到。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行