Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • RMAN : Consistent Backup, Restore and Recovery using RMAN Oracle
  • Formatter Explain plan Output 1 Oracle
  • Small sample shell program Linux/Unix
  • find the files that are 1 day old. Linux/Unix
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • age_alert.ksh aging out alert.log Linux/Unix
  • upload.html PHP/MYSQL/Wordpress
  • SAN Linux/Unix
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • Alter procedure auditing Oracle
  • chk_space_SID.ksh Linux/Unix
  • sess_server.sql Oracle
  • fuser to check who is using diretory Linux/Unix
  • Good Link from metalink 1 Oracle
  • Proc Compilation Oracle

Year: 2006

sess_server.sql

Posted on 20-Jun-2006 By Admin No Comments on sess_server.sql

column osuser format a10 column username format a30 column machine format a30 column program format a50 set lines 132 set pages 500 select osuser, username, machine, program from v$session; select machine, username, count(1) from v$session group by machine, username;

Oracle, SQL scripts

My Minimum Tuning Programs

Posted on 20-Jun-2006 By Admin No Comments on My Minimum Tuning Programs

REM ***** gsp.sql ***** REM ***** This is used to get SPID from SID. col username format a30 col machine format a20 col program format a40 accept _sid prompt ‘Enter Oracle Session ID ->’ select a.sid, b.pid, b.spid, a.username,a.program,a.machine from v$session a,V$process b where a.paddr = b.addr and a.sid = &_sid / REM ***** gsq.sql…

Read More “My Minimum Tuning Programs” »

Oracle, SQL scripts

How to find who is using which Rollback segment and how many rows or blocks in that rollback segments,

Posted on 16-Jun-2006 By Admin No Comments on How to find who is using which Rollback segment and how many rows or blocks in that rollback segments,

Using following query, we can estimate # of rows resides in each USN (Rollback Segment) and who fired that transactions. New modified GCU.sql on 16-JUN-2006 /* Get Curent USN */ column start_dt format a20 set lines 132 select /*+ ALL_ROWS */ a.usn, a1.name, a.extents, a.hwmsize, a.status usn_status, to_char(b.start_date, ‘DD-MON-RRRR:HH24:MI:SS’) start_dt, b.status tx_status, c.sid, c.sql_id, b.used_ublk,…

Read More “How to find who is using which Rollback segment and how many rows or blocks in that rollback segments,” »

Oracle, SQL scripts

Generate SSH without password authentication.

Posted on 14-Jun-2006 By Admin No Comments on Generate SSH without password authentication.

*******************************************************************************************Step by Step Implementation of key based authentications from Source A to Destination B. ******************************************************************************************* (1) At source A (1-A) Generate a Key ssh-keygen -t dsa Sampe Output posdbprod21->CIF@(/export/home/oracle/paresh)ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/export/home/oracle/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again:…

Read More “Generate SSH without password authentication.” »

Linux/Unix, shell

How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris)

Posted on 12-Jun-2006 By Admin No Comments on How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris)

$ /usr/platform/sun4u/sbin/prtdiag System Configuration: Sun Microsystems sun4u 8-slot Sun Enterprise E4500/E5500 System clock frequency: 100 MHz Memory size: 10240Mb ========================= CPUs ========================= Run Ecache CPU CPU Brd CPU Module MHz MB Impl. Mask — — ——- —– —— —— —- 0 0 0 400 8.0 US-II 1.0 0 1 1 400 8.0 US-II 1.0 2…

Read More “How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris)” »

Linux/Unix, shell

How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile)

Posted on 12-Jun-2006 By Admin No Comments on How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile)

We can directly resize datafiles TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’; FILE_NAME BYTES —————- ———- /…/dbsGNX.dbf 419430400 TEST.SQL>ALTER DATABASE DATAFILE ‘/…/dbsGNX.dbf’ RESIZE 390M; Database altered. TEST.SQL>SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME=’SYSTEM’; FILE_NAME BYTES ————— ———- /…/dbsGNX.dbf 408944640 But the minimum file size is the size of the extend the furthest in the datafile:…

Read More “How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile)” »

Oracle, SQL scripts

How to find the real execution plan and binds used in that explain plan in Oracle 10g??

Posted on 09-Jun-2006 By Admin No Comments on How to find the real execution plan and binds used in that explain plan in Oracle 10g??

Step-1 : Find the Query and its SQL_ID to trace from AWR reports. Step-2 : Execute following query to find real execution plan: SELECT LPAD(‘ ‘,2*(LEVEL-1))||operation||’ ‘||options ||’ ‘||object_name ||’ ‘|| DECODE(id, 0, ‘Cost = ‘||position) “Query Plan” FROM v$sql_plan START WITH id = 0 and sql_id=’8ska10yfjx4b5′ CONNECT BY PRIOR id = parent_id and sql_id=’8ska10yfjx4b5′;…

Read More “How to find the real execution plan and binds used in that explain plan in Oracle 10g??” »

Oracle, SQL scripts

How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep)

Posted on 08-Jun-2006 By Admin No Comments on How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep)

SELECT owner, name, type FROM v$db_object_cache WHERE kept = ‘YES’ AND TYPE = ‘CURSOR’;

Oracle, SQL scripts

For Perl DBI installation and testing program

Posted on 08-Jun-2006 By Admin No Comments on For Perl DBI installation and testing program

http://www.cedet.dk/perl/ #!c:perlbinperl use DBI; # Following line is necessary of you are using perl to write html in browser. print “Content-type: text/htmlnn”; print ““; print “CGI Test“; print ““; print “Newer Verion of File Management Operations !“; my $dbname = “pvmeh”; ## DB Name from tnsnames.ora my $user = “pvmeh”; my $passwd = “pvmeh”; print…

Read More “For Perl DBI installation and testing program” »

PHP/MYSQL/Wordpress

catting.sh

Posted on 07-Jun-200602-Jun-2023 By Admin No Comments on catting.sh

This is the script used for merging multiple text files in single large text(ASCII) file. for i in `ls *sql *sh` { echo “****************************************************” >> myfile echo File Name : $i >> myfile echo “****************************************************” >> myfile cat $i >> myfile echo ” ” >> myfile }

Linux/Unix, shell

Posts pagination

Previous 1 … 4 5 6 … 11 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
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • refre.sql Oracle
  • checking redhat linux version Linux/Unix
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle
  • Oracle 10g Wait Model Oracle
  • Wait Based Tuning Step by step with SQL statement Oracle
  • Changing unix system clock when Oracle database is running. Oracle
  • sesswait.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme