02-10-2008
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....
10 More Discussions You Might Find Interesting
1. Solaris
All,
We are contemplating a port of an existing software product and would like to expend as little effort as possible. Our new database would be MS-SQL, and we would write stored procedures to perform common db operations. We'd like to call these stored procedures from C or C++ code running... (3 Replies)
Discussion started by: mparks
3 Replies
2. UNIX for Advanced & Expert Users
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.... (1 Reply)
Discussion started by: maverick1234
1 Replies
3. Shell Programming and Scripting
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.... (1 Reply)
Discussion started by: maverick1234
1 Replies
4. UNIX for Advanced & Expert Users
Hi ALL,
I would like to execute one SQL query(ORACLE) in UNIX shell script. For this I used sqlplus in script and tested locally. It worked fine. But my requiremnt is to execute the script from Java. In this case the UNIX part is working but sqlplus is not returning anything
The JAVA code used... (0 Replies)
Discussion started by: anooptech
0 Replies
5. Shell Programming and Scripting
Hi All,
I need to select one column from a table based upon the passed in parameter.
I tried this:
sqlplus -silent $MISP_USER << EOF
set feedback off;
set verify off;
set sqlprompt ""
SELECT mail_flag
FROM dailyjobs
WHERE job_name = '$1';
exit 0
EOF
exit... (1 Reply)
Discussion started by: ganga.dharan
1 Replies
6. Shell Programming and Scripting
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
Discussion started by: praka
6 Replies
7. UNIX for Dummies Questions & Answers
I want to perform few post-session success tasks like update a status to 'true' in one of the sql database table, update date values to current system date in one of the configuration table in sql. How do i achieve this in a post session command?syntax with example will be helpful. (3 Replies)
Discussion started by: nathanvaithi
3 Replies
8. UNIX for Advanced & Expert Users
I have few .sql file at some location say /x/y/z. I want to execute those .sql files in UNIX server so that all packages,procedures can be applied on the database of the UNIX server. (1 Reply)
Discussion started by: Dip
1 Replies
9. Shell Programming and Scripting
Hi All,
Please help me out in executing the following db2 querry in unix
db2 "select AP_RQ_ACQ_INST_ID || ',' || txn_classifier || ',' || AP_RS_RESP_CD || ',' || (count(*) AS COUNT1) || ',' || (SUM(AP_RQ_TXN_AMT) AS TOTAL_AMT) from TXN_RECORD where
CREATE_TS > '2010-11-22 11:00:00.008645' ... (1 Reply)
Discussion started by: dudd9
1 Replies
10. Shell Programming and Scripting
Greetings Experts,
I am on AIX using ksh. Created a unix script which generates the CREATE OR REPLACE VIEW ... and GRANT .. statements, which are placed in a single .txt file. Now I need to execute the contents in the file (there are around 300 view creation and grant statements) in Oracle and... (4 Replies)
Discussion started by: chill3chee
4 Replies
LEARN ABOUT DEBIAN
redshift
REDSHIFT(5) REDSHIFT.CONF(5) REDSHIFT(5)
NAME
redshift.conf - configuration file for redshift and gtk-redshift
DESCRIPTION
A configuration file with the name `redshift.conf' can optionally be placed in `~/.config/'. The file has standard INI format. General pro-
gram options are placed under the `redshift' header, while options for location providers and adjustment methods are placed under a header
with the name of that provider or method. General options are:
temp-day = integer
Daytime temperature
temp-night = integer
Night temperature
transition = 0 or 1
Disable or enable transitions
brightness-day = 0.1-1.0
Screen brightness at daytime
brightness-night = 0.1-1.0
Screen brightness at night
gamma = R:G:B
Gamma adjustment to apply
adjustment-method = name
Select adjustment method. Options for the adjustment method can be given under the configuration file heading of the same name.
location-provider = name
Select location provider. Options for the location provider can be given under the configuration file heading of the same name.
Options for location providers and adjustment methods can be found in the help output of the providers and methods.
EXAMPLE
Example for Copenhagen, Denmark:
$ redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m vidmode -v
An example configuration file with the same effect as the above command line:
[redshift]
temp-day=5700
temp-night=3600
gamma=0.8
adjustment-method=vidmode
location-provider=manual
AUTHOR
redshift was written by Martin Koelewijn and Jon Lund Steffensen.
This manual page was created by Franziska Lichtblau <rhalina@old-forest.org> for the Debian project (and may be used by others).
redshift 1.7 June 2012 REDSHIFT(5)