{"id":53,"date":"2008-03-25T14:15:21","date_gmt":"2008-03-25T18:15:21","guid":{"rendered":"http:\/\/www.dev-notes.com\/blog\/2008\/03\/25\/cleaning-up-the-listener-log\/"},"modified":"2008-03-25T14:15:21","modified_gmt":"2008-03-25T18:15:21","slug":"cleaning-up-the-listener-log","status":"publish","type":"post","link":"https:\/\/www.dev-notes.com\/blog\/2008\/03\/25\/cleaning-up-the-listener-log\/","title":{"rendered":"Cleaning up the listener log"},"content":{"rendered":"<p>Since we noticed the listener log has grown out of control, we should already know the location of it.  Just in case you need it, by default that log file is located at &#8220;NETWORK\/log\/listener.log&#8221; in your Oracle home.<\/p>\n<p>The listener log cannot be modified while the listener is active, and more than likely, we need to minimize listener down time so we interrupt users the least.  To do so, we are going to create a batch file so that the three commands we are going to run will run successively in a short amount of time.  Alternatively, you can also perform them during business off-hours, if that is available to you.  Either running in a batch file or running them manually, the commands are the same.<\/p>\n<pre class=\"code\">\nlsnrctl set log_status off\nrename listener.log listener.old\nlsnrctl set log_status on\n<\/pre>\n<p>The first commands is used to disable the listener, which will release the file lock on the listener.log file so we can work with it.  The second command renames the file.  Finally, the third command restarts the listener to resume normal operations.  Immediately after the third command runs, a new listener.log file will be created with 0 size.<\/p>\n<p>What to do with the old listener log &#8220;listener.old&#8221; is up to each of us.  Personally, I tend to zip up the file and store it at a safe place, just in case I ever need to review it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Inevitably, a DBA will sometimes forget to check the size of the listener log file, and the file will grow to a large size.  This is how we can clean up the log file.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-oracle"],"_links":{"self":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":0,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}