Is there a way to run a shell script that when it updates one sqlplus instance it will update a second?
Code:
echo "Please enter last name: 'input;"
read input
Statement2="INSERT INTO users VALUES ('"$input"');"
output1=$($sqlplus -s User/Pass@connection <<EOF
set head off
select count (*) from users
where fname = '$input';
EXIT;
EOF
)
read -p "User $input appears $output1 times. Create user? [Y/n]" answer
if [ -z "$answer" -o "$answer" == "y" -o "$answer" == "Y" ]
then
$sqlplus -s User/Pass@connection << Eossql
set autocommit on
set head off
$Statement2
quit;
Eossql
else
echo "Not creating user"
fi
How can I update a second sqlpus instance with a separate userid and password if the end user selects (y)
Thanks!