Tuesday, February 27, 2018

How to update EBS XML Publisher Temporary Directory


SQL> select value from apps.XDO_CONFIG_VALUES WHERE  property_code = 'SYSTEM_TEMP_DIR';

VALUE
--------------------------------------------------------------------------------
/usr/tmp


SQL> update apps.XDO_CONFIG_VALUES set value='/u01/temp' WHERE  property_code = 'SYSTEM_TEMP_DIR';

1 row updated.

SQL> commit;

Commit complete.

SQL> select value from apps.XDO_CONFIG_VALUES WHERE  property_code = 'SYSTEM_TEMP_DIR';

VALUE
--------------------------------------------------------------------------------
/u01/temp

Add Responsibility to FND User

-- ----------------------------------------------------------
-- Add Responsibility to Oracle FND User
-- -----------------------------------------------------------
DECLARE
    lc_user_name                        VARCHAR2(100)    := 'KUMARV';
    lc_resp_appl_short_name   VARCHAR2(100)    := 'FND';
    lc_responsibility_key          VARCHAR2(100)    := 'APPLICATION_DEVELOPER';
    lc_security_group_key        VARCHAR2(100)    := 'STANDARD';
    ld_resp_start_date                DATE                        := TO_DATE('27-FEB-2018');
    ld_resp_end_date                 DATE                        := NULL;

BEGIN
     fnd_user_pkg.addresp
     (   username           => lc_user_name,
        resp_app             => lc_resp_appl_short_name,
        resp_key             => lc_responsibility_key,
        security_group  => lc_security_group_key,
        description         => NULL,
        start_date           => ld_resp_start_date,
        end_date            => ld_resp_end_date
    );

 COMMIT;

EXCEPTION
            WHEN OTHERS THEN
                        ROLLBACK;
                        DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
/

SHOW ERR;

Find Application Short Name for All Module


SELECT fa.application_id           "Application ID",
       fat.application_name        "Application Name",
       fa.application_short_name   "Application Short Name",
       fa.basepath                 "Basepath"
  FROM fnd_application     fa,
       fnd_application_tl  fat
 WHERE fa.application_id = fat.application_id
   AND fat.language      = USERENV('LANG')
   -- AND fat.application_name = 'Payables'  -- <change it>
 ORDER BY fat.application_name;

Sunday, February 25, 2018

Decrypt the Weblogic Password


1. Create a script decrypt_password.py in $DOMAIN_HOME/security directory and paste the following code into it:

from weblogic.security.internal import *
from weblogic.security.internal.encryption import *
encryptionService = SerializedSystemIni.getEncryptionService(".")
clearOrEncryptService = ClearOrEncryptedService(encryptionService)

# Take encrypt password from user
pwd = raw_input("Paste encrypted password ({AES}fk9EK...): ")

# Delete unnecessary escape characters
preppwd = pwd.replace("\\", "")

# Display password
print "Decrypted string is: " + clearOrEncryptService.decrypt(preppwd)

2. Set domain environment variables

source $DOMAIN_HOME/bin/setDomainEnv.sh

3. Get encrypted password, in this example from boot.properties file of AdminServer

#Username:
grep username $DOMAIN_HOME/servers/AdminServer/security/boot.properties | sed -e "s/^username=\(.*\)/\1/"

#Password:
grep password $DOMAIN_HOME/servers/AdminServer/security/boot.properties | sed -e "s/^password=\(.*\)/\1/"


4. Navigate to $DOMAIN_HOME/security directory and run the following command to start decryption:

cd $DOMAIN_HOME/security

java weblogic.WLST decrypt_password.py


Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Please enter encrypted password (Eg. {AES}fk9EK...): {AES}jkIkkdh693dsyLt+DrKUfNcXryuHKLJD76*SXnPqnl5oo\=
Decrypted string is: welcome01

Friday, February 9, 2018

Query to find All responsibilities of a user

SELECT fu.user_name                "User Name",
       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"
  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 UPPER(fu.user_name)      =  UPPER('KUMAR')  -- <change it>
   ORDER BY frt.responsibility_name;