Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • process id based files and processes Linux/Unix
  • Directory wise folder wise space usage Linux/Unix
  • proper cpu stats Linux/Unix
  • metalink all dynamic view reference notes. Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • Renaming the column name Oracle
  • Privilege to describe the table. Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • Oracle vs MYSQL Architecture differences (For DBAs) MYSQL
  • More info about /proc folder and its relation with processes. Linux/Unix
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • scripts to take listener.log backup Linux/Unix
  • SQL_PROFILE – I explaination Oracle
  • To Find Orphan OS processes. Linux/Unix

Category: Linux/Unix

Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets.

Posted on 16-Sep-2008 By Admin No Comments on Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets.

[1] We have logserver as existing central monitoring server. [2] need to establish other monitoring server same as logserver. [3] so login as oracle copy ~/.ssh from logserver1 to dbmonitor. on dbmonitor: cd .ssh cat id_dsa.pub id_rsa.pub > both_keys then do the following for target servers. pls note that where ssh2 is installed the file…

Read More “Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets.” »

Linux/Unix, shell

Finding last recovered file on DR and remove all chanracters before any “/”

Posted on 08-Sep-2008 By Admin No Comments on Finding last recovered file on DR and remove all chanracters before any “/”

sunflower1/800P>ssh sunlight1 “grep “Media ” /EMCdb19/oracle/800L/bdump/alert_800L.log| grep -v grep | grep “arch” | tail -1 ” Media Recovery Log /EMCdb16/archlog/800P/arch0000296866.arc sunflower1/800P> sunflower1/800P>ssh sunlight1 “grep “Media ” /EMCdb19/oracle/800L/bdump/alert_800L.log| grep -v grep | grep “arch” | tail -1 | sed -e s#^.*/##” arch0000296866.arc sunflower1/800P>

Linux/Unix, shell

replace alphabets using sed

Posted on 28-Aug-2008 By Admin No Comments on replace alphabets using sed

Following will replace anything except numeric digits. sunflower1/800P>echo /db15/archlogbak/800P/arch0000295711.arc | awk -F”/” ‘{print $NF}’ | sed -e ‘s|[^0-9]||g’ 0000295711

Linux/Unix, shell

Reading parameter file and printing

Posted on 01-Aug-2008 By Admin No Comments on Reading parameter file and printing

#/bin/ksh -x for myread in `cat /export/home/oracle/scripts/check_recovery.par` do TARGET_SID=`echo $myread | awk -F”,” ‘{print $1}’` SOURCE_SSH=`echo $myread | awk -F”,” ‘{print $2}’` SOURCE_HOST=`echo $myread | awk -F”,” ‘{print $3}’` SOURCE_ENVFILE=`echo $myread | awk -F”,” ‘{print $4}’` SOURCE_ORACLE_HOME=`echo $myread | awk -F”,” ‘{print $5}’` TARGET_SSH=`echo $myread | awk -F”,” ‘{print $6}’` TARGET_HOST=`echo $myread | awk -F”,”…

Read More “Reading parameter file and printing” »

Linux/Unix, shell

checking connectivity between two servers

Posted on 29-Jul-2008 By Admin No Comments on checking connectivity between two servers

LASTFILE=`${PRDCMODE} ${PRDHOST} “ls -latr ${PRDARCH}/*.arc” |nawk ‘{print $9}’|tail -1|sed ‘s/[A-Za-z/. ]//g’|sed ‘s/^0*/ /g’` if [ $? != 0 ];then print “${STB1SID}: ${ALIAS} Standby on ${STB1HOST} – CRITICAL ERROR” >> ${NOTOKLOG} 2>/dev/null exit 50 fi

Linux/Unix, shell

Find long Running Transaction

Posted on 28-Jul-2008 By Admin No Comments on Find long Running Transaction

+++++++++++++longtx_12HR.sh #!/bin/sh . /opt/app/oracle/oracle_env NOTIFY_LIST=dbaoracle@1800flowers.com $ORACLE_HOME/bin/sqlplus -s “/ as sysdba” @/opt/app/oracle/scripts/longtx_12HR.sql if [ `cat /opt/app/oracle/scripts/log/long_transaction_list.lst | grep -i “*****ATLAS NOTIFICATION REQUIRED*****” | wc -l` -n e 0 ]; then mailx -s “LONG RUNNING TRANSACTION ON ATLAS `hostname` on `date` ” $NOTIFY_LIST < /opt/app/oracle/scripts/log/long_transactio n_list.lst fi +++++++++++++longtx_12HR.sql set lines 120 pages 300 set serveroutput on exec...

