The only potential problem I see is if you get an error and the "ORA-" message contains a 1 (for example: ORA-01017 Invalid username or password), you would get a false positive.
You could just return your results to a variable, test the exit code and the results and react accordingly:
I don't have my server up to test, but this should work for you.
I use ksh so please excuse any syntax differences...
This query is For HP-UX 11i server.
I have certain oracle process that are running on my system as below :-
rotmgr 3986 1 0 07:49:33 ? 0:00 oracleedjlive (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
rotmgr 26356 1 0 08:14:32 ? 0:00 oracleedjlive... (4 Replies)
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Hello,
Can someone please advise me how to put the db2 query reult into an array?
For example, the query reults are:
string A
string B
string C
Then how do I put them into array=string A
array=string B
... (2 Replies)
How can i modify the below to search for the things i'm looking for during a certain time frame?
select Node, NodeAlias, Summary, Tally, AlertKey, AlertGroup, Manager, Agent from mrtg_alerts where LastOccurrence > '5-Dec-2010' order by Manager desc;
In this particular case, this query is... (3 Replies)
Guys can anyone just tell me whether i can pass a value(from UNIX SCRIPT) as an ARGUMENT in Oracle Query?
e.g.
echo "enter value"
read value
insert into tablename where col=$value /*something like this*/ (1 Reply)
hi Guys,
i have a problem with oracle query in my unix script..
I'm getting the following error while executing..
./logtab.sh: sqlplus -s "pmutv/pmutv1" << EOFSQL^Jset head off^Jinsert into... (2 Replies)
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
Dear community,
I have to make a query from a database and apply the following filter:
select filed1,field2,field3
from database
where (field1 contains only alphanumeric chars and NOT only numbers)
Let me explain better what I Need:
21test ==> OK
test ==> OK
test21 ==> OK
te21st ==>... (6 Replies)
We tried to use to connect to DB using jdbc:Oracle:Oci8:@<SERVICE-A>. Connection fail / refuse with one DB .But its working with other databases.
But through toad, jdbc thin client were able to connect. But this has happen suddenly and were able to connect previously. How to navigate this... (0 Replies)
Discussion started by: udara
0 Replies
LEARN ABOUT DEBIAN
logsave
LOGSAVE(8) System Manager's Manual LOGSAVE(8)NAME
logsave - save the output of a command in a logfile
SYNOPSIS
logsave [ -asv ] logfile cmd_prog [ ... ]
DESCRIPTION
The logsave program will execute cmd_prog with the specified argument(s), and save a copy of its output to logfile. If the containing
directory for logfile does not exist, logsave will accumulate the output in memory until it can be written out. A copy of the output will
also be written to standard output.
If cmd_prog is a single hyphen ('-'), then instead of executing a program, logsave will take its input from standard input and save it in
logfile
logsave is useful for saving the output of initial boot scripts until the /var partition is mounted, so the output can be written to
/var/log.
OPTIONS -a This option will cause the output to be appended to logfile, instead of replacing its current contents.
-s This option will cause logsave to skip writing to the log file text which is bracketed with a control-A (ASCII 001 or Start of
Header) and control-B (ASCII 002 or Start of Text). This allows progress bar information to be visible to the user on the console,
while not being written to the log file.
-v This option will make logsave to be more verbose in its output to the user.
AUTHOR
Theodore Ts'o (tytso@mit.edu)
SEE ALSO fsck(8)E2fsprogs version 1.42.5 July 2012 LOGSAVE(8)