Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • find_pdbs.sql Uncategorized
  • metalink all dynamic view reference notes. Oracle
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • RMAN : Consistent Backup, Restore and Recovery using RMAN Oracle
  • oracle 10g on linux Linux/Unix
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • Roles and Stored Procs II Oracle
  • Find average Row Length and other table size calculation. metalink notes Oracle
  • cur_sql.sql Oracle
  • proc.sql Oracle
  • To find all disk io ( EMC as well as local) Linux/Unix
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • V$transaction notes for finding XID composition. Oracle
  • Linux CPU info. Linux/Unix
  • Configure ssh authentications for RAC Oracle

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 to stop the database in a more “gentle” fashion.

ps -ef|grep “ora_”|grep -v grep|grep $ORACLE_SID|awk ‘{print $2}’|xargs kill -9

Also, you can alias above long command to make it handy as following:

alias nuke_oracle=”ps -ef|grep ‘ora_’|grep -v grep|grep $ORACLE_SID|awk ‘{ print $2 }’|xargs kill -9″

(3)

nohup run_sql.ksh > logfile.lst 2>&1 &

nohup: Submits the task so that it continues to run even after you disconnect your terminal session.

run_sql.ksh : Specifies the Unix shell script that you want to run in the background.

> logfile.lst : Redirects standard output to the specified file.

2 > &1 : Redirects standard error messages to the standard output device. The 2 represents the standard error device, and 1 represents the standard output device.

& : Runs the task in the background. You need to have a space in front of the trailing ampersand (&) character, and it’s that & that causes the task to run as a background task.

Linux/Unix, shell

Post navigation

Previous Post: Logic to chech # of parameters command line parameters
Next Post: Validating ORACLE_SID againt oratab file.

Related Posts

  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix
  • How to know Number of CPUs on Sun Box Linux/Unix
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • chk_space_SID.ksh Linux/Unix
  • Small sample shell program Linux/Unix
  • Adding a new disk and mount it automatically. on VMWARE LINUX Linux/Unix

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

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

Recent Posts

  • Key Management in Oracle: The Core Issue: Missing Master Key12-May-2026
  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sql23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • DB Console Mainenance. Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • TNSNAMES entries details Oracle
  • standard Monitoring – 1 Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • SAN Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme