Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • SYSOPER Mystery Oracle
  • crontab syntax Linux/Unix
  • find_pk.sql /* Find Primary Key */ Oracle
  • move_arch_files.ksh Linux/Unix
  • age_alert.ksh aging out alert.log Linux/Unix
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • Check Oracle installed products using one command Oracle
  • Unix command for system configuration Linux/Unix
  • MYSQL and Oracle Comparison for Oracle DBA MYSQL
  • Proc Compilation Oracle
  • My Minimum Tuning Programs Oracle
  • Transfer SQL Profiles from One database to other database. Oracle
  • adding new line after specific pattern using sed Linux/Unix
  • before_trunc.sql Before Truncate table needs to execute following: Oracle
  • move_arch_files.ksh Linux/Unix

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

  • Unix split command to split files Linux/Unix
  • tar and untar a dolder with all its subfolder. Linux/Unix
  • How to change hostname in Linux Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • Remove DOS CR/LFs (^M) Linux/Unix
  • Small sample shell program 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • 751131.1 New Article Error 2819 While Requesting a Systemstate Dump Oracle
  • Unix command for system configuration Linux/Unix
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle
  • Oracle Statspack survival Guide Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • Jai Shree Ram Oracle
  • How To Transfer Passwords Between Databases (ref note: 199582.1) Oracle
  • How to stop OCSSD Daemon Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme