Syed Saad Ali

Oracle ACE Pro

Oracle Solution Architect

Oracle E-Business Suite

Oracle Cloud Infrastructure

Oracle Fusion Middleware

Oracle Database Administration

Oracle Weblogic Administration

Syed Saad Ali

Oracle ACE Pro

Oracle Solution Architect

Oracle E-Business Suite

Oracle Cloud Infrastructure

Oracle Fusion Middleware

Oracle Database Administration

Oracle Weblogic Administration

Month: December 2017

December 1, 2017 Useful Commands For Unix Operating System
APPS DBAInstallation/Configurations10gInstallation/Configurations11gInstallation/Configurations12c

Useful Commands For Unix Operating System

 

1.Deleting files older than N number of days ?

find . -name ‘*.trc’ -mtime +[N in days]  -exec rm {} \;  
Command will delete files older then N days in that directory

 

2.Copying file keeping timestamp preserve

cp -ip file.txt file_txt_bkp

 

3.Listing files modified in last N days

find . -mtime -<ndays> -exec ls -lt {} \;

 

4.Sorting files based on Size of file ? 

ls -l | sort -nrk 5  | more
du -sm *|sort -nr|head -10 

 

5.Finding CPU & Memory detail 

->cat /proc/cpuinfo  (CPU)
->cat /proc/meminfo (Memory)
->topas

 

6.Finding if any service is listening on particular port or not ?

netstat -an | grep {port no}  

 

7.Finding Process ID (PID) associated with any port ?

lsof | grep {port no.}  
lsof should be installed and in path.Many times it will be installed eith root user.Make sure you have that permission

 

9.Finding a pattern in some file in a directory ?

grep pattern  file_name  ( find pattern in particular file )
grep -i pattern  file_name (find pattern ignoring the case)

 

10.Create symbolic link to a file ?

ln -s  pointing_to_original_file  symbolic_link_name

example
 ln -s /home/text.txt test.txt

 

11.History of command executed in UNIX 

fc -l 
fc -e – ls ( Would execute the last ls command.) 
History command will also do the same
history

 

12. Compressing a big file

zip -r new.zip new
or
compress file_name

 

13.Creating a tar file

tar -cvwf file.tar file.txt

 

14.Extracting the files from a tar file

tar -xvwf myfile.tar(System would unarchive (untar) the myfile.tar file into the current directory.)
tar -xvwzf myfile.tar.gz(System would unarchive (untar) the myfile.tar.gz file in the current directory.)

 

14.Extracting a gz file?

Use guzip command as follows:
gunzip file.gz
OR
gzip -d file.gz

 

15.Extract a tar.gz or .tgz file?

Files with extension tar.gz or .tgz are tar files compressed with gzip. On Unix system extract them with following command:
gunzip < file.tar.gz | tar xvf –
gunzip < file.tgz | tar xvf –

If you have GNU tar (Linux system) you can use the z option directly:
tar xvzf file.tar.gz
tar xvzf file.tgz

 

16.Using mailx command

echo “This is going to be body of the mail” |mailx -s “Subject:Testing” “false@gmail.com”

 

17.Checking the file system free and used space

df -gt 

 

 

December 1, 2017 How to Enable/Disable Maintenance Mode without using ADADMIN
APPS DBAInstallations/Configurations-Applications

Enable/Disable Maintenance Mode without using ADADMIN

We can Enable or Disable Maintenance mode without using ADADMIN through following given procedure:

Enable Maintenance Mode:

$sqlplus apps/appspassword
SQL>$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE

Disable Maintenance Mode:

$sqlplus apps/appspassword 
 
SQL>$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE

 

 

December 1, 2017 How to Add Responsibility to User from Back End
APPS DBAInstallations/Configurations-Applications

How to Add Responsibility to User from Back End

SYNTAX

fnd_user_pkg.addresp(username => Application User Name
,resp_app => Responsiblity_Application_Short_Name
,resp_key => Responsibility_Key
,security_group => Security_Group ‘Mostly it is ‘STANDARD’ so it can be hard coded it’
,description => Any comments you want
,start_date => Sysdate From Today
,end_date => Sysdate + any number of days which is required);

 

EXAMPLE

BEGIN
fnd_user_pkg.addresp (‘SYEDSAADALI‘,’SYSADMIN‘,’SYSTEM_ADMINISTRATOR‘,’STANDARD‘,
Add Sysadmin Responsibility to SYEDSAADALI‘, SYSDATE, SYSDATE + 100);
COMMIT;
DBMS_OUTPUT.put_line (‘Responsibility Added Successfully’);
EXCEPTION
WHEN OTHERS
  THEN
DBMS_OUTPUT.put_line ( ‘ Responsibility is not added due to ‘ || SQLCODE || SUBSTR (SQLERRM, 1, 100));
ROLLBACK;
END;

 

 

 

December 1, 2017 ORA-08004: sequence FND_CONCURRENT_PROCESSES_S.NEXTVAL exceeds MAXVALUE
APPS DBAErrors/Workarounds-Applications

ERROR

Routine AFPGCP cannot create a process ID for your concurrent manager process ORACLE error 8004 in FDUUID
Cause: FDUUID failed due to ORA-08004: sequence FND_CONCURRENT_PROCESSES_S.NEXTVAL exceeds MAXVALUE and cannot be instantiated.
TheCall to establish_icm failed
The Internal Concurrent Manager has encountered an error.

(more…)