Friday, May 8, 2015

Ho to re-collect SYSADMIN password in EBS R12 :

Step 1: create package through apps user :-

SQL> CREATE OR REPLACE PACKAGE XXARTO_GET_PWD AS
FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
RETURN VARCHAR2;
END XXARTO_GET_PWD;  2    3    4
  5  /

Package created.

Step 2: create package body

SQL> CREATE OR REPLACE PACKAGE BODY XXARTO_GET_PWD AS
  2  FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
  3  RETURN VARCHAR2 AS
  4  LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt
  5  (java.lang.String,java.lang.String) return java.lang.String';
  6  END XXARTO_GET_PWD;
  7  /

Package body created.

Step 3:-

SQL> SELECT Usr.User_Name,
  2  Usr.Description,
  3  XXARTO_GET_PWD.Decrypt (
  4  (SELECT (SELECT XXARTO_GET_PWD.Decrypt (
  5  Fnd_Web_Sec.Get_Guest_Username_Pwd,
  6  Usertable.Encrypted_Foundation_Password)
  7  FROM DUAL)
  8  AS Apps_Password
  9  FROM applsys.Fnd_User Usertable
10  WHERE Usertable.User_Name =
11  (SELECT SUBSTR (
12  Fnd_Web_Sec.Get_Guest_Username_Pwd,
13  1,
14  INSTR (Fnd_Web_Sec.Get_Guest_Username_Pwd,
15  '/')
16  - 1)
17  FROM DUAL)),
18  Usr.Encrypted_User_Password)
19  Password
20  FROM applsys.Fnd_User Usr
21  WHERE Usr.User_Name = '&User_Name';
Enter value for user_name: SYSADMIN
old  21: WHERE Usr.User_Name = '&User_Name'
new  21: WHERE Usr.User_Name = 'SYSADMIN'

USER_NAME         DESCRIPTION             PASSWORD
-------------------    ------------------------      ---------------------------

SYSADMIN        System Administrator      svrprd6uk