Read More “Find long Running Transaction” »

Linux/Unix, shell

Check_recovery.sh program to run sqlplus and return its values remotely.

Posted on 21-Jul-2008 By Admin No Comments on Check_recovery.sh program to run sqlplus and return its values remotely.

#/bin/ksh -x NOTIFY_LIST=”pmehta@1800flowers.com” SOURCE_ARCH_DEST=/db5/archlog/800P TARGET_SID=UOC SOURCE_SSH=/usr/local/bin/ssh TARGET_SSH=/usr/local/bin/ssh SOURCE_HOST=nyuocdbprod01s TARGET_HOST=uocdbprod21 TARGET_ORACLE_HOME=/oracle/app/oracle/product/10.1 TARGET_ENVFILE=/oracle/app/oracle/oraprocs/oracle_env_UOC SOURCE_ORACLE_HOME=/oracle/app/oracle/product/10.1 SOURCE_ENVFILE=/export/home/oracle/oraprocs/oracle_env_10g_UOC MY_SQL=”select max(SEQUENCE#) from v$log_history;” MY_SQL1=”select count(1) from v$log_history where first_time >= (sysdate – (45/1440));” TARGET_SEQ=`$TARGET_SSH $TARGET_HOST “. $TARGET_ENVFILE; $TARGET_ORACLE_HOME/bin/sqlplus -S / as sysdba

Linux/Unix, shell

Running select from V$ views from remote server

Posted on 21-Jul-2008 By Admin No Comments on Running select from V$ views from remote server

#/bin/ksh -x NOTIFY_LIST=”pmehta@1800flowers.com” CONNECT_USER=”/ as sysdba” TARGET_ORACLE_HOME=/oracle/app/oracle/product/10.1 MY_SQL=”select max(SEQUENCE#) from v$log_history;” RUNNING=`/usr/local/bin/ssh uocdbprod21 “. /oracle/app/oracle/oraprocs/oracle_env_UOC; $TARGET_ORACLE_HOME/bin/sqlplus -S / a s sysdba

Linux/Unix, shell

telnet listening

Posted on 09-Jul-2008 By Admin No Comments on telnet listening

if you are trying following $ telnet remote-server port and you are getting error, this means no one is listening on that port on remote server. Start the listening application ( like listener ) & then do telnet. it will work if firewall is not blocking it.

Linux/Unix, shell

Find total file sizes

Posted on 07-Jul-2008 By Admin No Comments on Find total file sizes

sunflower1/800L>./vrm3 | awk ‘{tot+=$5} END {print “TOTAL ” tot/1024}’ TOTAL 52662552 sunflower1/800L>cat vrm3 ls -rlt /EMCdb21/oradata/800P/800P_misc_index31.dbf ls -rlt /EMCdb21/oradata/800P/800P_emp_data23.dbf ls -rlt /EMCdb21/oradata/800P/800P_emp_index55.dbf ls -rlt /EMCdb21/oradata/800P/ORD_SCRPAD_INDEX_06.dbf ls -rlt /EMCdb21/oradata/800P/800P_emp_index56.dbf ls -rlt /EMCdb21/oradata/800P/800P_misc_data_3_04.dbf ls -rlt /EMCdb21/oradata/800P/800P_SAS_DATA_1.dbf ls -rlt /EMCdb24/oradata/800P/800P_ord_index42.dbf ls -rlt /EMCdb24/oradata/800P/800P_misc_index32.dbf ls -rlt /EMCdb24/oradata/800P/800P_phone_index22.dbf ls -rlt /EMCdb24/oradata/800P/800P_atlas_index57.dbf ls -rlt /EMCdb14/oradata/800P/800P_atlas_data34.dbf ls -rlt /EMCdb14/oradata/800P/800P_emp_index57.dbf ls -rlt /EMCdb14/oradata/800P/800P_ord_data29.dbf…

Read More “Find total file sizes” »

Linux/Unix, shell

Posts pagination

Previous 1 … 4 5 6 … 15 Next

Categories

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

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Physical Standby switchover with session active Oracle
  • Database link password in user_db_links Oracle
  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql Oracle
  • How to choose Driver table in SQL statement Oracle
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • move_arch_files.ksh Linux/Unix
  • EXTPROC Oracle
  • Logic to chech # of parameters command line parameters Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme