Home > Database > Mysql Tutorial > Oracle Alert log按时间保存脚本

Oracle Alert log按时间保存脚本

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:25:51
Original
978 people have browsed it

以下脚本可以通过定时任务,每天0点执行,让警告日志按照时间分类,自动保存到相应目录中。方便对每天Oracle所产生的Alert日志进

以下脚本可以通过定时任务,每天0点执行,,让警告日志按照时间分类,自动保存到相应目录中。方便对每天Oracle所产生的Alert日志进行查看。
 
Windows下脚本
 
rem 复制日志文件并改名,请根据SID情况修改脚本
 
set year=%DATE:~0,4%
 
set month=%DATE:~5,2%
 
set day=%DATE:~8,2%
 
copy C:\app\Administrator\diag\rdbms\orcl\orcl\trace\alert_orcl.log C:\app\backup\alert_orcl"%
 
year%%month%%day%".log
 
rem 清空日志文件
 
rem 下面一句是用来清空alert_orcl.log的
 
cd. >C:\app\backup\alert_orcl.log
 
pause

linux

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template