xargs use
Remove all files that are generated in OCT ls -rlt | grep -i “oct” | awk ‘{print $9}’ | xargs rm Remove files that has number 3200 to 3699. ls -rlt arch1_573748961_3[2-6][0-9][0-9]* | awk ‘{print $9}’ | xargs rm
Remove all files that are generated in OCT ls -rlt | grep -i “oct” | awk ‘{print $9}’ | xargs rm Remove files that has number 3200 to 3699. ls -rlt arch1_573748961_3[2-6][0-9][0-9]* | awk ‘{print $9}’ | xargs rm
In this article I will describe the steps used to identify which shared memory and semaphore segments are owned by a particular instance in Oracle V7, V8.0, V8i, and V9i. This can be helpful in recovery situations where the database instance has not released its shared memory and semaphores on database shutdown. Consider the situation…
tuningdb21->AWRTEST@(/db1/home/oracle)ls -rlt | sort +4 total 48 drwx—— 2 oracle dba 96 May 17 16:16 nsmail drwxrwxr-x 3 oracle dba 96 Oct 3 2005 app drwxr-xr-x 3 oracle dba 96 Oct 4 2005 patch drwxr-xr-x 2 oracle dba 96 Oct 16 15:17 scripts -rw-r–r– 1 oracle dba 124 Oct 3 2005 local.cshrc -rw-r–r– 1 oracle…
Read More “How to sort list of files on basis of their sizes.” »
Locktree.sql is renamed with $ORACLE_HOME/rdbms/admin/utllockt.sql This will show the lock hierarchy in Oracle.
Test data
Some OS level threshold for performance. Run queue > 8 : May indicate an overloaded CPU. Page_in and Page_out > 50 : May indicate overloaded RAM memory. This should be correlated with page-outs and scan rate. user+system CPU > 70% : Indicates periods with a fully-loaded CPU subssystem.Periods of 100% utilization are only a concern…
#!/usr/bin/ksh for dirname in `find . -type “d”` do #print “dirname is $dirname”; tot_files=`ls -rlt $dirname| grep -i “^-” | wc -l` tot_file_size=`ls -rlt $dirname| grep -i “^-” | awk ‘{tot+=$5} END {print tot/1024/1024}’` echo “Folder : $dirname, Total Files : $tot_files, Total File Sizes : $tot_file_size MB” done
if you wish for your Unix Oracle user to be able to connect to the remote server named prodwest, then the prodwest server must contain an .rhosts file in its Oracle user’s home directory. This file must contain an entry allowing the remote Oracle user to connect. Your system administrator can help you configure your…
Read More “Looping for remote servers and find its database from oratab file.” »
The following script shows how to check an Oracle SID to be sure that it’s valid. The script expects the SID to be passed in as the first parameter, and it begins by checking to see if a parameter was even passed. The script next counts the number of times the first parameter value appears…
(1) Find all SQL files that contain “dba” pattern in current directory. find . -name “*sql” -print | xargs grep -i “dba” (2) script to kill all Oracle background processes for a database. This is a common Unix script used by Oracle DBAs when a database is locked up, and Server Manager cannot be used…