Showing posts with label sysadmin. Show all posts
Showing posts with label sysadmin. Show all posts

Tuesday, 13 January 2015

Oracle Applications Idle Session Timeout

What is Session Idle time?

If Oracle Apps client is idle for some time (Eg. Application user goes for a coffee break) session during that time is called as Idle Session & because of security reason, performance issues and to free up system resource Oracle Applications terminates client session (both forms & self service) after idle time value is reached to the one mentioned in configuration file.

To enter into application, profile option "ICX Session Timeout" is used.

ICX Session Time out mentioned in profile option ICX: Session Timeout is in minutes, so ICX session timeout=30

From where ICX: Session Timeout & session.timeout get values?

Autoconfig determines value for profile option "ICX: Session Timeout" and "session.timeout" from entry in context file ($APPL_TOP/admin/SID_hostname.xml) with parameter s_sesstimeout where value mentioned is in milliseconds so profile option ICX: Session Timeout value should be s_sesstimeout/ (1000 * 60) which means here its 10 Minutes. This value is also set in zone.properties in $IAS_ORACLE_HOME/Apache/Jserv where number mentioned is in milli second i.e. 600000 (equal to 10 Minutes) session.timeout = 600000.

Eg.  Session Timeout is in minutes, so ICX session timeout=480 is 8Hrs. 

Friday, 12 December 2014

Buyer Setup Query

begin
fnd_user_pkg.updateuser(x_user_name => 'Elango',
x_owner => '',
--x_unencrypted_password => 'welcome123',
x_session_number => 14,
x_start_date => (SYSDATE - 1),
x_end_date => null,
x_last_logon_date => (SYSDATE - 1),
--x_description => 'Elangovan Ragavan',
--x_password_date => (SYSDATE - 1),
x_password_accesses_left => null,
x_password_lifespan_accesses => null,
x_password_lifespan_days => null,
x_employee_id => 3672

--/Change this id by running below SQL/
/*
SELECT person_id
,full_name
FROM per_all_people_f
WHERE upper(full_name) LIKE ‘%’ ” upper(’full_name’) ” ‘%’
GROUP BY person_id
,full_name
*/,
x_email_address => null,
x_fax => null,
x_customer_id => null,
x_supplier_id => null);
end;

Sunday, 29 December 2013

End Date User Accounts

This can be useful to run after a clone of PROD - you might want to prevent all users accessing the test instance, except a few key users.

DECLARE
   CURSOR usercur   
   IS
    SELECT fu.user_name
      FROM apps.fnd_user fu
     WHERE NVL(fu.end_date, SYSDATE + 1) >= SYSDATE
       AND fu.user_name NOT IN -- EXCLUDE SYSTEM ACCOUNTS ** THIS IS NOT A COMPREHENSIVE LIST **
        (
            'AME_INVALID_APPROVER',
            'APPSMGR',
            'ASGADM',
            'ASGUEST',
            'AUTOINSTALL',
            'GUEST',
            'IBE_ADMIN',
            'IBE_GUEST',
            'IBEGUEST',
            'IEXADMIN',
            'IRC_EMP_GUEST',
            'IRC_EXT_GUEST',
            'MOBADM',
            'MOBDEV',
            'MOBILEADM',
            'OP_CUST_CARE_ADMIN',
            'OP_SYSADMIN',
            'PORTAL_PROD',
            'PRODAPOID',
            'PRODOIDAP',
            'SYSADMIN',
            'WIZARD'
        ) -- you can use this list to exclude staff in central support team if required:
       AND fu.user_name NOT IN('TESTUSER1',
                               'TESTUSER2',
                               'TESTUSER3');

BEGIN
   FOR myuser IN usercur
   LOOP
      fnd_user_pkg.updateuser(
         x_user_name                 => myuser.user_name,
         x_owner                     => 'CUST',
         x_end_date                  => TRUNC(SYSDATE-1)
      );
   END LOOP;
END;
/
COMMIT;
EXIT

Remove End Date from User Accounts

 DECLARE
   CURSOR usercur
   IS
      SELECT fu.user_name
        FROM apps.fnd_user fu
       WHERE fu.last_update_date > TO_DATE('17-FEB-2011 21:49:32', 'DD-MON-YYYY HH24:MI:SS')
         AND fu.end_date IS NOT NULL;
