{"id":95,"date":"2009-08-04T12:09:29","date_gmt":"2009-08-04T16:09:29","guid":{"rendered":"http:\/\/dbtricks.com\/?p=95"},"modified":"2009-08-04T12:09:29","modified_gmt":"2009-08-04T16:09:29","slug":"what-to-do-when-listenerlog-is-growing","status":"publish","type":"post","link":"https:\/\/dbtricks.com\/?p=95","title":{"rendered":"What to do when listener.log is growing."},"content":{"rendered":"<p>over time, the Listener.log file can grow to huge size and take a lot of disk space.<br \/>\nIf you will try to delete it in windows you may get the following error:<\/p>\n<p>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nError Deleting File or Folder<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nCannot delete listener: It is being used by another person or program.<\/p>\n<p>Close any programs that might be using the file and try again.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nOK<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<P><br \/>\nLinux will allow you to delete the file but it will not create a new one.<br \/>\n<P><br \/>\nThe solution to this issue is simple. following are some options:<br \/>\n<P><br \/>\nThe easiest solution would be to <strong>stop the listener process, delete the file and restart the listener service<\/strong>. However, stopping the listener will prevent new connections to the database and disrupt service.<br \/>\n<P><br \/>\nA better option would be to<strong> stop logging to the listener.log file<\/strong>:<\/p>\n<p>In the command prompt type ><strong>lsnrctl<\/strong><br \/>\nThis will open the Listener control utility. Type LSNRCTL> <strong>set log_status off<\/strong><br \/>\nnow you can navigate to the file location and delete the file using the operating system.<br \/>\nThis will prevent the file from growing in the futre.<br \/>\nIf you like, you can restart logging LSNRCTL> <strong>set log_status on<\/strong><br \/>\nThis will allow you to delete listener.log but nothing will be logged when the log_status is set to off.<br \/>\n<P><br \/>\nIf you want to the logging to continue. you can switch to a different logging file:<br \/>\ntype LSNRCTL> <strong> set log_file listener2.log <\/strong><\/p>\n<p>The listener will now log to the new file. you can delete or move the old file. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>over time, the Listener.log file can grow to huge size and take a lot of disk space. If you will try to delete it in windows you may get the following error: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Error Deleting File or Folder &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Cannot delete listener: It is being used by another person or program. Close any programs that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[56,55,107],"class_list":["post-95","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-file-too-big","tag-listener-log","tag-oracle"],"_links":{"self":[{"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/posts\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":1,"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":96,"href":"https:\/\/dbtricks.com\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions\/96"}],"wp:attachment":[{"href":"https:\/\/dbtricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}