Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle log rotation

Status
Not open for further replies.

nontrad

MIS
Jan 10, 2001
83
US
I have been asked by my bss to find an Oracle (or other source) application that rotates Oracle log files (esp listener).

He wants the log files rotated, run through a statistical pkg to he can display the data in "pretty pie charts and graphs" via web interface so he (and everyone else) can see the activity from home. IMHO, I see no reason for this but he's the boss.

Anyway......

As far as I can see, this is just done with a Unix/Apache utility as a CRON job and not by Oracle itself.

Is this true? Or can someone guide me to an application that will satuisfy my boss?

Thanks,
E.
 
I don't know about any application to do your processing of the log, but I can tell you that you can run a cron to take care of the listener.log piece.

The listerner should be stopped, when doing this, because I heard that it causes problems when you pull (rename/delete) a listener log while the Listener is up, unlike an alert log, which can be grabbed anytime.

Best to set up the necessary commands in a batch job run the batch from cron.

lsnrctl stop
ren listener.log listener.log.hold
lsnrctl start


 
Forgot to include in my posting, you can get real fancy with batch and cron, naming your files with dates, deleting older (and hopefully) processed logs, ect. Do all the real work in the batch job, and run that batch from cron.

 
Sorry I am not quite sure which logs you are talking about?
Do you talk about the listener.log or the redo.log/arch.log files?
It seems, that you mean the listener.log. In this case you will have to use a utility that runs using "more | grep" instead of an editor.
Another possibility is to use "cat" to copy the file content to another file and delete the content. In this way your listener.log will not increase all the time and you can use routines as you like on the replicated listener.log.

If you are using the redo.logs you will have to use log-miner.

Another possibility is to spend some money for a really nice monitoring tool that does all the jobs for you inclusive some additional ones. Quest Software has some nice tools. If you just want to see it on-the-fly use SPOTLIGHT ON ORACLE and if you want to have a history as well use I/WATCH. The last tool monitors also your Server and capacities and you will be able to get additional Operating-Survey of all Oracle services.
And everything will be then in nice bar charts/graphs/pies as your supervisor likes it. A nice side effect is that your supervisor will immediately recognise if the hardware is getting too small and you will save discussions with him.
 
Thanks all.

I foud out that there is a utility as part of the Application Server pkg - which we didn't buy.

I am thinking of setting up a CRON job that copies the listener.log and then saves it to whatever name they want and leave the listener.log alone. I use that file for an Excel spreadsheet to graph the usage of both of our Dbs by time block. Until I am sure that the stat package they want to put up on the web will do the same thing, I will keep doind this also. When I DO update my graph, I go into VI and delete past days postings w/o disturbing todays messages.

As far as hardware, we are tacking the number of accesses by time block to determine our heavy load periods. This is a much more sccurate picture than daily totals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top