BEGIN
   FOR myuser IN usercur
   LOOP
      fnd_user_pkg.updateuser(
         x_user_name      => myuser.user_name
       , x_owner          => 'CUST'
       , x_end_date       => TO_DATE('2', 'J')             -- removes end-date
      );
   END LOOP;
END;
/
COMMIT;
EXIT

Remove End Date From A User's Access To A Responsibility

DECLARE
   CURSOR respcur
   IS
      SELECT fu.user_id usid
           , fu.user_name
           , frt.responsibility_id resid
           , frt.application_id apid
           , frt.security_group_id sgid
           , furgd.start_date rstart
           , furgd.security_group_id
           , furgd.description info
        FROM applsys.fnd_user fu
           , apps.fnd_user_resp_groups_direct furgd
           , apps.fnd_responsibility_tl frt
       WHERE fu.user_id = furgd.user_id
         AND frt.application_id = furgd.responsibility_application_id
         AND frt.responsibility_id = furgd.responsibility_id
         AND NVL(fu.end_date, SYSDATE + 1) > SYSDATE
         AND furgd.end_date = '26-JUN-2005'
         AND furgd.description LIKE '% TEMPORARY ACCESS REMOVAL%';

   myresp respcur%ROWTYPE;
BEGIN
   FOR myresp IN respcur
   LOOP
      apps.fnd_user_resp_groups_api.update_assignment(
         myresp.usid
       , myresp.resid
       , myresp.apid
       , myresp.sgid
       , myresp.rstart
       , NULL                -- removes end-date on the responsibility access
       , myresp.info
      );
   END LOOP;
END;
/
COMMIT ;
EXIT

End Date Access To A Responsibility

DECLARE
   CURSOR respcur
   IS
      SELECT fu.user_id usid
           , fu.user_name
           , frt.responsibility_id resid
           , frt.application_id apid
           , frt.security_group_id sgid
           , furgd.start_date rstart
           , furgd.security_group_id
           , furgd.description info
        FROM applsys.fnd_user fu
           , apps.fnd_user_resp_groups_direct furgd
           , apps.fnd_responsibility_tl frt
       WHERE fu.user_id = furgd.user_id
         AND frt.application_id = furgd.responsibility_application_id
         AND frt.responsibility_id = furgd.responsibility_id
         AND NVL(furgd.end_date, SYSDATE + 1) > SYSDATE
         AND NVL(fu.end_date, SYSDATE + 1) > SYSDATE
         AND frt.responsibility_name = 'Minion Restricted Access';

   myresp respcur%ROWTYPE;
BEGIN
   FOR myresp IN respcur
   LOOP
      apps.fnd_user_resp_groups_api.update_assignment(
         myresp.usid
       , myresp.resid
       , myresp.apid
       , myresp.sgid
       , myresp.rstart
       , TRUNC(SYSDATE)
       , myresp.info || ' TEMPORARY ACCESS REMOVAL'
      );
   END LOOP;
END;
/
COMMIT;
EXIT

Friday, 22 November 2013

Add Responsibility For Oracle FND User

API - fnd_user_pkg.addresp
Example --
-- ----------------------------------------------------------
-- Add Responsibility to Oracle FND User
-- -----------------------------------------------------------
DECLARE
    lc_user_name                        VARCHAR2(100)    := 'ELANGO';
    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('25-JUN-2013');
    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;
 


Another Way :
=================
select * from fnd_responsibility_tl
where responsibility_name like 'Payables%';

select * from fnd_user
where user_name like 'Elango%'

begin

fnd_user_resp_groups_api.insert_assignment(user_id => 1338 --26301 (11i)
,responsibility_id => 50922
,responsibility_application_id => 200
,security_group_id => 0
,start_date => SYSDATE - 1
,end_date => NULL
,description => ' ');

Commit;

end;

Friday, 11 October 2013

Deleting Concurrent Program In Oracle Apps

DECLARE
   v_program_short_name    VARCHAR2 (200);
   v_application                   VARCHAR2 (200);
BEGIN
   v_program_short_name := 'My_Concurrent_Program';
   v_application                := 'My_Application';
   apps.fnd_program.delete_program
               (program_short_name      => v_program_short_name,
                application                     => v_application
               );
   COMMIT;
END;

Wednesday, 11 September 2013

Query to find out Request set details

/* Formatted on 9/11/2013 9:23:44 AM (QP5 v5.114.809.3010) */
  SELECT   rs.user_request_set_name "Request Set",
           rss.display_sequence Seq,
           cp.user_concurrent_program_name "Concurrent Program",
           e.EXECUTABLE_NAME,
           e.execution_file_name,
           lv.meaning file_type,
           fat.application_name "Application Name"
    FROM   apps.fnd_request_sets_vl rs,
           apps.fnd_req_set_stages_form_v rss,
           applsys.fnd_request_set_programs rsp,
           apps.fnd_concurrent_programs_vl cp,
           apps.fnd_executables e,
           apps.fnd_lookup_values lv,
           apps.fnd_application_tl fat
   WHERE       1 = 1
           AND rs.application_id = rss.set_application_id
           AND rs.request_set_id = rss.request_set_id
           AND rs.user_request_set_name = :p_request_set_name
           AND e.APPLICATION_ID = FAT.APPLICATION_ID
           AND rss.set_application_id = rsp.set_application_id
           AND rss.request_set_id = rsp.request_set_id
           AND rss.request_set_stage_id = rsp.request_set_stage_id
           AND rsp.program_application_id = cp.application_id
           AND rsp.concurrent_program_id = cp.concurrent_program_id
           AND cp.executable_id = e.executable_id
           AND cp.executable_application_id = e.application_id
           AND lv.lookup_type = 'CP_EXECUTION_METHOD_CODE'
           AND lv.lookup_code = e.execution_method_code
           AND lv.language = 'US'
           AND fat.language = 'US'
           AND rs.end_date_active IS NULL
ORDER BY   1, 2

Wednesday, 29 May 2013

How to change APPS login page logo(Oracle Logo) in R12.1.3

Navigate to  $OA_MEDIA top (Ex:- /u01/appl/apps_st/comn/java/classes/oracle/apps/media)

Replace the gif file(FNDSSCORP.gif) with your company logo in $OA_MEDIA folder.

Bounce the Apache
Clear all cookies in client machin

How to change form colour in Oracle APPS

Navigation:- Syatem Administrator > Profile > System

Type --> Java Color Scheme in Profile field

Click on Find

Choose value from LOV(blue,khaki,olive,purple,red,swan,teal,titanium) at site level.
Save the record.


Clear The Cache

Re login to get colour effect.

Monday, 15 April 2013

To attach the responsibility through backend


select * from fnd_responsibility_tl
where responsibility_name like 'System%Admin%';

select * from fnd_user
where user_name like 'ElangovanRagavan%'

/* Formatted on 4/15/2013 2:29:09 PM (QP5 v5.114.809.3010) */
BEGIN
   fnd_user_resp_groups_api.insert_assignment (
      user_id                              => 1338,           -- fnd_user -- USER_NAME
      responsibility_id                => 50922,          -- fnd_responsibility_tl  -- RESPONSIBILITY_ID
      responsibility_application_id   => 200,         -- fnd_responsibility_tl     -- APPLICATION_ID
      security_group_id               => 0,
      start_date                         => SYSDATE - 1,
      end_date                          => NULL,
      description                       => ' '
   );

   COMMIT;
END;

Update Responsibility

/* Formatted on 4/15/2013 2:29:09 PM (QP5 v5.114.809.3010) */
BEGIN
   fnd_user_resp_groups_api.Update_assignment (
      user_id                              => 1013855,           -- fnd_user -- USER_NAME
      responsibility_id                => 50578,          -- fnd_responsibility_tl  -- RESPONSIBILITY_ID
      responsibility_application_id   => 201,         -- fnd_responsibility_tl     -- APPLICATION_ID
      security_group_id               => 0,
      start_date                         => SYSDATE - 1,
      end_date                          => NULL,
      description                       => ' '
   );

   COMMIT;
END;