Problems during Hot Backup

Ever had a database go down in the middle of a hot backup (that is, with some tablespaces in backup mode). When the database tries to restart, you get told that you need to perform media recovery. Most DBA's now know that recovery is actually not required, you just need to turn off the backup mode from those files that are affected.

But now there is an easier way in 9i. Simply issue

alter database end backup

and and appropriate files will be corrected. It also returns no error if no files are in backup mode, so it can be added to all standard startup scripts