Sunday, August 7, 2011

Back up in Oracle 10g !

Every one must be thinking of making a backup for their project.There are many ways of doing backup.....
Here is a simple way of doing backup ........

I will provide a short and simple story...
Sam is a project developer.He is developing a windows based application for his client.When he was building the application his client asked him to provide backup of data,when the application is corrupted.He wanted a total recovery of data,if the system gets formatted.
So what should Sam do ??
Finally now Sam can use the following solution :

Steps to be followed


1) Go to Oracle10g Express Edition.
2) Click on backup Database (This is done to ensure that data is saved.Sam can asked the client to backup his database at the end of day or he can make a backup control in .net using vb.net or c#.net.This will make the work of client simple.Also a better approach will be the developer i.e sam can build an application in .net which will ensure that data is backuped after every 1 hour .This can be done using timer control) )
3)After this,u need to copy the following files,from the following locations :
Drivename:\oraclexe\oradata\XE (Control.dbf,sysaux.dbf,system.dbf,temp.dbf,undo.dbf,users.dbf).
4)Also copy files from this location
C:\oraclexe\app\oracle
This contains Flash recovery area.Copy files from This location

5)When the application gets corrupted,what steps to be followed
a)Uninstall oracle 10g
b)Install it again
c)now go to oracle 10g express edition
d)Copy the following files that u copied earlier into the same location
Drivename:\oraclexe\oradata\XE (Control.dbf,sysaux.dbf,system.dbf,temp.dbf,undo.dbf,users.dbf).
C:\oraclexe\app\oracle
flash recovery location area
C:\oraclexe\app\oracle\flash_recovery_area.

6)now Restore ur database by going to oracle10g express edition and click on Restore Database. NOW ur Data is restored...............
7) So simple !!!!