Skip to main content

Posts

Showing posts from February, 2022

Run a Shell Script as Systemd Service in Linux

Run a Shell Script as Systemd Service in Linux  In this post,I will make a manual script and register it as a SystemD Service in Linux. Systemd is a software application that provides an array of system components for Linux operating systems. It is the first service to initialize the boot sequence. This always runs with pid 1. This also helps use to manage system and application service on our Linux operating system. We can also run any custom script as systemd service. It helps the script to start on system boot. This can be helpful for you to run any script which required to run at boot time only or to run always   1) Create a script to monitor file system space $ sudo vi /usr/bin/filesystem_check.sh Then, Copy and paste the following script and save your file: #!/bin/bash # Script check filesystem utilization every 120 seconds store in a file while true do date >> /var/log/fs-monitor.txt sudo df -h  >> /var/log/fs-monitor.txt sleep 120 done   2) Make t...

SQL Query to find All profile set at Responsibility Level

SQL Query to find All profile set at Responsibility Level Script: SELECT distinct fpo.profile_option_name SHORT_NAME,          fpot.user_profile_option_name NAME, frtl.responsibility_name,          DECODE (fpov.level_id,                  10001, 'Site',                  10002, 'Application',                  10003, 'Responsibility',                  10004, 'User',                  10005, 'Server',                  'UnDef')             LEVEL_SET,          DECODE (TO_CHAR (fpov.level_id),                  '10001', '',                 ...

Updating Profile Options from Backend using API in Oracle APPS/EBS

Updating Profile Options from Backend using API in Oracle APPS/EBS In This post I am sharing how to update the profiles without opening forms. USE the API:  FND_PROFILE The package FND_PROFILE  can be found in file AFPFPROS.pls   Note: FND_PROFILE is not public interface.  Use of this API is considered a customization and should be tested in a test environment. FND_PROFILE.SAVE - sets the value of a profile option permanently to the database, at any level. This can be used at runtime or during patching. This routine will not actually commit the changes; We have to run commit separately. The levels are: 'SITE', 'APPL', 'RESP', or 'USER'. P_NAME= Profile name should be Short Name Usage: FND_PROFILE.SAVE('P_NAME', 'P_VAL', 'SITE'); FND_PROFILE.SAVE('P_NAME', 'P_VAL', 'APPL', 321532); FND_PROFILE.SAVE('P_NAME', 'P_VAL', 'RESP', 321532, 345234); FND_PROFILE.SAVE('P_NAME', 'P_V...

Find Top Processes using Highest Memory and CPU in Linux

Find Top Processes using Highest Memory and CPU in Linux If we want to find  the top processes in linux consuming memory and cpu then we can use below command. ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head For a specific process id  ps -Lo s,lwp,class,pri,psr,tty,user,pcpu,time,pmem,vsz,rss,args --sort=pcpu -p <pid> S   LWP CLS PRI PSR TT       USER     %CPU     TIME %MEM    VSZ   RSS COMMAND S 19497 TS   19   3 ?        oraasm    0.0 00:00:05 36.5 7315196 5900868 /asm/oracle/asmdb/12.1.0/grid/bin/ocssd.bin S 19521 TS   19   3 ?        oraasm    0.2 23:57:51 36.5 7315196 5900868 /asm/oracle/asmdb/12.1.0/grid/bin/ocssd.bin S 20433 TS   19   0 ?        oraasm    0.0 00:00:00 36.5 7315196 5900868 /asm/oracle/asmdb/12.1.0/grid/bin/ocssd.bin S 20...

Important SQL scripts for Concurrent Request ID Monitoring and Analyzing

Important SQL scripts for Concurrent Request ID Monitoring and Analyzing 1) requests.sql  -- Find all child requests for a request set (OR if no children, just get details on an individual request) -- REQUIRED VALUE - Enter the Request ID that launched the Request set being investigated   select /*+ ORDERED USE_NL(x fcr fcp fcptl)*/ fcr.request_id "Request ID", substr(DECODE (FCR.DESCRIPTION, NULL, FCPTL.USER_CONCURRENT_PROGRAM_NAME, FCR.DESCRIPTION||' ('||FCPTL.USER_CONCURRENT_PROGRAM_NAME||')'),1,80)"Program Name", round((fcr.actual_completion_date - fcr.actual_start_date)*1440,2) "Elapsed Time", oracle_process_id "Trace File ID" , fcr.phase_code "Phase", fcr.status_code "Status", to_char(fcr.request_date,'DD-MON-YYYY HH24:MI:SS') "Submitted", round((fcr.actual_start_date - fcr.request_date)*1440,1) "Delay", to_char(fcr.actual_start_date,'DD-MON-YYYY HH24:MI:SS') "Star...

Oracle Apps EBS 12c Database Non-ASM file System Migration to 19c ASM

Oracle Apps EBS 12c Database file system migration to 19c ASM In this post I am going to migrate my EBS 12c database non ASM file system to 19c ASM. Current Version: EBS: 12.2.10 DB: 12.1.0.2 ASM GRID : 19.3 OS: OEL 7.9 ORACLE_SID=FUAT 19c GRID Installation Steps  Make Sure 19c crs and ASM services are running. NON-ASM to ASM Migration Steps 1)  Check the Location of the Parameter File, Control file, Temp files, Redo Log files show parameter pfile select name from v$controlfile; select name from V$datafile; select name from v$tempfile; select  member from v$logfile; 2) Make sure you have the diskgroup. I have already created a diskgroup name as EBS_DATA 3)  Create ASM password(if not done or present) file to take a new name with actual path. Use -f to force create the file otherwise the command will say already file exists. Also make sure password is complex. [oraasm@funebs122 ~]$ asmcmd pwcreate --asm '+EBS_DATA/orapwasm' Enter password: ******** OPW-00010: Could no...