关闭

Oracle EBS R12如何更改SYSADMIN的密码

标签: EBSDBA
153人阅读 评论(0) 收藏 举报
分类:


测试环境:
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE    11.1.0.7.0      Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production

SQL> select release_name from fnd_product_groups;

RELEASE_NAME
--------------------------------------------------
12.1.1

SQL>


1.更改sysadmin密码
1.1 如果有shell密码,可通过CPASS工具进行更改:
FNDCPASS apps/appspwd 0 Y system/manager USER SYSADMIN newspassword

演示:
-bash-3.2$ FNDCPASS apps/apps 0 Y system/manager USER SYSADMIN welcome1
Log filename : L5818900.log


Report filename : O5818900.out


1.2 如果有apps密码,可通过fnd_user_pkg存储过程进行更改:
declare
   l_flag  boolean; 注意要符合系统规则,否则不会报异常,也不成功
begin
  l_flag = fnd_user_pkg. ChangePassword (‘SYSADMIN’,'newpassword');
end;

演示:
SQL> set serveroutput on
SQL> DECLARE
  2    l_flag   BOOLEAN;
  3  BEGIN
  4    l_flag := fnd_user_pkg.changepassword ('sysadmin', 'welcome2');
  5    DBMS_OUTPUT.put_line (   'l_flag = '
  6                          || CASE l_flag
  7                               WHEN TRUE
  8                                 THEN 'true'
  9                               ELSE 'false'
 10                             END
 11                         );
 12  END;
 13  /
l_flag = true

PL/SQL procedure successfully completed.

SQL> commit; --不要忘了提交,不然不生效

Commit complete.

SQL>


2.验证登录密码是否正确
2.1 通过fnd_user_pkg.validatelogin进行验证:
演示:
SQL> DECLARE
  2    l_flag   BOOLEAN;
  3  BEGIN
  4    l_flag := fnd_user_pkg.validatelogin ('sysadmin', 'welcome2');
  5    DBMS_OUTPUT.put_line (   'l_flag = '
  6                          || CASE l_flag
  7                               WHEN TRUE
  8                                 THEN 'true'
  9                               ELSE 'false'
 10                             END
 11                         );
 12  END;
 13  /
l_flag = true

PL/SQL procedure successfully completed.

SQL>


2.2 通过fnd_web_sec.validate_login过程进行验证:
演示:
SQL> SELECT fnd_web_sec.validate_login ('sysadmin', 'welcome2') FROM DUAL;

FND_WEB_SEC.VALIDATE_LOGIN('SYSADMIN','WELCOME2')
--------------------------------------------------------------------------------
Y

SQL>


REF:
1. Oracle Apps R12 Change sysadmin password from sqlplus
http://mtalmasri.blogspot.com/2011/01/oracle-apps-r12-change-sysadmin.html

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:7188次
    • 积分:432
    • 等级:
    • 排名:千里之外
    • 原创:37篇
    • 转载:3篇
    • 译文:0篇
    • 评论:0条
    文章分类