I am trying to insert records to a table using a shell script. but it doesn't work. can you please help me on this ?
#!/bin/bash
HOST=`hostname`
sqlplus / as sysdba << EOF > /dev/null
insert into bslogger.status (PKID, HostName, DBName, BackupType, StartTime, EndTime, Status, LastUpdatedTime)
values (status_seq.nextval, '$1', '$2', '$3', sysdate, '', '$4', sysdate);
commit;
EXIT
EOF
echo $ORACLE_HOME
I've just echoed ORACLE_HOME for debugging purposes and it returns the correct home.