Send out email in shell script in Linux
Some times we need to send out email in shell script. The email can arrive the destination mail box if the mail server is in the same subnet. If we need to send email to any mailbox, we have to logon the SMTP server to relay the email.We can use mutt as the mail client to send out attachment and use nbsmtp as SMTP client to relay the email to the SMTP server.For RedHat Linux, you need to download nbsmtp from http://download.chinaunix.net/download.php?id=14627&ResourceID=7230. After make, you
Useful Port List for Linux
When we start a new service, we need to modify iptables to enable the port used by the service.I listed the port for some useful services here.[@more@]Samba: Sometimes we want to share files with Windows machine. So we enable Samba.Samba TCP 445
Change the iptables Setup for Oracle in Linux
After the installation of Linux, the firewall is enabled by default. After we install the database, we need to enable the port.[@more@]To enable the port in iptables, there are two ways to do that.1. We can enable it at run time.After run the command, the rule will take effect immediately. But if we do not write it into the configuration file, then the rule disappear after we restart the service.iptables -I INPUT -p tcp --dport 1521 -j ACCEPT2. We can change the configuration file and restart th
编译DFF
客户运行并发请求时,选择了有参数的并发程序,出现FRM-92100错误,整个FORM退出。可能的原因:文件签名不一致。参考metalink document 463310.1方法:使用adadmin重新编译DFF。[@more@]adadmin -> "Compile/Reload Applications Database Entities menu" -> "Compile Flexfields"
RCS
Check out the latest version:co full_path_nameCheck out the special versionco -f1.11 full_path_name[@more@]As title.
在9.2.0.7.0中重新创建catalog
在9.2.0.7.0中运行?/rdbms/admin/catalog.sql时,需要先禁用一个系统触发器:_SYSTEM_TRIG_ENABLED。参考metalink文档:Note:149948.1 Note:360509.1 Ora-04020 on Sys.Cdc_alter_ctable_before When Running Catalog.Sql[@more@]在以往的经验中,?/rdbms/admin/catalog.sql是可以重复运行的,并且在运行时,不需要进行任何额外动作,对数据库的运行也没有什么影响。在Oracle 9.2.0.7.0中,如果在数据库打开时,直接重新运行catalog.sql这个脚本,会报告:ERROR at line 1:ORA-04020: deadlock detected while trying to lock objectSYS.
拷贝安装Oracle软件到不同目录
通过更改$ORACLE_HOME/lib32/ldflags符号链接,可以在relink时,更改ORACLE_HOME目录。在Solaris 8 下的Oracle 9.2.0.5.0测试通过[@more@]在Solaris 8 下的Oracle 9.2.0.5.0测试通过通常Oracle软件需要图形化界面进行安装。如果需要同时安装多台服务器,则会显得比较慢。通过将已安装好的ORACLE_HOME目录打包,传输到其它服务器上,可以节省大量时间。但通常会要求各服务器的ORACLE_HOME设置相同。通过更改$ORACLE_HOME/lib32/ldflags符号链接,可以在relink时,更改ORACLE_HOME目录。$ORACLE_HOME/lib32/ldflags是一个符号链接,链接到$O
检查Solaris版本信息
查看/etc/release可以看到操作系统版本信息;运行uname -a 可以看到版本信息;运行showrev可以看到版本信心;[@more@]在Solaris中查看版本信息,有几种不同方式:1、直接查看/etc/release信息 # cat /etc/release Solaris 8 2/04 s28s_hw4wos_05a SPARC Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. Assembled 08 January 2004 2、uname # uname -aSunOS tys11app1 5.8 Generic_117350-43 sun4u sparc SUNW,Sun-Fire-V4403、showrev # showrevHostname
低级错误:更改job相关参数后,要commit
今天犯了个低级错误:在使用dbms_job.interval更改job的运行间隔后,忘了commit,导致更改一直不生效,而且job停止执行!(Oracle 9.2.0 on Solaris 8)[@more@]打雁人被雁啄了眼!没想到居然会犯如此低级的错误!在做job试验,验证错误ORA-12005发生情况时,居然忘了在更改job信息后,都要commit。从上午10点多开始做试验,一直忙到现在!真是浪费时间和精力啊!找到原因后,重新仔细读了一遍DBMS_JOB包的参考手册,里面并没有明确的说明,在任何更改后都要进行commit提交,只是在submit的例子中有commit语句。教训:阅读文档要仔细,并且要
更改当前schema
在session中,更改当前schema而不重新登陆。可适用于使用system用户管理其他用户下的数据,而不必在每个表前都加上schema限定词。[@more@]在SQL语句中指定对象时,如果不限定对象所在schema,则会使用当前连接用户schema下的对象。通过更改当前session的schema,我们可以在不进行schema限定的情况下,直接引用其他schema下的对象。尽管public也是oracle中的一个特殊的schema,我们不能将当前schema更改为public。oracle会报告一个错误:ORA-02421: missing or invalid schema authorization identifier使用system连接,可以运行以下语句来
日常检查
日常健康检查的脚本。只对单实例系统有效,不能在RAC系统中使用。[@more@]Rem Rem chk_health.sqlRem 1.0Rem by Pond KaRem Rem usage: sqlplus system/password_of_system@connect_string @chk_health.sqlRem only for single instance databaseRem not suitable for RACRemRemRem This script do health check .Rem Must run under system or user has dba privilege.Rem set pages 0set lines 1000set trimspool onset head offset feedback offset echo offset verify offRem get report name based on database name and report date