前提:你有apps的数据库账户,想知道某个用户的密码,因为fnd_user中的密码为加密的,所以无法看懂,你可以尝试用下边的方式来查看用户密码。
SQL> desc fnd_user; Name Null? Type ----------------------------------------- -------- ---------------- USER_ID NOT NULL NUMBER(15) USER_NAME NOT NULL VARCHAR2(100) LAST_UPDATE_DATE NOT NULL DATE LAST_UPDATED_BY NOT NULL NUMBER(15) CREATION_DATE NOT NULL DATE CREATED_BY NOT NULL NUMBER(15) LAST_UPDATE_LOGIN NUMBER(15) ENCRYPTED_FOUNDATION_PASSWORD NOT NULL VARCHAR2(100) ENCRYPTED_USER_PASSWORD NOT NULL VARCHAR2(100) ...
1.创建Package,这个package会调用内部的解码类
--创建Package声明 CREATE OR REPLACE PACKAGE get_pwd AS FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2) RETURN VARCHAR2; END get_pwd; / --创建Package Body CREATE OR REPLACE PACKAGE BODY get_pwd AS FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String'; END get_pwd; /2.查询用户
--Query to execute SELECT usr.user_name, get_pwd.decrypt ((SELECT (SELECT get_pwd.decrypt (fnd_web_sec.get_guest_username_pwd, usertable.encrypted_foundation_password ) FROM DUAL) AS apps_password FROM apps.fnd_user usertable WHERE usertable.user_name = (SELECT SUBSTR (fnd_web_sec.get_guest_username_pwd, 1, INSTR (fnd_web_sec.get_guest_username_pwd, '/' ) - 1 ) FROM DUAL)), usr.encrypted_user_password ) PASSWORD FROM apps.fnd_user usr WHERE usr.user_name = '&USER_NAME';
转载请注明出处:http://blog.csdn.net/pan_tian/article/details/7692244