Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: svrmgrl question
using a shell wrapper ( unix or MKS Toolkit in windows ), construct the sql statement and feed it to svrmgrl via a HERE document.
:
#
# Shell script start
CONNECT=scott/tiger
TABLE_NAME=$1
SQLSTMT="select * from $TABLE_NAME"
TNS_SERVICE=""
#TNS_SERVICE="@tnsservice"
# Assuming your Oracle Environment is set: $ORACLE_HOME/bin/svrmgrl <<EOT
connect ${CONNECT}${TNS_SERVICE};
${SQLSTMT};
EOT
# Shell script end
If script name is "runit" and is executable, callit like this...
runit <table_name>
That is minimal and you probably should start using SQL*PLUS, but it's a good starting point.
-Kevin
"Scott Weiner" <sweiner_at_infinata.com> wrote in message
news:3A9FC85C.F868FAAA_at_infinata.com...
> I want to execute a sql script: Test.sql using svrmgrl.
>
>
>
>
>
![]() |
![]() |