Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • send email from unix mailx with attachment. Linux/Unix
  • Oracle Data Direct to TAPE Oracle
  • For Search and replace unix command. Linux/Unix
  • Sort with ASCII order and Numeric Order Linux/Unix
  • Implementation of key based authentications Linux/Unix
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • Another export with Query Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • Rownum with Order by Oracle
  • Explain Plan Output 2 Oracle
  • move_arch_files.ksh Linux/Unix
  • Rename Tablespace Oracle
  • Exadata Basics Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • executing Function from SQLPLUS prompt 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

  • age_alert.ksh aging out alert.log Linux/Unix
  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • shutdown linux Linux/Unix
  • Some useful Unix Commands Linux/Unix
  • rm_backup_arch_file.ksh 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 (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Search and Replace vi editor command. Linux/Unix
  • Jai Shree Ram Oracle
  • get_vmstat_solaris Oracle
  • How to change hostname in Linux Linux/Unix
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • Rman Notes -1 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme