-
Executing pl/sql using sqlplus on unix
Hi to all,
I have a endday.sh file. And I execute this like "sh endday.sh" from command prompt. In endday.sh file it writes:
sqlplus temp/temp@data @run.sql&
echo $!>>pid.txt
However my aim is not to put the pid into pid.txt but I need to insert the pid into an oracle table using sqlplus.
so I change the endday.sh like this below:
sqlplus temp/temp@data @run.sql& (1)
sqlplus -s temp/temp@data << EOF (2)
insert into liv_pid (pid) values ($!);
exit
EOF
In the insert into statement by using $!, do I take pid of 1 or 2, and indeed can I take the pid? And does this final endday.sh work?
Thank you very much, and I need urgent help....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|