Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Benefits and Usage of RMAN with Standby Databases Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • Removing first line Linux/Unix
  • DBMS_STATS Metalinks Notes Oracle
  • AWR license Oracle
  • JSON/XML Types in Oracle Oracle
  • v$event_name Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • oracle fast start failover best practice Oracle
  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix
  • Jai Shree Ram Oracle
  • Library cahe Latches and internal explaination Oracle
  • How to hide author name in WordPress BLOG PHP/MYSQL/Wordpress
  • Find Multiple levels of object dependencies : depen.sql Oracle
  • Default User Profile Oracle

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

  • Sort with ASCII order and Numeric Order Linux/Unix
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • good linux notes Linux/Unix
  • To Find Orphan OS processes. Linux/Unix
  • proper cpu stats 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
  • catall.sh Linux/Unix
  • create a folder in multiple places Linux/Unix
  • RAC with RHEL4 and 11g Oracle
  • switchover for primary database Oracle
  • secure crt settings Linux/Unix
  • dbms_job.submit example Oracle
  • Convert multiple rows to single column Oracle
  • create database syntax Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme