sql>alter tablespace begin backup;
copy all the datafile,redolog file,
from querying v$datafile,v$controlfile
after backing up end the command.
sql>alter tablespace end backup;
repeat this for all tablespaces

1 User has rated as useful.
Login to rate this answer.
In oracle 9i we have some limitation with reqard to Backing up entire dataabase in one go. First we will have to take the database in mount stage (not open) in order to take the back up, and that too, one tablespace at a time.
like:-
sql>alter tablespace begin backup;
copy all the datafile
querying v$datafile,v$controlfile
after backing up the said tablespace End the command as:
sql>alter tablespace end backup;
Login to rate this answer.
We use alter database begin backup to copy datafile from one location to
another using host command copy / cp (based on environment).
The command is already posted
Alter tablespace < tablespace name >
Begin backup
Copy the datafile to another location
After copy alter tablespace < tablespace name >
End backup;
This would tell database that backup has complete its much simpler if the same
things are done using RMAN.
Login to rate this answer.
Sql>alter database begin backup;
The above query is used to freeze the header of all datafiles belongs to tablespace in that particular database.
Freeze means lock i.e during backup no data's will be get in the datafiles.
To release the headers from freeze by using the following query
Sql>alter database end backup;
so the datas inserted during the backup is stored in database buffer cache after the end backup it will write.

1 User has rated as useful.
Login to rate this answer.
sudhakar
Answered On : Sep 25th, 2011
1- When BEGIN BACKUP is issued:
The hot backup flag in the datafile headers is set, so that the copy is identified to be a hot backup copy.
This is to manage the backup consistency issue when the copy will be used for a recovery.
A checkpoint is done for the tablespace, so that no dirty buffer remains from modifications done before that point.
Begin backup command completes only when checkpoint is done.
2- During backup mode:
The datafile header is frozen so that whenever it is copied, it reflects the checkpoint SCN that was at the beginning of the backup.
Then, when the copy will be restored, Oracle knows that it needs to start recovery at that SCN to apply the archived redo logs.
This is to avoid the header inconsistency issue.
That means that any further checkpoints do not update the datafile header SCN (but they do update a 'backup' SCN)
Each first modification to a block in buffer cache will write the full block into the redo thread (in addition to the default behaviour that writes only the change vector).
This is to avoid the fractured block issue. There may be a fractured block in the copy, but it will be overwritten during the recovery with the full block image.
That means that everything goes as normal except for two operations:
- at checkpoint the datafile header SCN is not updated
- when updating a block, the first time it is updated since it came in the buffer cache, the whole before image of the block is recorded in redo
- direct path writes do not go through the buffer cache, but they always write full blocks and then full block is written to redo log (if not in nologging)
3- When END BACKUP is issued:
A record that marks the end of backup is written to the redo thread so that if the copy is restored and recovered, it cannot be recovered earlier than that point. This is to avoid the backup consistency issue.
The hot backup flag in the datafile headers is unset.
The header SCN is written with the current one.
Login to rate this answer.