Hi,
Here's my simple code that may solve your problem.
Lets say you have a 'usr' table with 'user ID, user Name, status (Active(A) or Suspended (S))'
1. Connection to DB is established wrt DB name in the tnsnames entry
2. Select/update query will retrive/update the information from the table resp.
Code:
#!/bin/ksh
echo "Please enter the User Id of the USER whose status needs to be activated"
read usrId
sqlplus username/password@database_name <<ENDOFSQL
set head off;
set feedback off;
set lines 300;
select * from usr where usrid='$usrId';
update usr set status='A' where usrId='$usrId';
ENDOFSQL
echo " "
echo "User Activated :: `echo $usrId`"
echo " "
exit;
Regards,
Sumedha