Shell Script to execute a remote SQL Server procedure

Hi,

In a project I'm working on, I need to come up with a shell script which will execute a remote SQL Server stored procedure. Any help will be appreciated. Thanks in advance.
 
------------
tab=$1

sqlplus -S "uname"/"password" <<sqlsptdem
col object_name format a50

set pagesize 50000
spool sql_output.log
select cust_name from customer where customer_id=$1;
sqlsptdem
------------

save above code with .sh extension,
give appropaite uname and password .
$1 and $2 indicate command line parameters, u can hard code it for testing purpose if u want.
u will get the result in "sql_output.log" file
 
Back
Top