In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Use the find command to query files larger than 2G
$cd $ORACLE_BASE
$find. -size + 209716019c
. / product/9.2.0.4/admin/SID/bdump/alert_SID.log
. / oradata/SID/SID_DATA01.DBF
The log file $ORACLE_BASE/admin/orasid/bdump/alert_orasid.log of ORACLE database records the conversion of redo log, database startup and shutdown, database structure change, undo segment modification, deadlock, internal error and other information.
DBA needs to check the file for ORA- errors and archive the log file regularly.
Under Linux, we can use the grep command to save the errors in alert_orasid.log to another file.
$grep ORA- alert_orasid.log > error.log
This file grows faster, and the larger the file, the more expensive it is to open and read and write. If the log file is too large (more than 5m), it needs to be truncated. Even due to the limited size of some OS files, there will be problems if the file is larger than 2G. So how do we manage this file? Of course, it is not good to delete it directly and let ORACLE rebuild, because ORACLE writes through a pointer to the file, if you delete the file while the database is running, ORACLE still uses the original file pointer for write operation, and it is possible to write a file that does not exist and cause the hard disk space to be occupied.
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.
The log file $ORACLE_HOME/network/log/listener.log of listener records the network request information processed by listener. It contains the time of the client request, connection method (private or shared), connection program, network protocol, hostname, network port number and so on.
We also need to truncate it periodically by first stopping listener logging:
$lsnrctl set log_status off
Then file processing (save the original log to the backup folder so that the original listener.log is 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 completed, open listener to record the log:
$lsnrctl set log_status on
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.