If you need to run the same query on all the databases hosted on your server, you could use this bash script.
The script checks all Oracle instances in /etc/oratab, but it skips any lines commented.
It also skips all ASM instances.
You should create a script with the query you want to run and pass it as an argument to the bash script.
Create a new file named run_on_all.sh and put this content inside:Continue reading “Bash Script to Connect to Multiple Oracle Databases and Run Query”