定时删除bdump里的trace文件
[oracle@shanxi ORCL]$ cat /home/oracle/admin/del_bdump2.sh #!/bin/bash#Author:chipengfei#Date:2012-11-15. /home/oracle/.bash_profilelog=/home/oracle/oracle_log/del_bdump2.logflag=`ps -ef | grep o...
定时删除udump里的trace文件
[oracle@shanxi ORCL]$ cat /home/oracle/admin/del_udump.sh #!/bin/bash#Author: chipengfei#Date:2012-11-15. /home/oracle/.bash_profilelog=/home/oracle/oracle_log/del_udump.log# if database is open ...
oracle alert日志每天截断truncate_alert.sh
[oracle@shanxi ORCL]$ cat /home/oracle/admin/truncate_alert.sh#!/bin/bash# Filename: truncate_alert.sh# Date: 2012-10-31# Version: 1.0# Author: chi# Desc: turncate the alert_<SID>.log every day. /home...
保留最近的2个归档
#!/bin/bash. /home/oracle/.bash_profilekeep=2seq=`sqlplus -S / as sysdba <<EOFset pagesize 0 feedback off linesize 200 echo off termout off trimspool onselect max(sequence#)-$keep from v\\...
shell程序参数传递给sqlplus
#!/bin/bash#Filename: sh_sql.sh. /home/oracle/.bash_profileseq=$1log_name=`sqlplus -S '/ as sysdba' <<EOFset pagesize 0 heading off feedback off linesize 200 echo off termout off trimspool onsel...
shell里调用sqlplus 使用不同linesize 对比表现
1、set linesize 200#!/bin/bash#Filename: del_arch1.sh . /home/oracle/.bash_profileres=`sqlplus -S / as sysdba <<EOFset pagesize 0 feedback off linesize 200 ...
删除归档,保留最近的5个归档日志
. /home/oracle/.bash_profileexport ORACLE_SID=compiere # echo $STATUS LOG_SEQUENCE=`sqlplus -s sys/H2oiswater as sysdba <<! &n...
shell expect的简单用法
引用自:http://blog.csdn.net/zhuying_linux/article/details/7091551使用expect实现自动登录的脚本,网上有很多,可是都没有一个明白的说明,初学者一般都是照抄、收藏。可是为什么要这么写却不知其然。本文用...
expect学习笔记及实例详解
expect学习笔记及实例详解引用自:http://wenku.baidu.com/view/b65e103610661ed9ad51f374.html1. expect 是基于tcl 演变而来的,所以很多语法和tcl 类似,基本的语法如下...
scp远程拷贝,不用输入密码的方法
在写bash时遇到一个问题,从远程scp文件到本地,需要输入密码,如何自动实现该过程?#!/bin/bash#file_name: expect_1.shsrc_host=192.168.1.103src_pwd=tom@ethersrc_path=/home/chi/server2.csrc_user=chi...
LINUX EXPECT的安装
Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 <style.st1\:*{behavior.:url(#ieooui) }</styl...
AWK截取字符串
AWK截取字符串文件file的每一行的格式如下:600001 200712 SH 20080413希望吧格式调整为:600001 2007 12 2008 04 13可以实用以下shell命令:cat file | awk '{print $1 "\t" substr($2,1,4...
apache日志内容导入数据库
应用需求:---------------------------------------------------------------请将 1,2日志内容插入 1.75 数据库warehouse 账号下1,2日志都在1.75服务器上1./logbackup/|-- apache目录下 如下访问日...
shell 调用 sqlplus 各种情况示例
shell 调用 sqlplus 各种情况示例测试平台:RHEL4.5一、最简单的shell里调用sqlplus.$ vi test1.sh#!/bin/bashsqlplus -S /nolog > result.log <<EOFset heading off feedback off pagesize 0 v...