-
Hello..
I am looking at my listener.log file that has spanned around 300mb. I have 5 instances on my box and it has data from last year.
I am not able to open the file completely due to size being too large. Most of the content over there is junk and I want to delete the file contents completely.
Alternatively I mv'd the file to a different name and created a new listener.log with a touch command. I was hoping that it will start writing to the new listener.log and I can delete the old file in 2-3 days time, but to my surprise it still writes to the renamed file and not the new one..
When I check the status of lsnrctl, I can see listener logfile as listener.log.
Please advise..
Thanks, ST2000
-
You must be on unix. You only changed the name of the file and the listener still has the inode open. You need to tell the listener to re-open the inode by stopping logging and then restarting it.
lsnrctl set log_status off
lsnrctl set log_status on
Once you have executed these two commands, the listener will start logging to the new listener.log file.
I do this daily. At midnight, I set log status off, mv the file to listener.log.`date +%y%m%d`
set log status on. This way, you get a new listener.log every day and can "prune" how many ever days you wish.
Jeff Hunter
-
Thanks a lot Jeff.. It worked perfectly and started logging to a new file as well.... and I can now delete the old file totally and start archiving from today onwards..
ST2000
-
just do cat /dev/null > listener.log if you want to empty it without deleting it assuming you can delete the contents
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|