Home » RDBMS Server » Backup & Recovery » pl/sql or unix script for oracle dba to see database status
pl/sql or unix script for oracle dba to see database status [message #110192] Fri, 04 March 2005 00:00 Go to next message
ajit2000
Messages: 5
Registered: March 2005
Junior Member
Hi,
i need to create a Pl/sql or unix script to check the cron jon output scheduled for all oracle databases on a unix server. I have cold backups, hot backups hot archive logs etc scheduled in cron job. I want to have a script that will capture these details, the database up/down time, when cold backup started and ended. when hot backup started and ended etc.
regards Ajith
Re: pl/sql or unix script for oracle dba to see database status [message #110232 is a reply to message #110192] Fri, 04 March 2005 08:22 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
For all the existing scripts, make sure they log the output in a textfile ( append the output of all individual scripts to ONE text file).
This txt file now has the cumulutive logs of all the jobs. go through the logfile and get whatever you want.
You need to do a little customization.
Re: pl/sql or unix script for oracle dba to see database status [message #110243 is a reply to message #110232] Fri, 04 March 2005 09:51 Go to previous messageGo to next message
ajit2000
Messages: 5
Registered: March 2005
Junior Member
yes, i got this concept, but how do i implement it, i have some 100 log file outputs.so should i use shell scripts?i was thinking of creating a procedure, and storing all the outputs into a table in a single database.
Thanks Ajith
Re: pl/sql or unix script for oracle dba to see database status [message #110244 is a reply to message #110192] Fri, 04 March 2005 10:11 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You can do anything you want.
Simplest is ONE biglofile that gets emailed to you ( by using simple shell scripts).
Or
One Biglogfile and treat that logfile as an oracle external table,
so that you can just query the extennal table.


>>i was thinking of creating a procedure, and storing all the outputs into a table in a single database.

creating an external table would be much simpler.

else you have to use UTL_FILE builtin package to read all the 100 logfiles, read the contents line by line and insert into an oracle table.
Jared Still's excellent article gives a similiar demonstration.

www.dbazine.com/still1.shtml
Re: pl/sql or unix script for oracle dba to see database status [message #110245 is a reply to message #110244] Fri, 04 March 2005 10:13 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Oops.
Seems the DBAzine site has some problems

You can find a less-functional exact replica here.

http://dba-oracle.com/t_oracle_alert_log_sql_external_tables.htm
Previous Topic: 9i Recover database with redo log files
Next Topic: recovery of database
Goto Forum:
  


Current Time: Thu Mar 28 12:48:04 CDT 2024