08-02-2001
Unix + oracle doubt....involving shell script
....does the dbms_output.put_line work inside unix shell script?
i mean this is to be inside the sqlplus connection as follows!!
sqlplus -s $UP <<EOJ
..
..
..
dbms_output.put_line ('Insertion procedure failed for UPC BC : ' || wk_key_value || ' Sqlcode: ' || SQLCODE || ' Error message :' || SQLERRM);
..
..
also could neone tell me as to why i am getting the following error
ERROR: ORA-01756: quoted string not properly terminated
after debugging i came to know that this error arises when the control comes across keyword DECLARE in the following code in the script
spout=`sqlplus -s $UP <<EOJ
sqlplus -s $UP <<EOJ
SET HEAD OFF
SET AUTOTRACE OFF
WHENEVER SQLERROR EXIT 255
DECLARE
errmessage VARCHAR2
errcode NUMBER
v_alter_statement VARCHAR2(255)
CURSOR c_constraint_name IS
SELECT constraint_name
FROM dba_constraints
WHERE table_name = 'XX';
..
..
..
i wasn't able to locate why is this happening!
and amazingly the same thing works absolutely fine in another script of mine.
PLZZZZZ help
Regards
Manish
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how to pass values from oracle sql plus to unix shell script (2 Replies)
Discussion started by: trichyselva
2 Replies
2. Shell Programming and Scripting
hai,
can anybody say how to call or to execute an oracle stored procedure in oracle from unix...
thanks in advance.... for ur reply....
by,
leo (2 Replies)
Discussion started by: Leojhose
2 Replies
3. Shell Programming and Scripting
Here's a shell script snippet.....
cd $ORACLE_HOME/bin
Retval=`sqlplus -s <<eof
$TPDB_USER/april@$TPD_DBCONN
whenever SQLERROR exit 2 rollback
whenever OSERROR exit 3 rollback
set serveroutput on
set pages 999
var status_desc char(200)
var status_code... (1 Reply)
Discussion started by: hidnana
1 Replies
4. UNIX for Dummies Questions & Answers
I am using a oracle query from unix..
flag=`sqlplus -s <<EOF
SELECT 'Y' FROM table_name
WHERE cond1 = '${table_name}'
AND DECODE('${var_a}','''NA''',own,'${var_b0}')= own
exception
when no_data_found then
dbms_output.put_line(NVL(l_owner_flag,'X'));
end;
EOF`
Its not validating the... (7 Replies)
Discussion started by: sivakumar.rj
7 Replies
5. UNIX for Dummies Questions & Answers
hi friends,
I would like to do the certification in Korn shell scripts { i am using HP UNIX machine }. is there any certification for UNIX shell script . If yes please tell me the details . i am junior level oracle plsql developer . i interseted in unix shell scripting . i need... (1 Reply)
Discussion started by: rdhaprakasam
1 Replies
6. Shell Programming and Scripting
Hi,
How to fetch data from oracle database in unix shell scripting.
list=`sqlplus -s ds_user/dsuser@EMI <<EOF
set feedback off
set serveroutput on
set heading off
set pagesize 0
set tab off
select IP_ID from table
/
exit
EOF`
The output is not what i expected.I need output in... (4 Replies)
Discussion started by: Anusha_Reddy
4 Replies
7. Shell Programming and Scripting
Hi,
We need to access Oracle DB with shell/perl script in Unix.
Is Oracle client needed in Unix for this.
I have seen threads which tell abt using SQL plus to access Oracle tables.
Can we access DB without SQL PLus installation using scripts in UNix like we access DB using jar files in Java .... (1 Reply)
Discussion started by: justinacc
1 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have basic knowledge on how to write pl/sql code inside shell script.
I am looking for more advance thing. Is there any book for that which can just talk about how to write more advance plsql code inside shell script.
Please help
Thanks!!!!!! (1 Reply)
Discussion started by: diehard
1 Replies
9. Shell Programming and Scripting
Hi all,
$ echo $SHELL
/bin/bash
Requirement - How to pass oracle sql script as argument to unix shell script?
$ ./output.sh users.sql
Below are the shell scripts and the oracle sql file in the same folder.
Shell Script
$ cat output.sh
#!/bin/bash
.... (7 Replies)
Discussion started by: a1_win
7 Replies
10. Shell Programming and Scripting
hi gurus,
I have tried myself to invoke an oracle function. there are three different function available need to be called for differnt. can you tell me whether the below code is correct to call oracle function from shell script.
Any help would be highly appreciated.
cat location.sh
... (5 Replies)
Discussion started by: arun888
5 Replies
LEARN ABOUT DEBIAN
updatejail
JAILER(8) System Manager's Manual JAILER(8)
NAME
updatejail - is a script for rebuilding a chrooted environment made with jailer
SYNOPSIS
updatejail <config.file> <jail identifier>
DESCRIPTION
updatejail is a script which wipes out a chroot environment and rebuilds it. By default it leaves the /dev/log device in the chroot, so you
do not need to restart system logger after updating a jail.
WARNING
Do not configure your daemon inside your jail, because updatejail script will wipe out all the data inside the jail. If you would like to
change any setting inside the jail, make the changes in the original location and then run updatejail . This makes it possible to place a
jail even to a ramdisk.
Options
<config.file>
The configuration file which contains the settings of the new chrooted environment. For further information see man 8 jailer.conf
<jail identifier>
The identifier which specifies which jail will be used. Identifiers need to be defined at jailer.conf . This identifier has to match
the directory name used in the Root location.
BUGS
updatejail will not parse the configuration file and determine the Root location by itself.
For updatejail to work the Root location for the jail identifier has to end with the name of the identifier itself. For example, if your
identifier is apache the Root location in jailer.conf has to be something like /chroots/apache.
SEE ALSO
updatejail(8) jailer.conf(5),
AUTHOR
This manual page was written by Peter Holtzl <peter.holtzl@balabit.hu>.
December 4, 2001 JAILER(8)