not able to monitor the process

hi all

I am running a script monitor using source command.
the shell script monitor is used to execute a pl/sql procedure.
when i do
source monitor
and then
ps -ef | grep <procedure name>

i do not get any info

but when i do
sh monitor
and then
ps -ef | grep <procedure name>

i get the result.

why is that so and how to monitor by using source.

I think we'll need to see the contents of the monitor script to answer this.

the contents are simple

sqlplus anurag/anurag@anurag << eof
exec sp_proc_data;
eof

thats it.

source command is similar to "." right
i mean source scriptname==. scriptname.

vidyadhar85, that's correct.

infyanurag, what string are you grepping for?

i am using grep -i sp_proc

@infyanurag:

Please post the output of the grep.
Also post the output of "ptree <pid_of_monitor_process>".

That may provide some clue.

well, it seems that the pl/sql script dosnt have a #!
that would explain why with "sh scrip" works, but not with . or source

That seems to be the case. Btw, it is not pl/sql script, it is a shell script running inline pl/sql.