Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Rollback force for distributed transactions Oracle
  • Histogram Overview Oracle
  • Very clear article about oracle dataguard Oracle
  • RAC 11g with vmware Oracle
  • Which environment is used by currently running process ( Very good) Linux/Unix
  • Looping for remote servers and find its database from oratab file. Linux/Unix
  • To find explain plan for a statement that occurred in past. Oracle
  • chk_space_SID.ksh Linux/Unix
  • USE_NL and INDEX hints example Oracle
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • compile_inv.sql Oracle
  • SAN Linux/Unix
  • Removing Blank lines from file using grep Linux/Unix
  • sql_doing_fts.sql Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix

Convert multiple rows to single column

Posted on 13-Sep-202313-Sep-2023 By Admin No Comments on Convert multiple rows to single column

Converting rows to single column: create table emp ( empno number, empname varchar2(100), deptno number); insert into emp values( 1, ’emp1′, 10); insert into emp values( 2, ’emp2′, 20); insert into emp values( 3, ’emp3′, 30); insert into emp values( 4, ’emp4′, 10); insert into emp values( 5, ‘paresh’, 30); insert into emp values( 6,…

Read More “Convert multiple rows to single column” »

Oracle, SQL scripts

Find all users who have DML privileges

Posted on 05-Sep-202305-Sep-2023 By Admin No Comments on Find all users who have DML privileges

Run following query as sysdba. alter session set nls_date_format=’DD-MON-RRRR:HH24:MI:SS’; alter session set nls_date_format=’DD-MON-RRRR:HH24:MI:SS’; select username, created, account_status /* Users who granted role with DML privs */ from dba_users where oracle_maintained = ‘N’ and username in (select grantee from dba_role_privs where granted_role in (select role from dba_roles where role in (select GRANTEE from dba_tab_privs where privilege…

Read More “Find all users who have DML privileges” »

Oracle, 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

Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle

Posted on 11-Jun-202311-Jun-2023 By Admin No Comments on Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle
Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle

If you want exclusive lock on any table, you need to make sure that no other session is  accessing it. This happens when you want to run DDL or any ALTER statements, that internally needs exclusive lock. Following script will to find the blocker session and provide killing statement for clearing locks.  col owner format…

Read More “Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle” »

Oracle, SQL scripts

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

Move WordPress site from one hosting service to other.

Posted on 06-Jun-202306-Jun-2023 By Admin No Comments on Move WordPress site from one hosting service to other.

We need to follow the steps below for moving website from one hosting provider to other hosting provider. At Source Hosting   Take backup of existing website. This will take complete backup of all your WP files plus SQL file for database.  The final backup file will be in “.tar.gz” format.  At Target Hosting Create the…

Read More “Move WordPress site from one hosting service to other.” »

PHP/MYSQL/Wordpress

How to hide author name in WordPress BLOG

Posted on 02-Jun-202304-Jun-2023 By Admin No Comments on How to hide author name in WordPress BLOG

Do you want to hide or remove the author name from your WordPress blog posts? Normally, blog posts are supposed to show author name with other meta-data like date and category. However, some blog owners may not want to display the author name next to their blog posts. By default, WordPress does not have an…

Read More “How to hide author name in WordPress BLOG” »

PHP/MYSQL/Wordpress

S3 Basic info

Posted on 30-May-202331-May-2023 By Admin No Comments on S3 Basic info

S3= simple storage service Object based storage. File size can be from 0 to 5TB. S3 provide object storage to store files, it does not provide block storage where you can install OS. Successful uploads generate HTTP 200 status code. You can turn on MFA delete. Files are stored in buckets, that’s another name of…

Read More “S3 Basic info” »

AWS

ENQ: KO – FAST OBJECT CHECKPOINT tips

Posted on 25-May-202325-May-2023 By Admin No Comments on ENQ: KO – FAST OBJECT CHECKPOINT tips

On reporting queries, there are too many “enq: KO – fast object checkpoint” wait event. All reporting queries are doing full table scans concurrently. Oracle uses direct path reads instead of db file scattered reads. And direct path reads require a checkpoint “_serial_direct_read”=NEVER Parameter Session Value Instance Value ————————————————– —————————— —————————— _serial_direct_read auto auto

Oracle

GSQ.sql

Posted on 19-May-202325-May-2023 By Admin No Comments on GSQ.sql

This SQL will be used to identify SQL details of given Session. You need to pass SID and INSTANCE_ID as INPUT. This query will provide session details, SQL_ID, SQL_EXEC_START time and other transaction level details. set echo off feedback off verify offcol Transaction_id format a20col username format a8col days format 99.99col hours1 format 999999col TX_HRS…

Read More “GSQ.sql” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 3 4 5 … 57 Next

Categories

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

Recent Posts

  • 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
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • When to rebuld B-tree index Oracle
  • checking connectivity between two servers Linux/Unix
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix
  • Python class import from different folders Python/PySpark
  • All Hints for Oracle Databases Oracle
  • cache buffer chain latch Oracle
  • create a folder in multiple places Linux/Unix
  • Sample WW22 listener.ora Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme