The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
connect sqlplus from unix nehak UNIX for Dummies Questions & Answers 1 05-27-2008 05:12 AM
Need example program for sqlplus in Unix tobalajia Shell Programming and Scripting 1 05-22-2008 03:35 AM
Executing SQLPLUS in UNIX Script from JAVA anooptech UNIX for Advanced & Expert Users 0 04-16-2008 05:53 AM
Executing pl/sql using sqlplus on unix maverick1234 Shell Programming and Scripting 1 02-11-2008 10:32 AM
Executing pl/sql using sqlplus on unix maverick1234 High Level Programming 1 02-10-2008 07:19 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-10-2008
Registered User
 

Join Date: Feb 2008
Posts: 3
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....
Forum Sponsor
  #2  
Old 02-10-2008
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,030
Pls read the Rules - no cross-posting!
Thread closed
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0