Oracle log files are too large to appear 03113

Source: Internet
Author: User

Querying larger than 2G files using the Find command

$CD $ORACLE _base

$find. -size +2097160192c

./product/9.2.0.4/admin/sid/bdump/alert_sid.log

./oraData/sid/sid_data01. Dbf


oracle $ORACLE _base/admin/ Orasid/bdump/alert_orasid.log recorded the conversion of redo log, Database startup and shutdown, database structure changes, undo section modification, deadlock, internal error, etc.

DBA needs to check if this file has error and regularly archive this log file.

in the under Linux we can be used grep command to Alert_orasid.log Save the error to another file.

$grep Ora-alert_orasid.log > Error.log

This file grows faster, the larger the file, the greater the overhead of opening and reading. If the log file is too large(more than 5M), it needs to be truncated for processing. Even due to some OS file size limitations, problems can occur if the file is larger than 2G. So how do we manage this file? Delete it directly and letORACLErebuilding is certainly not good becauseORACLEis written by a pointer to a file, if you are in theThis file was deleted when the database was run, ORACLEstill using the original file pointer to write operations, it is possible to write a nonexistent file causes hard disk space consumption.

We can use the following methods:

$tail -100 $ORACLE _base/admin/orasid/bdump/alert_orasid.log >/tmp/oracle_temp.log

$CP/tmp/oracle_temp.log $ORACLE _base/admin/orasid/bdump/alert_orasid.log

$RM/tmp/oracle_temp.log

Truncate the log file.

Listenerthe log file$ORACLE _home/network/log/listener.logrecorded the passageListenerthe network request information processed, which contains the time of the client request, the connection method(Private or shared), connection program, network protocol, host name, network port number and other information.

We also need to truncate it periodically, by first stopping Listener Log work:

$lsnrctl set Log_status off

then file processing Save the original log to the backup folder ,  empty

$CP $ORACLE _home/network/log/listener.log $ORACLE _ Home/network/log/listener_1.log

$CP/dev/null $ORACLE _home/network/log/listener.log

after the file operation is complete, open the Listener Log work:

$lsnrctl set Log_status on


This article is from the "Intelligent Future _XFICC" blog, please be sure to keep this source http://xficc.blog.51cto.com/1189288/1655545

Oracle log files are too large to appear 03113

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.