Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Search and replace editor command in vi Linux/Unix
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • 10g oem configuration Oracle
  • How to stop OCSSD Daemon Oracle
  • Building Our Own Namespaces with “Create Context” Oracle
  • Oracle 10g Wait Model Oracle
  • USE_NL and INDEX hints example Oracle
  • FRA Information. Oracle
  • db_status.sql Oracle
  • Finding locked objects Oracle
  • ipcs -l Linux/Unix
  • Display the top 5 salaries for each department using single SQL Oracle
  • import-export with multiple files Oracle
  • V$ROLLSTAT status is Full Oracle
  • Removing first line Linux/Unix

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 (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • DBMS_JOB all example Oracle
  • purge_trc.sh Linux/Unix
  • arch_configUOCIOTTO.ora Oracle
  • This is im telling Kishore Oracle
  • proc.sql Oracle
  • pvm_pre_change.sql Oracle
  • Rownum with Order by Oracle
  • Database link password in user_db_links Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme