Your Ad Here

Selasa, 13 November 2012

Unix Tip: SHELL SCRIPTING A SQLPLUS SCRIPT

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3566 - November 13, 2012

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


SHELL SCRIPTING A SQLPLUS SCRIPT


Here is a tip on how to run sqlplus scripts within a shell script.
It is an example of how to pass database values into shell variables
and to make shell scripts more dynamic. This maybe elementary to some
folks but hope it helps others.....Here is the syntax:

#!/bin/sh
dummyvar=`sqlplus -s username/password <<end
set pagesize 0 feedback off ver off heading off echo off
select sysdate from dual;
exit;
end`
echo "system date is " $dummyvar

Tidak ada komentar:

Posting Komentar

Your Ad Here
Free Automatic Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink