Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Complete Git Tutorial for Beginners GIT
  • Find Multiple levels of object dependencies : depen.sql Oracle
  • runsql_once.ksh Linux/Unix
  • refre.sql Oracle
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • Display the top 5 salaries for each department using single SQL Oracle
  • load SPM baseline from cursor cache Oracle
  • prepfiles.sh for step by step generating pending statistics files Oracle
  • alter database backup controlfile to trace Oracle
  • Export With Query Another Example. Oracle
  • ipcs -l Linux/Unix
  • online_ts_bkup.sql Oracle
  • ORA-00064: object is too large to allocate on this O/S during startup Oracle
  • Transfer SQL Profiles from One database to other database. Oracle
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) 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

  • Zip and unzip with tar Linux/Unix
  • fuser to check who is using diretory Linux/Unix
  • Jai Shree Ram Linux/Unix
  • Unix command for system configuration Linux/Unix
  • grep multuple patterns Linux/Unix
  • Search and replace pattern 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)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (395)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Implementing Listener Security Oracle
  • Good notes for shared pool Oracle
  • Default User Profile Oracle
  • _B_TREE_BITMAP_PLANS issue during 8.1.7 to 9.2.0.8 upgrade Oracle
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • Jai Shree Ram Oracle
  • Space padding in korn shell Linux/Unix
  • Running select from V$ views from remote server Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme