Translate

Saturday, March 3, 2018

Query to get All Users Responsibilities

  SELECT fu.user_name "User Name",
         (SELECT full_name
            FROM per_all_people_f
           WHERE     SYSDATE BETWEEN effective_start_date
                                 AND effective_end_date
                 AND employee_id = person_id)
            "Employee Name",
         fu.START_DATE "User Starting Date",
         fu.END_DATE "User End Date",
         frt.responsibility_name "Responsibility Name",
         furg.start_date "Start Date",
         furg.end_date "End Date",
         fr.responsibility_key "Responsibility Key",
         fa.application_short_name "Application Short Name",
         fat.application_name
    FROM fnd_user_resp_groups_direct furg,
         applsys.fnd_user fu,
         applsys.fnd_responsibility_tl frt,
         applsys.fnd_responsibility fr,
         applsys.fnd_application_tl fat,
         applsys.fnd_application fa
   WHERE     furg.user_id = fu.user_id
         AND furg.responsibility_id = frt.responsibility_id
         AND fr.responsibility_id = frt.responsibility_id
         AND fa.application_id = fat.application_id
         AND fr.application_id = fat.application_id
         AND frt.language = USERENV ('LANG')
         AND fat.language = USERENV ('LANG')
ORDER BY 1

Tuesday, January 9, 2018

Changing oracle user password FND_USER_PKG.CHANGEPASSWORD

DECLARE
   v_user_name      VARCHAR2 (30) := UPPER ('&user_name');
   v_new_password   VARCHAR2 (30) := '&new_password';
   v_status         BOOLEAN;
BEGIN
   v_status :=
      fnd_user_pkg.ChangePassword (username      => v_user_name,
                                   newpassword   => v_new_password);

   IF v_status = TRUE
   THEN
      DBMS_OUTPUT.put_line (
         'The password reset successfully for the User:' || v_user_name);
      COMMIT;
   ELSE
      DBMS_OUTPUT.put_line (
            'Unable to reset password due to'
         || SQLCODE
         || ' '
         || SUBSTR (SQLERRM, 1, 100));
      ROLLBACK;
   END IF;
END;

Featured Post

To Add user Responsibility like another user

DECLARE    lc_user_name              VARCHAR2 (100) := 'ALI';    lc_resp_appl_short_name   VARCHAR2 (100) := 'SYSADMIN'; ...