How to take oracle 10g backup?
Try shutting down the database and then issuing the startup command.  Then try your script.  

If you get the same error verify basic connectivity by connecting from sqlplus with the same name and password.

Check your log file location and the any operating system error logs as well.