Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • exp syntax in oracle 10g Oracle
  • Implementation of key based authentications Linux/Unix
  • To check whether standby is recovering properly or not?? Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • run this before doing any dbchange pvm_pre_change.sql Oracle
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • Jai Shree Ram Oracle
  • This is from Temi Oracle
  • create database syntax Oracle
  • Identical Dblink Issue… Oracle
  • Transfer SQL Profiles from One database to other database. Oracle
  • Set Role explaination. Oracle
  • telnet listening Linux/Unix

Running some SQL on multiple databases connecting using monitoring userid and password

Posted on 08-Feb-2009 By Admin No Comments on Running some SQL on multiple databases connecting using monitoring userid and password

==>cat tns_entry_list

DB1

Db2

Db3

db4

==>cat find_max_dbfs.ksh

#!/bin/ksh

for tns_entry in `cat tns_entry_list`

do

echo “–”

echo “——— TNS ENTRY ${tns_entry} ———-”

/oracle/app/oracle/product/9.2.0.8/bin/sqlplus monioring_user/monitoring_password@${tns_entry} << EOF
@/export/home/oracle/paresh/find_max_dbfs.sql

EOF

done

oracle@dbmonitor*-/export/home/oracle/paresh

==>cat find_max_dbfs.sql

set lines 120 pages 200

col “-?db_files_value” format a20

col “MAXDATAFILES” format 9999999999999999

col “USED MAXDATAFILES” format 99999999999999

select ‘-?’ || x.value as “-?db_files_value”, y.records_total “MAXDATAFILES”, y.records_used “USED MAXDATAFILES”,

from (select value from v$parameter where name = ‘db_files’) x,

(select records_total, records_used from v$controlfile_record_section where type = ‘DATAFILE’) y;

oracle@dbmonitor*-/export/home/oracle/paresh

==>

Linux/Unix, shell

Post navigation

Previous Post: All Hints for Oracle Databases
Next Post: Ports used by Oracle Software

Related Posts

  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • Reading parameter file and printing 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
  • Changing default shell Linux/Unix
  • kill all processes from specific user in solaris. Linux/Unix
  • shutdown linux 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
  • This is from Temi Oracle
  • scripts to take listener.log backup Linux/Unix
  • Unix split command to split files Linux/Unix
  • xargs use Linux/Unix
  • TNSNAMES entries details Oracle
  • How to find the real execution plan and binds used in that explain plan in Oracle 10g?? Oracle
  • Jai Shree Ram Oracle
  • ORA-01220 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme