[Oracle] ORA-12547: TNS:lost contact
[mon@topaz source]$ export ORACLE_BASE=/u01/oracle[mon@topaz source]$ export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1[mon@topaz source]$ export ORACLE_SID=xxxxx[mon@topaz source]$ sqlplus / as sysdba-bash: sqlplus: command not found[mon@topaz source]$ $ORACLE_HOME/bin/sqlplus / as sysdb...
[Linux] mutt mail oracle awr [Html能正常显示表格]
使用mutt发送awr report的时候使用如下命令:[root@oracle6 sbin]# cat /home/oracle/awrrpt_1_20866_20874.html | mutt -s "Oracle AWR Report" tolilong@163.com -a /home/oracle/awrrpt_1_20866_20874.html可以将awrrpt_1_20866_20874.html当成附件发送给maillist,但是awrrpt_1_20866_20874.html里面内容却当成源码发...
[Linux] mutt+msmtp sendmail
以前也写过mutt+msmtp sendmail的文章,现在重新写一次吧。1.download msmtp software直接输入如下地址,可以获得softwarehttp://sourceforge.net/projects/msmtp/files/msmtp/1.4.31/msmtp-1.4.31.tar.bz2/download2.install msmtp[root@oracle6 opt]# tar -xvf msmtp-1.4.31.tar.bz2 [root@oracle6 opt]# cd...
5.Monitor filesystem usage & delete expire file
[root@oracle6 source]# crontab -l5,15,25,35,45,55 * * * * /home/mon/source/mon_filesystem_full >> /home/mon/log/mon_filesystem_full.log[root@oracle6 source]# [root@oracle6 source]# [root@oracle6 source]# more mon_filesystem_full #!/bin/bash#monitor local filesystem is fullyLO...
[Shell] Monitor filesystem usage & delete expire file
[root@oracle6 source]# crontab -l5,15,25,35,45,55 * * * * /home/mon/source/mon_filesystem_full >> /home/mon/log/mon_filesystem_full.log[root@oracle6 source]# [root@oracle6 source]# [root@oracle6 source]# more mon_filesystem_full #!/bin/bash#monitor local filesystem is fullyLO...
[Linux] alias永久生效
[root@oracle6 ~]# alias dfk='df | awk -f /usr/bin/dfb'[root@oracle6 ~]# alias dfg='df -h | awk -f /usr/bin/dfb'配置了alias之后,dfk,dfg可以正常使用但是退出session或者重启系统后alias定义的会失效在.bashrc中加入上述内容后,永久生效[root@oracle6 ~]# more .bashrc# .bashrc# User specific aliases...
4.Linux monitor tablespace usage
1.create database link先赋予create database link的权限SQL> grant create database link to mon;Grant succeeded.SQL> create database link yangxu connect to system identified by xxxxx_123 using 'yangxu';Database link created.2.create tableSQL> create table mon_tablespace( 2 d...
[Shell] Linux monitor tablespace usage
linux monitor tablespace1.create database link先赋予create database link的权限SQL> grant create database link to mon;Grant succeeded.SQL> create database link yangxu connect to system identified by xxxxx_123 using 'yangxu';Database link created.2.create tableSQL> create table mon_t...
[Developer] Rollup
rollup(a,b,c)=group by a,b,c + group by a,b + group by a + group by nullrollup(a,b)=group a,b + group by a + group by nullSQL> select * from emp; EMPNO ENAME JOB &n...
[Shell] monitor filesystem
oracle6机器是收集filesystem的机器,访问其他的linux服务器按照monitor cpu&mem的顺序,配置/etc/hosts,创建user,配置ssh1.创建tableTable created.SQL> create table mon_filesystem 2 (hostname varchar2(20), 3 filesystem varchar2(100), 4 allbytes var...
3.linux monitor filesystem
oracle6机器是收集filesystem的机器,访问其他的linux服务器按照monitor cpu&mem的顺序,配置/etc/hosts,创建user,配置ssh1.创建tableTable created.SQL> create table mon_filesystem 2 (hostname varchar2(20), 3 filesystem varchar2(100), 4 allbytes var...
2.linux monitor cpu&mem收集数据
oracle6机器是收集cpu&mem的机器,访问其他的linux服务器1.在/etc/hosts添加IP和hostname对应关系[root@oracle6 ~]# more /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.l...
[Shell] monitor cpu&mem收集数据
oracle6机器是收集cpu&mem的机器,访问其他的linux服务器1.在/etc/hosts添加IP和hostname对应关系[root@oracle6 ~]# more /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.l...
[Linux] SSH 报Warning "Pseudo-terminal will not be allocated ....."
Linux SSH 报Warning "Pseudo-terminal will not be allocated because stdin is not a terminal."SSH已经配置好了MEMTOTAL=`echo "cat /proc/meminfo | grep -i memtotal" | ssh mon@$LINE`执行上面这个命令的时候报如下warning:Pseudo-terminal will not be allocated because stdin is not a terminal.加入参...
[Linux] SSH配置了免密码登录,登录时还要输入密码
Linux SSH配置了免密码登录,登录时还要输入密码[mon@oracle6 ~]$ ll .sshls: cannot access .ssh: No such file or directory[mon@oracle6 ~]$ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/mon/.ssh/id_rsa): Created directory '/home/mon/.ssh'....
[Developer] ORA-00979:not a group by expression
今天在执行如下SQL报了ORA-00979:not a group by expressionSELECT aaaaa,bbbbb,ccccc,COUNT(*) QTY FROM ( select CASE WHEN to_char(a.updatettime,'HH24')>='22' THEN to_char(a.updatettime +1,'YYYYM...
[Shell] linux df 输出内容格式化
对linux df 输出内容进行格式化添加/usr/bin/dfb文件[root@oracle6 ~]# more /usr/bin/dfb{if (split($0, f) == 1) { getline split($0, rest) for (i = 1; i
[Linux] df输出换行
linux df输出有时候会发生换行[root@oracle6 ~]# dfFilesystem 1K-blocks Used Available Use% Mounted on/dev/mapper/vg_oracle6-lv_root 51606140 47447392 1537...
[HP-UX] HA切换命令
BIOS-->Bootloader-->Kernel-->init-->service-->login-->bashpowermt display dev=allHP-UX HA相关命令cmhaltnode XXXXX008 --停止(halt)nodecmrunnode -v XXXXX008 --激活nodecmviewcl 查看cluster状态cmviewcl -v 查看cluster详细状态cmrunpkg -v -n XXXXX0...
[Developer] NVL,NVL2,NULLIF,COALESCE,DECADE,CASE
记录一下NVL,NVL2,NULLIF,COALESCE,DECADE,CASE 函数的意思:nvl(v1,v2) if v1 is null then result=v2 else result=v1 endnvl2(v1,v2,v3) if v1 is null then result=v3 else result=v2 endnullif(v1,v2) if v1=v2 then result=null else result=v1 endcoalesce(v1,v2,.....vn) return the first...