Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • restarting network in linux Linux/Unix
  • Small sample shell program Linux/Unix
  • telnet listening Linux/Unix
  • Space padding in korn shell Linux/Unix
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix
  • Resolving RMAN Hung Jobs Oracle
  • Oracle 11g Environment Setup Oracle
  • Processes Parameter decision Oracle
  • Linux CPU info. Linux/Unix
  • How to set Processes Parameter Oracle
  • How to change hostname in Linux Linux/Unix
  • Rownum with Order by Oracle
  • Python class import from different folders Python/PySpark
  • send attachment from unix-shell script Linux/Unix
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle

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

RAC with RHEL4 and 11g

Posted on 13-Jul-2008 By Admin No Comments on RAC with RHEL4 and 11g

http://startoracle.com/2007/09/30/so-you-want-to-play-with-oracle-11gs-rac-heres-how/

Oracle, RAC

longtx.sql

Posted on 10-Jul-2008 By Admin No Comments on longtx.sql

Find long running transaction that are running for more than 5 minutes with transaction id. col machine format a30 col sid format 99999 col Transaction_id format a20 col username format a10 col days format 99.99 col minutes format 999999 set lines 120 pages 200 select a.sid, a.username, a.machine, round((sysdate – to_date(b.start_time, ‘MM/DD/YY HH24:MI:SS’)) * 1440)…

Read More “longtx.sql” »

Oracle, SQL scripts

V$transaction notes for finding XID composition.

Posted on 10-Jul-2008 By Admin No Comments on V$transaction notes for finding XID composition.

Notes on v$transaction The information here contains the view description from the Oracle9i documentation Earlier versions of Oracle may not include all columns. The v$transaction view lists the active transactions in the system. Column Datatype Description ————- ————– ————————————– ADDR RAW(4) Address of transaction state object XIDUSN NUMBER Undo segment number XIDSLOT NUMBER Slot number…

Read More “V$transaction notes for finding XID composition.” »

Oracle, SQL scripts

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

Clean up

Posted on 06-Jul-2008 By Admin No Comments on Clean up

* re-format /dev/sdb /dev/sdc once * drop crs home * drop oraInventory * set the time on both boxes

Oracle, RAC

UTL_FILE test program

Posted on 03-Jul-2008 By Admin No Comments on UTL_FILE test program

Declare v_filehandle UTL_FILE.FILE_TYPE; file_dir VARCHAR2(50) :=’/db3/oracle/utlfiles’; begin t_file_name :=’Vatti_test.dat’; v_filehandle := UTL_FILE.FOPEN(file_dir, t_file_name, ‘w’); UTL_FILE.PUT_LINE(v_filehandle, ‘Hello TEST’); UTL_FILE.FCLOSE(v_filehandle); exception when others then dbms_output.put_line(sqlcode || ‘ ‘ || sqlerrm); end; /

Oracle, SQL scripts

V$CONTROLFILE_RECORD_SECTION reference notes.

Posted on 02-Jul-2008 By Admin No Comments on V$CONTROLFILE_RECORD_SECTION reference notes.

TYPE VARCHAR2(17) Identifies the type of record section: DATABASE, CKPT PROGRESS, REDO THREAD, REDO LOG, DATAFILE, FILENAME, TABLESPACE, LOG HISTORY, OFFLINE RANGE, ARCHIVED LOG, BACKUP SET, BACKUP PIECE, BACKUP DATAFILE, BACKUP REDOLOG, DATAFILE COPY, BACKUP CORRUPTION, COPY CORRUPTION, DELETED OBJECT, or PROXY COPY RECORD_SIZE NUMBER Record size in bytes RECORDS_TOTAL NUMBER Number of records allocated…

Read More “V$CONTROLFILE_RECORD_SECTION reference notes.” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 20 21 22 … 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
  • Privileges Required to Create Procedures and Functions that uses objects from other schema. Oracle
  • Read CSV file using PySpark Python/PySpark
  • 10g oem configuration Oracle
  • Transfer SQL Profiles from One database to other database. Oracle
  • RAC with RHEL4 and 11g Oracle
  • Find Plan Hash value fphv.sql Oracle
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • process id based files and processes Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme