Sponsored Content
Top Forums Shell Programming and Scripting Capturing Oracle SQL Error Codes Post 302892507 by jerome_rajan on Thursday 13th of March 2014 06:27:11 AM
Old 03-13-2014
I definitely check for $?. My conundrum was more on the lines of capturing why the error occurred. Smilie
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

capturing oracle procedure out param value

I have a procedure with an out parameter, I want to use this value in a shell script, I've done this in perl before but they want this to be a ksh script. what is the syntax to do this. this was my first thought; #!/usr/bin/ksh sqlplus -s scott/tiger@db << EOF ... (1 Reply)
Discussion started by: edog
1 Replies

2. UNIX for Advanced & Expert Users

Capturing Oracle Shutdown error

Hi, Iam calling 3 sql scripts through one shell script 'rmia.sh'. Till now this was working fine, but last time while calling the SQL scripts, Oracle was down. But amazingly the exit status was '0' (success)!!! Below is the shell code: #!/usr/bin/ksh -x assign_file asql a.sql 1... (15 Replies)
Discussion started by: ganapati
15 Replies

3. Shell Programming and Scripting

Capturing SQL O/P in Unix Script

Hi, I would like to run a job based on the output from the SQL output. Eg: Select count(*) from A ...if count(*) = 1 then execute the next step or else exit. Please advise. Thanks S (2 Replies)
Discussion started by: pyaranoid
2 Replies

4. UNIX and Linux Applications

Oracle return codes?

Having searched high and low through Oracles documentation, I came to think that they're very scripting-averse, as there's (apparently) no list of possible return/exit codes for their various command line utilities. Is anyone here in possession of such a list, or knows where to find one? It... (16 Replies)
Discussion started by: pludi
16 Replies

5. Programming

SQL Oracle error

Am trying to run this : DECLARE CURSOR c1 IS SELECT customer_id, num3 FROM table1 WHERE text1 = 'pp' AND customer_id IS NOT NULL; custcount INTEGER; oldtext24 VARCHAR2 (80); commit_counter INTEGER := 0; BEGIN FOR i IN c1 ... (1 Reply)
Discussion started by: maiooi90
1 Replies

6. Shell Programming and Scripting

perl- oracle sql query

Hi, I am new to perl.How to query oracle database with perl??? Thanks (1 Reply)
Discussion started by: tdev457
1 Replies

7. Shell Programming and Scripting

rm error codes and logging

Afternoon ladies and gents, I am trying to create a simple script to remove a certain file from a user's network profile location. The removal works ok, but in the interest of overkill I would like to add a simple error detection (such as file doesn't exist or permission denied) Currently, it... (2 Replies)
Discussion started by: hateborne
2 Replies

8. Shell Programming and Scripting

Shell script with Oracle PL/SQL

Hi Gurus, I am new to this unix world...I need your help to walk through. I want to learn shell scripting..... The shell script which can be able to use with oracle pl/sql... So please suggest me which shell is good. Which Unix/Linux version is good for this to Install to get practice the... (8 Replies)
Discussion started by: GaneshAnanth
8 Replies

9. Shell Programming and Scripting

Capturing error codes in SFTP commands

Hi, I have been using the SFTP commands in my reusable shell scripts to perform Get/Put operation. The script has a list of 6 errors which i am capturing through the log file using grep command. But I feel there might me more errors which the script might need to capture. I tried to capture the... (2 Replies)
Discussion started by: Bobby_2000
2 Replies
Perl::Critic::Policy::RegularExpressions::ProhibitUnusedUseruContributed Perl Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture(3pm)

NAME
Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture - Only use a capturing group if you plan to use the captured value. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Perl regular expressions have multiple types of grouping syntax. The basic parentheses (e.g. "m/(foo)/") captures into the magic variable $1. Non-capturing groups (e.g. "m/(?:foo)/" are useful because they have better runtime performance and do not copy strings to the magic global capture variables. It's also easier on the maintenance programmer if you consistently use capturing vs. non-capturing groups, because that programmer can tell more easily which regexps can be refactored without breaking surrounding code which may use the captured values. CONFIGURATION
This Policy is not configurable except for the standard options. CAVEATS
"qr//" interpolation This policy can be confused by interpolation of "qr//" elements, but those are always false negatives. For example: my $foo_re = qr/(foo)/; my ($foo) = m/$foo_re (bar)/x; A human can tell that this should be a violation because there are two captures but only the first capture is used, not the second. The policy only notices that there is one capture in the regexp and remains happy. "@-", "@+", $LAST_MATCH_START and $LAST_MATCH_END This policy will only recognize capture groups referred to by these variables if the use is subscripted by a literal integer. $^N and $LAST_SUBMATCH_RESULT This policy will not recognize capture groups referred to only by these variables, because there is in general no way by static analysis to determine which capture group is referred to. For example, m/ (?: (A[[:alpha:]]+) | (Nd+) ) (?{$foo=$^N}) /smx makes use of the first capture group if it matches, or the second capture group if the first does not match but the second does. CREDITS
Initial development of this policy was supported by a grant from the Perl Foundation. AUTHOR
Chris Dolan <cdolan@cpan.org> COPYRIGHT
Copyright (c) 2007-2011 Chris Dolan. Many rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module perl v5.14.2 2012-06-07Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture(3pm)
All times are GMT -4. The time now is 09:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy