Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Rename Tablespace Oracle
  • Giving Grant on v$DATABASE Oracle
  • For Search and replace unix command. Linux/Unix
  • DBA_HIST_SQLSTAT contents Oracle
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • Rollback force for distributed transactions Oracle
  • SAN Linux/Unix
  • Oracle Identifiers Oracle
  • Session_info.ksh Linux/Unix
  • Directory wise folder wise space usage Linux/Unix
  • Drop tempfiles from database Oracle
  • Database link password in user_db_links Oracle
  • runsql_once.ksh Linux/Unix
  • find_string_in_database.sql 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

  • check_copy_progress.sh Linux/Unix
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix
  • good linux notes Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • To see mem usage and CPU usage system wide. Linux/Unix

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • USE_NL and INDEX hints example Oracle
  • replace alphabets using sed Linux/Unix
  • Find Plan Hash value fphv.sql Oracle
  • Small sample shell program Linux/Unix
  • Adding a new disk and mount it automatically. on VMWARE LINUX Linux/Unix
  • on IBM-AIX for display Linux/Unix
  • catting.sh Linux/Unix
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme