Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Locktree.sql Oracle
  • To see mem usage and CPU usage system wide. Linux/Unix
  • handling filenname with space Linux/Unix
  • How to know current SID Oracle
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • restarting network in linux Linux/Unix
  • Wait time tuning research Oracle
  • Physical Standby switchover with session active Oracle
  • Order by with ROWNUM Oracle
  • Very Good Oralce Internal Tuning Book Oracle
  • normal maintenance for exp-imp and renaming table Oracle
  • When to rebuld B-tree index Oracle
  • V$CONTROLFILE_RECORD_SECTION reference notes. Oracle
  • CTAS with LONG Column for 9i and higher Oracle
  • Export Import with QUERY Oracle

send attachment from unix-shell script

Posted on 10-May-2008 By Admin No Comments on send attachment from unix-shell script

#!/bin/ksh

ORACLE_HOME=/oracle/app/oracle/product/9.2.0.8;export ORACLE_HOME

ORACLE_SID=800P; export ORACLE_SID

$ORACLE_HOME/bin/sqlplus -s “/ as sysdba” < set time on

set timing on

set verify off

spool /db25/paresh/hourly_ratio.lst

select to_char(sysdate, ‘DD-MON-RRRR:HH24:MI:SS’) from dual;

prompt ‘Total distinct users and total user sessions’

select count(distinct username), count(1), round(count(1)/count(distinct username),1 )

from v$session where username is not null;

spool off

EXIT

EOF

mailx -s “ATLAS total distinct users and total sessions counts” pmehta@1800flowers.com,rmagesh@1800flowers.com,bingram@1800flowers.com

Linux/Unix, shell

Post navigation

Previous Post: temp_use.sql diplays usage of temp ts
Next Post: runsql_once.ksh

Related Posts

  • Find total file sizes Linux/Unix
  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix
  • check_copy_progress.sh Linux/Unix
  • CPU speed on solaris Linux/Unix
  • How to know Number of CPUs on Sun Box Linux/Unix
  • fdisk -l explaination about Primary-Logical-Extended Partitions Linux/Unix

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

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
  • Goldengate document from Porus Oracle
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • Insert cause enqueue locks Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • Oracle Material from OTN Oracle
  • Jai Shree Ram Oracle
  • oracle Dba site Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme