Sponsored Content
Top Forums Shell Programming and Scripting Check for “errors” or “ORA-” Post 302947720 by haadiya on Sunday 21st of June 2015 01:21:24 AM
Old 06-21-2015
Check for “errors” or “ORA-”

I want to check for "errors" or "ORA-" in Y.if there is an error then exit

Code:
Y=`sqlplus -s user/passwd<< EOF
exec test_Proc;
exit;
EOF`

if [ echo $Y | awk '/ERROR/ || /ORA-/' ] ; then
exit 1
fi

but this doesnt work

Last edited by haadiya; 06-21-2015 at 02:36 AM.. Reason: Add CODE tags, again.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Check my crontab for possible errors.

I'm posting the line I just added to my crontab because it's my first and I want to be sure it's doing what I'm intending it to do. 59 23 0 * 1-5 /export/<many_directories_later...>/scripts/get_clientkpi.sh Supposed to do: Run script at 11:59pm every night, except weekends. Question: If I wish... (4 Replies)
Discussion started by: yongho
4 Replies

2. What is on Your Mind?

Check this out. Find out the errors as much as possible. thanks

Sorry guys, busy working on a new project these days so I am not able to keep this topic update frequently. Few days earlier I talked to some of my friends in China and understand more about the current situation of China's IT industry. From what they told me and considering my experience and... (6 Replies)
Discussion started by: CULM
6 Replies

3. Shell Programming and Scripting

How to get ORA errors in alertlog file using shell script.

Hi, Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script. Thanks (3 Replies)
Discussion started by: suman_dba1
3 Replies

4. Solaris

maxuprc and maxusers - ORA-27300, ORA-27301, ORA-27302

Hi all, Am intermittently getting the following errors on one of my databases. Errors in file /oracle/HRD/saptrace/background/hrd_psp0_13943.trc: ORA-27300: OS system dependent operation:fork failed with status: 12 ORA-27301: OS failure message: Not enough space ORA-27302:... (1 Reply)
Discussion started by: newbie_01
1 Replies

5. UNIX for Advanced & Expert Users

grep all ORA errors except one ORA error

Hi - I am trying to grep all "ORA" errors in a log files.I have to grep all ORA errors except one error for example ORA-01653.How can exclude that error in "grep" command? In following "grep" command I want to exclude "ORA-01653" error grep -i ORA alert.log >>/tmp/ora_errors.txt ... (7 Replies)
Discussion started by: Mansoor8810
7 Replies

6. Shell Programming and Scripting

Shell script to capture ORA errors from Alert Log

Hi, as the title says, I am after a simple script, which will open the Alert log from an 11.2.0.1 Linux environment and mail the error message and description to a recipient email address. I can then schedule this job via cron and let it run every 15 minutes. I have searched online... (16 Replies)
Discussion started by: jnrpeardba
16 Replies

7. Shell Programming and Scripting

How to turn off ora errors in shell script?

I have a shell script which select total count from a table and use its value in a if condition like below connect_string="username/password@tnsname" tot=`sqlplus -s $connect_string << EOF set echo off set feedback off set head off select count(*) from test_table; EOF ` if then echo... (2 Replies)
Discussion started by: vel4ever
2 Replies

8. Shell Programming and Scripting

Extracting Sysdate-1 ORA Errors - Can you help me in this UNIX Script?

Hi Guys, I wanted to create an Unix Shell Script that should fetch a particular string from a text file on a particular date. We all know Oracle generates alert logs for each and every day for every actions in the database. I have an alert log file now where it contains for about a months... (4 Replies)
Discussion started by: raja_dba
4 Replies

9. Shell Programming and Scripting

Shell script to capture Current day ORA errors from Alert Log

Please provide Shell script to capture ORA errors from Alert Log for a given date or Current date. -Veera (1 Reply)
Discussion started by: Veera_V
1 Replies

10. Red Hat

Ora-27603:ora-27626:

Hi, User claim that job is running slow from their end. I DBA found in database the below errors in alert log file. ORA-27603: Cell storage I/O error, I/O failed on disk o/192.168.10.3/RECO_DM01_CD_01_drm01 at offset 13335789568 for data length 1048576 ORA-27626: Exadata error: 2201 (IO... (2 Replies)
Discussion started by: Maddy123
2 Replies
PWCK(1) 						      General Commands Manual							   PWCK(1)

NAME
pwck - verify integrity of password files SYNOPSIS
pwck [-sr] [passwd shadow] DESCRIPTION
pwck verifies the integrity of the system authentication information. All entries in the /etc/passwd and /etc/shadow are checked to see that the entry has the proper format and valid data in each field. The user is prompted to delete entries that are improperly formatted or which have other incorrectable errors. Checks are made to verify that each entry has - the correct number of fields - a unique user name - a valid user and group identifier - a valid primary group - a valid home directory - a valid login shell The checks for correct number of fields and unique user name are fatal. If the entry has the wrong number of fields, the user will be prompted to delete the entire line. If the user does not answer affirmatively, all further checks are bypassed. An entry with a dupli- cated user name is prompted for deletion, but the remaining checks will still be made. All other errors are warning and the user is encouraged to run the usermod command to correct the error. The commands which operate on the /etc/passwd file are not able to alter corrupted or duplicated entries. pwck should be used in those circumstances to remove the offending entry. OPTIONS
By default, pwck operates on the files /etc/passwd and /etc/shadow. The user may select alternate files with the passwd and shadow parame- ters. Additionally, the user may execute the command in read-only mode by specifying the -r flag. This causes all questions regarding changes to be answered no without user intervention. pwck can also sort entries in /etc/passwd and /etc/shadow by UID. To run it in sort mode pass it -s flag. No checks are performed then, it just sorts. FILES
/etc/passwd - user account information /etc/shadow - encrypted password information /etc/group - group information SEE ALSO
group(5), passwd(5), shadow(5), usermod(8) DIAGNOSTICS
The pwck command exits with the following values: 0 Success 1 Syntax Error 2 One or more bad password entries 3 Cannot open password files 4 Cannot lock password files 5 Cannot update password files AUTHOR
Julianne Frances Haugh (jockgrrl@ix.netcom.com) PWCK(1)
All times are GMT -4. The time now is 01:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy