Today I learn something good and simple. I will create a sql script to do some of oracle statement but I will drive it from shell script. Then I will pas some parameter from shell script to sql script. Following steps are what I've done, this one only sample :
1. Create shell script as interface
#!/bin/sh
ORACLE_HOME=/opt/oracle/product/10.2.0
export ORACLE_HOME
ORACLE_SID=JAJANGDB
export ORACLE_SID
echo "Begining update activity ..."
date
$ORACLE_HOME/bin/sqlplus -S jajang/jajang @/export/home/jajang/update_prefix/update_prefix.sql 20080711170 20080712170;
echo "Ending update activity ..."
date
2. Create sql script which read input parameter from shell script
select &1, &2 from dual;
exit;
3. Run and look the result
bash-2.05# ./update_prefix.sh >> update_prefix.log
bash-2.05# tail -f update_prefix.log
Mon Aug 25 14:43:04 WIT 2008
old 1: select &1, &2 from dual
new 1: select 20080711170, 20080712170 from dual
20080711170 20080712170
----------- -----------
2.0081E+10 2.0081E+10
Ending update activity ...
Mon Aug 25 14:43:04 WIT 2008
Monday, August 25, 2008
Monday, August 11, 2008
Solaris reboot with no message
Yesterday I got problem, suddenly the solaris server was rebooting without any message left in /var/adm/messages. Usually all information related with system log exists inside. I also checked some log files in /var/log/sulog, /var/crash/, mail, using last command but none of those gave something.
But when I look at system messages when it's booting up then I found that some messages retrieve from LOM. Finally I got clue, I did show log message from ALOM directly with following steps :
1. Connect via ALOM
2. Type #. to change in ALOM mode
3. Type showlogs
Then the messages that I want appeared. It shows that something happen with system board therefore the server reboot abnormally.
But when I look at system messages when it's booting up then I found that some messages retrieve from LOM. Finally I got clue, I did show log message from ALOM directly with following steps :
1. Connect via ALOM
2. Type #. to change in ALOM mode
3. Type showlogs
Then the messages that I want appeared. It shows that something happen with system board therefore the server reboot abnormally.
Monday, August 04, 2008
Brainbench addict :)
This month I have addicted visit and try free test from Brainbench. Actually, If I have some spare times in my office then I take only free test and the result is not bad for the starter. But I have a preparation before taking the test by reading the book and getting help from Mr Google.
This transcript is the test that I've done, and fortunately I always passed those and the score is good enough. The next test I will take is about RHEL 5 (Redhat Enterprise Linux 5). I already got the manual book and still learning about that.
But the only thing is I cannot get certificate for free and only take free test :(. Let's see if there is some money then I will. And also I have dream to be get a Master cerfiticate, only if your score is more than 4.0 of 5.0. Currently my highest score only 3.99 :(
Subscribe to:
Posts (Atom)