Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • Jai Shree Ram Oracle
  • copying/removing directory with all its subdirectory Linux/Unix
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • oracle 11g RAC on vmware Oracle
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle
  • Export Oracle data and Compress at same time Oracle
  • _B_TREE_BITMAP_PLANS issue during 8.1.7 to 9.2.0.8 upgrade Oracle
  • CTAS with LONG Column for 7.x and 8 and 8i Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • get_vmstat_linux Oracle
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • Add new columns in dataframe Python/PySpark
  • how to find VIP from ifconfig Linux/Unix
  • Gathering statistics with DBMS_STATS Oracle

Category: shell

Transfer SQL Profiles from One database to other database.

Posted on 05-Sep-2024 By Admin No Comments on Transfer SQL Profiles from One database to other database.

In this guide, I’ll walk you through moving SQL profiles using a staging table. SQL profiles help databases optimize query execution plans. Step#1 Create the Staging Table First, create a staging table to hold SQL profiles that need to be transferred. SQL> exec DBMS_SQLTUNE.CREATE_STGTAB_SQLPROF(table_name => ‘SQL_STG_TAB’, schema_name => ‘SYS’); This will create a table SQL_STG_TAB…

Read More “Transfer SQL Profiles from One database to other database.” »

Oracle, shell, SQL scripts

Oracle GoldenGate lag monitoring shell script

Posted on 12-Jun-202318-Jun-2023 By Admin No Comments on Oracle GoldenGate lag monitoring shell script

Following script will be useful for tracking Oracle GoldenGate replicat process and related lag. This script will generate output on standard screen.  You can redirect it using file redirection to logfile or other locations.  while true do <goldengate home directory>/ggsci <<EOF > test.out info all exit EOF lag=`cat test.out | grep TESTREPLICAT | awk ‘{print…

Read More “Oracle GoldenGate lag monitoring shell script” »

Linux/Unix, Oracle, shell

How to collect CPU usage on Linux using Shell script

Posted on 09-Jun-202309-Jun-2023 By Admin No Comments on How to collect CPU usage on Linux using Shell script

Following script will help to collect CPU based on on every SAMPLE_TIME. This will help to collect IDLE CPU our from “vmstat” and store them in a file. #Setup SAMPLE_TIME for cpu data collection interval SAMPLE_TIME=5 while true do x=`vmstat | grep -v procs | grep -v swpd | awk ‘{print $15}’` echo `date +”%m-%d-%y…

Read More “How to collect CPU usage on Linux using Shell script” »

Linux/Unix, shell

CPU speed on Linux

Posted on 10-Dec-2010 By Admin No Comments on CPU speed on Linux

less /proc/cpuinfo

Linux/Unix, shell

CPU speed on solaris

Posted on 10-Dec-2010 By Admin No Comments on CPU speed on solaris

To get cpu speed, use psrinfo -v psrinfo -v Status of virtual processor 0 as of: 12/10/2010 11:33:07 on-line since 08/01/2010 15:55:44. The sparcv9 processor operates at 1800 MHz, and has a sparcv9 floating point processor. Status of virtual processor 1 as of: 12/10/2010 11:33:07 on-line since 08/01/2010 15:55:50. The sparcv9 processor operates at 1800…

Read More “CPU speed on solaris” »

Linux/Unix, shell

grep multuple patterns

Posted on 27-Oct-2010 By Admin No Comments on grep multuple patterns

cat test1 | egrep ‘TNS-|Client address’ | sed -e ‘s/^.*HOST/HOST/’

Linux/Unix, shell

fuser to check who is using diretory

Posted on 22-Oct-2010 By Admin No Comments on fuser to check who is using diretory

fuser -cu /directory_name

Linux/Unix, shell

Unix command for system configuration

Posted on 21-Oct-2010 By Admin No Comments on Unix command for system configuration

Seeing kernel version (32/64 Bit) on Unix flavors. -isainfo -kv on Solaris -lsconf on AIX -uname -a on Linux to See configuration -prtdiag on Solaris -lsconf on AIX -dmidecode on Linux Other useful Unix commands: Disk usage. # df -al Memory information. # free Network information. # ifconfig -a Installed Modules information. #lsmod Currently mounted…

Read More “Unix command for system configuration” »

Linux/Unix, shell

Space padding in korn shell

Posted on 15-Jun-2010 By Admin No Comments on Space padding in korn shell

#!/bin/ksh typeset -L30 fieldA typeset -R15 fieldB fieldA=”Paresh” fieldB=”Vatti” echo “${fieldA}${fieldB}”

Linux/Unix, shell

find checksum of a file.

Posted on 10-Jun-2010 By Admin No Comments on find checksum of a file.

oracle@dbmonitor*-/export/home/oracle/paresh ==>echo `sum 1.sh` 4206 1 1.sh oracle@dbmonitor*-/export/home/oracle/paresh ==>echo `sum 1.sh` | awk ‘{print $1}’ 4206 oracle@dbmonitor*-/export/home/oracle/paresh ==>echo `sum 1.sh` | awk ‘{print $2}’ 1 oracle@dbmonitor*-/export/home/oracle/paresh ==>

Linux/Unix, shell

Posts pagination

1 2 … 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
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • cp_filesystem.sql Oracle
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • ORA-01220 Oracle
  • oracle 10g on linux Linux/Unix
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • Parallel DML Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme