Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Sort with ASCII order and Numeric Order Linux/Unix
  • RAC with RHEL4 and 11g Oracle
  • cold backup scripts to copy locally Linux/Unix
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • How to set Processes Parameter Oracle
  • chk_space_SID.ksh Linux/Unix
  • moving lob object to other tablespace lob_mvmt.sql Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • Identical Dblink Issue… Oracle
  • How to sort list of files on basis of their sizes. Linux/Unix
  • oracle fast start failover best practice Oracle
  • find checksum of a file. Linux/Unix
  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix

Category: shell

handling filenname with space

Posted on 29-Jan-2007 By Admin No Comments on handling filenname with space

for i in “`ls`” ; do print “$i” ; done;

Linux/Unix, shell

Sort with ASCII order and Numeric Order

Posted on 03-Jan-2007 By Admin No Comments on Sort with ASCII order and Numeric Order

By default sort command will sort by ASCII order. To sort it on basis of NUMERIC sort, you need to specify “-n” switch. du -sk * | sort -n

Linux/Unix, shell

xargs use

Posted on 29-Nov-2006 By Admin No Comments on 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

Linux/Unix, shell

How to sort list of files on basis of their sizes.

Posted on 09-Nov-2006 By Admin No Comments on How to sort list of files on basis of their sizes.

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.” »

Linux/Unix, shell

Some OS level threshold for performance.

Posted on 25-Oct-2006 By Admin No Comments on Some OS level threshold for performance.

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…

Read More “Some OS level threshold for performance.” »

Linux/Unix, shell

find_du.ksh to find # of files, their sizes in current folder and its subdolder

Posted on 10-Oct-2006 By Admin No Comments on find_du.ksh to find # of files, their sizes in current folder and its subdolder

#!/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

Linux/Unix, shell

Looping for remote servers and find its database from oratab file.

Posted on 05-Oct-2006 By Admin No Comments on Looping for remote servers and find its database from oratab file.

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.” »

Linux/Unix, shell

Validating ORACLE_SID againt oratab file.

Posted on 05-Oct-2006 By Admin No Comments on Validating ORACLE_SID againt 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…

Read More “Validating ORACLE_SID againt oratab file.” »

Linux/Unix, shell

Some useful Unix Commands

Posted on 05-Oct-2006 By Admin No Comments on Some useful Unix Commands

(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…

Read More “Some useful Unix Commands” »

Linux/Unix, shell

Logic to chech # of parameters command line parameters

Posted on 05-Oct-2006 By Admin No Comments on Logic to chech # of parameters command line parameters

# Exit if no first parameter $1. if [ -z “$1” ] then echo “Usage: check_parms.ksh (where value is > 100)” exit 99 fi # Exit if no second parameter $2. if [ -z “$2” ] then echo “Usage: check_parms.ksh (where value is > 100)” exit 99 fi # Exit if parm is not greater…

Read More “Logic to chech # of parameters command line parameters” »

Linux/Unix, shell

Posts pagination

Previous 1 … 8 9 10 … 15 Next

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sqlnet.ora paramters Oracle
  • chk_space_SID.ksh Linux/Unix
  • First Entry in RAC Oracle
  • proper cpu stats Linux/Unix
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • sess_server.sql Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme