Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • Logic to chech # of parameters command line parameters Linux/Unix
  • get_vmstat.ksh Linux/Unix
  • Find All internal Parameters Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • metalink all dynamic view reference notes. Oracle
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress
  • Committing distributed transaction using commit force Oracle
  • FGA Part-I Oracle
  • sess1.sql Oracle
  • import-export with multiple files Oracle
  • create database syntax Oracle
  • logminer and my_lbu Oracle
  • Implementing Listener Security Oracle

Category: Linux/Unix

Remove DOS CR/LFs (^M)

Posted on 11-Sep-2009 By Admin No Comments on Remove DOS CR/LFs (^M)

Remove DOS style CR/LF characters (^M) from UNIX files using: sed -e ‘s/^M$//’ filename > tempfile The newly created tempfile should have the ^M character removed

Linux/Unix, shell

backspace in SQL Plus not working then..?

Posted on 01-Sep-2009 By Admin No Comments on backspace in SQL Plus not working then..?

If you set “stty erase ^H” on unix prompt and it works fine on unix prompt. But not working on SQLPLUS then you need to put “stty erase ^H” in .kshrc file as following. -> pwd /home/oracle oem.localdomain:OEMDB:/home/oracle -> more .kshrc stty erase ^H oem.localdomain:OEMDB:/home/oracle ->

Linux/Unix, shell

Changing default shell

Posted on 01-Sep-2009 By Admin No Comments on Changing default shell

Following statement will be used to change default shell to /bin/ksh for oracle user. [root@oem ~]# chsh -s /bin/ksh oracle Changing shell for oracle. Shell changed. [root@oem ~]#

Linux/Unix, shell

How to remove blank lines using vi editor command

Posted on 09-Jul-2009 By Admin No Comments on How to remove blank lines using vi editor command

use the following: :g/^$/d

Linux/Unix, shell

remove archfiles only when it is applied to DR rm_archfiles.sh

Posted on 08-Jul-2009 By Admin No Comments on remove archfiles only when it is applied to DR rm_archfiles.sh

echo “script execution starts at `date`” echo “COMFORT_SPACE=$COMFORT_SPACE” echo “ARCH_DEST=$ARCH_DEST” echo “ALERT_LOG=$ALERT_LOG” ARCH_SPACE=`df -k $ARCH_DEST | tail -1 | awk ‘{print $5}’ | sed ‘s/%//g’` echo “ARCH_SPACE=$ARCH_SPACE” STDBY_LAST_RECOVERED_FILE=`grep “Media ” $ALERT_LOG |grep -v grep|grep “arch” | tail -1 | sed -e ‘s#^.*/##g’ ` echo “STDBY_LAST_RECOVERED_FILE=$STDBY_LAST_RECOVERED_FILE” STDBY_LAST_RECOVERED_NUMBER=`grep “Media ” $ALERT_LOG |grep -v grep|grep “arch” | tail…

Read More “remove archfiles only when it is applied to DR rm_archfiles.sh” »

Linux/Unix, shell

remove archfiles only when it is applied to DR rm_archfiles.sh

Posted on 08-Jul-2009 By Admin No Comments on remove archfiles only when it is applied to DR rm_archfiles.sh

/oracle/scripts/rm_archfiles.sh “/db9/archlog” “90” “/oracle/admin/TESTDB/bdump/alert_TESTDB.log” #!/bin/sh RUNNING=`ps -ef|grep rm_archfiles.sh|grep -v grep|wc -l` if [ $RUNNING -gt 2 ] then echo “Exiting !!! Total $RUNNING occurence of rm_archfiles.sh are running at `date`” exit fi

Linux/Unix, shell

remove archfiles only when it is applied to DR rm_archfiles.sh

Posted on 08-Jul-2009 By Admin No Comments on remove archfiles only when it is applied to DR rm_archfiles.sh

ARCH_DEST=$1 COMFORT_SPACE=$2 ALERT_LOG=$3 NOTIFY_LIST=dbaoracle@1800flowers.com

Linux/Unix, shell

kill all processes from specific user in solaris.

Posted on 22-Jun-2009 By Admin No Comments on kill all processes from specific user in solaris.

kill all processes from user name atsscript on solaris. pkill -9 -u atsscript

Linux/Unix, shell

check_copy_progress.sh

Posted on 04-Jun-2009 By Admin No Comments on check_copy_progress.sh

#!/bin/ksh LOGFILE=/export/home/oracle/paresh/mylog.log NOTIFY_LIST=me@pvmehta.com while true do echo “Reading Time : `date` n” >> ${LOGFILE} echo “Following Files are currently copying” >>${LOGFILE} ls -rlt /db*/oradata/800JPOE/*.dbf | tail -2 >>${LOGFILE} echo “Out of 116 files, `ls -rlt /db*/oradata/800JPOE/*.dbf | wc -l` files copied so far” >> ${LOGFILE} echo “df -k /800JPOEARCH” >> ${LOGFILE} df -k /800JPOEARCH >>…

Read More “check_copy_progress.sh” »

Linux/Unix, shell

note id 373303.1

Posted on 22-May-2009 By Admin No Comments on note id 373303.1

find the runnung process’s environment

Linux/Unix, shell

Posts pagination

Previous 1 2 3 4 … 15 Next

Categories

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

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Export With Query Another Example. Oracle
  • create PLAN_TABLE command. Oracle
  • Finding locked objects Oracle
  • secure crt settings Linux/Unix
  • proper cpu stats Linux/Unix
  • ORACLE_SID in sqlplus Oracle
  • find_idle_cpu.sql Oracle
  • backspace in SQL Plus not working then..? Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme