By the way you can establish a direct database connection instead of having a connection-less session with /NOLOG and then connecting. NOLOG is useful for performing some database administration tasks, writing transportable scripts, or to use SQL*Plus editing commands to write or edit scripts.
Hi All,
I am executing the following code :-
sqlplus -s ${DATABASE_USER} |&
print -p -- 'set feed off pause off pages 0 head off veri off line 500'
print -p -- 'set term off time off serveroutput on size 1000000'
print -p -- "set sqlprompt ''"
print -p -- "SELECT run_command from... (2 Replies)
i'm not new to programming, but i AM new to unix scripting. here's my deal.
this works:
#!/bin/ksh
echo "HELLO"
/oracle_home/bin/sqlplus username/password@MYDB<<EOF
SELECT COUNT(*) FROM EMPLOYEES;
EOF
exit
echo "GOODBYE"
this doesn't:
#!/bin/ksh
echo "HELLO"
for x in 1 2... (4 Replies)
I have korn shell scripts.
I want to pass a variable to a script which will execute a a sql script to read a table that contains env. variables. I want to read and then somehow export at unix level variables
example
for every row selected from the table build export command line
field1... (5 Replies)
Hi,
I am facing the following error in calling the stored procedure from SQLPLUS in unix environment.
SQL> set serveroutput on
SQL> var store number;
SQL> exec test_proc(:store, 200);
BEGIN TEST_PROC(:store, 200); END;
*
ERROR at line 1:
ORA-01858: a non-numeric character was found... (8 Replies)
I'm calling an embedded sql from my shell script file. This sql does simple task of spooling out the contents of the table (see below my sample code) into a spool file that I specify. So far so good, but the problem is that the output is also displayed on screen which I do NOT want.
How can I... (3 Replies)
I want to execute a shell script from sqlplus prompt and get its output back to sqlplus. Is this possible?
if yes just give me an example for doing that. (2 Replies)
Hello All,
I have a UNIX script which will prepare anonymous oracle pl/sql block in a temporary file in run time and passes this file to sqlplus as given below.
cat > $v_Input_File 2>>$v_Log << EOF
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION FORCE PARALLEL DML PARALLEL 16';
EXECUTE... (1 Reply)
Hello All,
I have exactly same issue @vikas_trl had in following link:
https://www.unix.com/shell-programming-and-scripting/259854-control-not-returning-sqlplus-calling-unix-shell-script.html
I wonder if he or somebody else could find the issue's cause or the solution.
Any help would... (4 Replies)
Hi,
I am trying to write a script that calls an Oracle SQL file who in turns call another SQL file. This same SQL file has to be run against the same database but using different username and password at each loop.
The first SQL file is basically a connection test and it is supposed to sort... (2 Replies)
Hi All,
we have requirement, i am created a shell script , inside i am connecting sqlplus and execute the query. below my code for your reference.
get_sqlid ()
{
sqlid=$(
sqlplus -s $PBDW_USERID/$PBDW_PW@$PBDW_SID <<EOF
DEFINE TBLNAME=$1
set feedback off
set serverout on size... (4 Replies)
Discussion started by: KK230689
4 Replies
LEARN ABOUT DEBIAN
net::sieve::script
Net::Sieve::Script(3pm) User Contributed Perl Documentation Net::Sieve::Script(3pm)NAME
Net::Sieve::Script - Parse and write sieve scripts
SYNOPSIS
use Net::Sieve::Script;
my $test_script = 'require "fileinto";
# Place all these in the "Test" folder
if header :contains "Subject" "[Test]" {
fileinto "Test";
}';
my $script = Net::Sieve::Script->new ($test_script);
print "OK" if ( $script->parsing_ok ) ;
print $script->write_script;
or
my $script = Net::Sieve::Script->new();
my $cond = Net::Sieve::Script::Condition->new('header');
$cond->match_type(':contains');
$cond->header_list('"Subject"');
$cond->key_list('"Re: Test2"');
my $actions = 'fileinto "INBOX.test"; stop;';
my $rule = Net::Sieve::Script::Rule->new();
$rule->add_condition($cond);
$rule->add_action($actions);
$script->add_rule($rule);
print $script->write_script;
DESCRIPTION
Manage sieve script
Read and parse file script, make Net::Sieve::Script::Rule, Net::Sieve::Script::Action, Net::Sieve::Script::Condition objects
Write sieve script
Support RFC 5228 - sieve base
RFC 5231 - relationnal
RFC 5230 - vacation
Draft regex
missing
5229 variables
5232 imapflags
5233 subaddress
5235 spamtest
notify draft
CONSTRUCTOR
new
Argument : optional text script
Purpose : if param, put script in raw, parse script
Return : main Script object
Accessors :
->raw() : read or set original text script
->require() : require part of script
->rules() : array of rules
->max_priority() : last rule id
METHODS
parsing_ok
return 1 on raw parsing success
write_script
Purpose : write full script, require and rules parts
Return : set current require,
return rules ordered by priority in text format
equals
$object->equals($test_object): return 1 if $object and $test_object are equals
read_rules
$script->read_rules() : read rules from raw
$script->read_rules($some_text) : parse text rules
use of read_rules set $script->rules()
Return 1 on success
find_rule
Return Net::Sieve::Script::Rule pointer find by priority
Return 0 on error, 1 on not find
swap_rules
Swap priorities,
now don't take care of if/else/elsif
Return 1 on success, 0 on error
reorder_rules
Reorder rules with a list of number, start with 1, and with blanck separator. Usefull for ajax sort functions.
Thank you jeanne for your help in brain storming.
Return 1 on success, 0 on error
delete_rule
Delete rule and change priority, delete rule take care for 'if' test
if deleted is 'if'
delete next if next is 'else'
change next in 'if' next is 'elsif'
Return : 1 on success, 0 on error
add_rule
Purpose : add a rule in end of script
Return : priority on success, 0 on error
Argument : Net::Sieve::Script::Rule object
BUGS
Rewrite a hand made script will lose comments. Verify parsing success with parsing_ok method before write a new script.
SUPPORT
Please report any bugs or feature requests to "bug-net-sieve-script at rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Sieve-Script>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
AUTHOR
Yves Agostini - Univ Metz - <agostini@univ-metz.fr>
<http://www.crium.univ-metz.fr>
COPYRIGHT
Copyright 2008 Yves Agostini - <agostini@univ-metz.fr>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Net::Sieve
perl v5.10.0 2008-09-15 Net::Sieve::Script(3pm)