Monthly Archives: August 2011

HP Unix上oracle调用crontab报错

Oracle用户的crontab可以运行,但是发现oracle用户无法对其进行修改。 尝试通过crontab –e的方式修改crontab的配置,在保存的时候报错: /app/oracle10g/rman_catalog_dmp> crontab -l 40 14 * * * /app/oracle10g/rman_catalog_dmp/exp_by_date.sh /app/oracle10g/rman_catalog_dmp> crontab -e "/var/tmp/aaaa01943" 1 line, 59 characters 47 14 * * * /app/oracle10g/rman_catalog_dmp/exp_by_date.sh ~ ~ ~ ~ "/var/tmp/aaaa01943" 1 line, 59 characters crontab: can’t create your crontab … Continue reading

Posted in OPERATING SYSTEM | Tagged , , | Leave a comment

CRONTAB调用的备份脚本

EXP备份是DBA常规操作之一,尤其是10g以前的版本没有EXPDP,所有的逻辑备份都是通过EXP来实现。而将EXP写成SHELL脚本,使之可以调用也并没有什么特别之处。不过如果并非oracle用户执行,而是需要CRONTAB自动允许,那么备份的脚本就有一些要求了。 客户环境使用RMAN CATALOG方式备份,而RMAN的CATALOG数据库采用EXP进行逻辑备份。部署了一个每天7点运行的CRONTAB,调用执行EXP的SHELL。巡检时发现这个脚本从未真正运行过。 /app/oracle10g> crontab -l 0 7 * * * /app/oracle10g/rman_catalog_dmp/exp_by_date.sh /app/oracle10g/rman_catalog_dmp> more exp_by_date.sh export ORACLE_SID=RMANDB export ORACLE_BASE=/app/oracle10g export ORACLE_HOME=$ORACLE_BASE/product/10.2.0 export NLS_LANG=American_America.ZHS16CGB231280 EXP parfile=EXP.par file=./rman_catalog.dmp log=./rman_catalog.log/app/oracle10g> crontab -l 0 7 * * * /app/oracle10g/rman_catalog_dmp/exp_by_date.sh /app/oracle10g/rman_catalog_dmp> more exp_by_date.sh export ORACLE_SID=RMANDB … Continue reading

Posted in ORACLE | Tagged , , | 2 Comments

检查数据库CPU和PSU补丁信息

简单描述如何检查当前数据库的CPU和PSU补丁安装情况。 正常情况下有两种方法,一种是登录数据库检查DBA_REGISTRY_HIST视图: MODDB2:[/home/oracle]$sqlplus / AS sysdba SQL*Plus: Release 10.2.0.4.0 – Production ON Thu Aug 18 13:04:43 2011 Copyright (c) 1982, 2007, Oracle. ALL Rights Reserved. Connected TO: Oracle DATABASE 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production WITH the Partitioning, … Continue reading

Posted in ORACLE | Tagged , , , | 3 Comments

个人主页

我的个人主页在Kamus的大力忽悠下,终于面世了。 感谢Kamus在各方面的支持,使得我这个菜鸟也可以在一个小时之内搞定这个主页,感谢ITPUB长久以来的硬件、软件的支持,今后很长一段时间内,我的博客还会在ITPUB上的BLOG同时发布。 以往的博客,肯定会迁移到这个主页上,但是由于数据量太大,迁移操作可能花费很长的时间,而且由于以往博客中包含了大量的链接,完全修改到新的环境中工作量难以估量,如果找不到一个很方便的方法,则不会尝试进行更新了。 主页地址:https://yangtingkun.net

Posted in NEWS | 13 Comments