Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • To see only files and/or folders using LS command Linux/Unix
  • chk_space_SID.ksh Linux/Unix
  • cp_filesystem.sql Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • FGA Part-I Oracle
  • Export Oracle data and Compress at same time Oracle
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • Renaming the column name Oracle
  • Changing unix system clock when Oracle database is running. Oracle
  • arch_configUOCIOTTO.ora Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • logminer and my_lbu Oracle
  • For Perl DBI installation and testing program PHP/MYSQL/Wordpress

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

  • process id based files and processes Linux/Unix
  • How to sort list of files on basis of their sizes. Linux/Unix
  • SAN Linux/Unix
  • Changing default shell Linux/Unix
  • How to know Number of CPUs on Sun Box Linux/Unix
  • Zip and unzip with tar 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
  • Goldengate document from Porus Oracle
  • Sending email with file attachment. Linux/Unix
  • Drop database in Oracle 10g Oracle
  • exp syntax in oracle 10g Oracle
  • Find Command Linux/Unix
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle
  • Find nth max and min. Oracle
  • Roles and Stored Object behaviour Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme