Problem with script status table


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Problem with script status table
# 1  
Old 08-26-2011
Problem with script status table

I have a bunch of new, complex scripts that I'm running in Oracle via SQL*Plus under my UNIX account. In an attempt verify that various stages of the script have completed and to locate any errors I periodically toss in a statement such as

INSERT INTO status_run9 VALUES (SYSDATE,'Script_D15','Section 12 Completed',USER);
PROMPT Script_D15 Section 12 Completed

This then dumps status to an Oracle table (status_run9) and displays it to the screen -- it has worked quite well so far. Today I noticed that when the script finished running it sent a message to the screen but it did not enter a line in the table (status_run9) even though the PuTTY terminal showed “1 row created”. I tried manually entering the above INSERT and PROMPT statements a few times - nothing appeared in the table but I would get a “1 row created” message and PROMPT output each time. I closed UNIX down and rechecked the table once more (using straight-up SQL*Plus under Oracle - as I had done previously during the day) and voila - a number of entries appear that should have (in my opinion) appeared about 10 minutes before.

It seems that UNIX is reporting that the Oracle table is updated when Oracle doesn't yet have the information ... or that Oracle doesn't write to the table when the PuTTY terminal indicates that it does. Does it do that? Is there a way to “force” the entry to appear in the Oracle table when the “1 row created” message appears? Ideally I'd like to have several people monitoring script progress by refreshing an SQL*Plus window periodically but if the last status doesn't properly post it will have much less value to us.

Any help is appreciated - thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

How to track table status delete/update/insert status in DB2 V10 z/os?

Dear Team I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update ) Scenario We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)
Discussion started by: Perlbaby
1 Replies

2. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

3. Solaris

File Table full problem

Hi All, In my Big brother monitoring, I can see File table is 97.4% full. On searching more, I can see it is complaining for kernel open files, it seems. If it is issue of too many open files, can we resolve it with reboot ? # /usr/local/bin/lsof | wc -l 89132 /# /usr/local/bin/lsof | grep... (4 Replies)
Discussion started by: solaris_1977
4 Replies

4. Shell Programming and Scripting

last command status problem

Hi there is below code in my code , i did not understand what does it mean RC=0 RC=$(( RC | $? )) Please help me regarding this ---------- Post updated at 02:22 AM ---------- Previous update was at 01:46 AM ---------- Below is more example of the code (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

5. Shell Programming and Scripting

problem in exit status of the command in a shell script-FTP

Hi All, I have developed below script for FTP a file from unix machine to another machine. ftpToABC () { USER='xyz' PASSWD='abc' echo "open xx.yy.zbx.aaa user $USER $PASSWD binary echo "put $1 abc.txt" >> /home/tmp/ftp.$$ echo "quit" >> /home/tmp/ftp.$$ ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies

6. Shell Programming and Scripting

Problem in scheduling an Export of a table

Hi, I am facing a problem while scheduling an export of a table using cron job. I have written a simple export command inside a shell script test.sh like echo started exp schemaname/temp1234 file= /test/d.dmp tables=per_st log= /test/d.log echo ended I tried scheduling it through... (6 Replies)
Discussion started by: beautifulmind
6 Replies

7. Shell Programming and Scripting

Find exit status problem

Hi All Its strange or i am doing it wrong.When find run successful it return exit status 0.And same if it didn't run successfully it return zero. find /var/www/html -maxdepth 1 -type f -name *.dsadas echo $? 0 find /var/www/html -maxdepth 1 -type f -name *.php... (1 Reply)
Discussion started by: aliahsan81
1 Replies

8. Shell Programming and Scripting

Move Command and exit status problem

Hi All, I am using the following code to move files from one folder to another on the remote server: ssh username@server <<EOF cd source_dir find . -type f -name "*.txt" |xargs -n1000 -i{} mv {} dest_dir if then send mail indicating error otherwise echo "success" fi EOF ... (10 Replies)
Discussion started by: visingha
10 Replies

9. UNIX for Dummies Questions & Answers

Move Command and exit status problem

Hi All, I am using the following code to move files from one folder to another on the remote server: ssh username@server <<EOF cd source_dir find . -type f -name "*.txt" |xargs -n1000 -i{} mv {} dest_dir if then send mail indicating error otherwise echo "success" fi EOF ... (1 Reply)
Discussion started by: visingha
1 Replies

10. Shell Programming and Scripting

Problem with exit status

Hi, Consider the output of the following commands: case1) ------- # ifconfig -a | grep "UP" | grep uplink0:1 # echo $? Output is: 0 case2 ------ # ifconfig -a | grep "UP" | grep uplink0:1; echo $? Output is: 1 In case2 we got the exit code as 1, which is the actual exit code.... (1 Reply)
Discussion started by: diganta
1 Replies
Login or Register to Ask a Question