Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • Renaming Global Name GLOBAL_NAME Oracle
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • VIvek Encryption Package and Its Usage Oracle
  • Paste command syntax Linux/Unix
  • Zip and unzip with tar Linux/Unix
  • currwait.sql Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • When to rebuld B-tree index Oracle
  • FRA Information. Oracle
  • Changing the Global Database Name Oracle
  • Oracle Internal Good Websites 1 Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • Mutating Table Error while using database trigger 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

  • fuser to check who is using diretory Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • send email from unix mailx with attachment. Linux/Unix
  • Deleting first line and lastline of a file using sed Linux/Unix
  • kill all processes from specific user in solaris. Linux/Unix
  • Single character replacement in Unix 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
  • db_status.sql Oracle
  • CPU speed on Linux Linux/Unix
  • How to stop OCSSD Daemon Oracle
  • Small sample shell program Linux/Unix
  • Follwoing korn shell is used to move files from source folder to destination folder and gzip it in destination folder. mv_iotto.ksh Linux/Unix
  • To see only files and/or folders using LS command Linux/Unix
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • How To Limit The Access To The Database So That Only One User Per Schema Are Connected (One Concurrent User Per Schema) Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme