Thread: backup and restore
10-22-04, 12:01 #1Registered User
- Join Date
- Jan 2003
- The Netherlands
Unanswered: backup and restore
I made an online backup with sqlplusw. First I put my database in archive log mode like this:
startup mount exclusive;
ALTER database archivelog;
ARCHIVE log start;
ALTER database open;
Then I made an online backup like this:
ALTER tablespace system begin backup;
alter tablespace users begin backup;
alter tablespace indx begin backup;
alter tablespace system end backup;
alter tablespace users end backup;
alter tablespace indx end backup;
-- Force log switch to update control file headers
ALTER SYSTEM SWITCH LOGFILE;
ALTER DATABASE BACKUP CONTROLFILE TO 'c:\backup\1\control.dbf';
The batchfile(c:\backup\createbackup.bat) looks like this:
copy C:\ORACLE\ORADATA\GBAREN2\SYSTEM01.DBF c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\UNDOTBS01.DBF c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\INDX01.DBF c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\TOOLS01.DBF c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\USERS01.DBF c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\CONTROL01.CTL c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\CONTROL02.CTL c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\CONTROL03.CTL c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\REDO01.LOG c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\REDO02.LOG c:\backup\1
copy C:\ORACLE\ORADATA\GBAREN2\REDO03.LOG c:\backup\1
Now I have all the files needed to restore a database. But how can I restore a database? Is the way described above a good way to make an online backup? I only want to make online backups. I also tried the import/export-way, but our server gets stuck most of the time. So maybe anyone van tell me how to restore a database(without using RMAN). Couldn't find much on the internet about it.
10-22-04, 13:44 #2Registered User
- Join Date
- Jul 2003
I use RMAN. I think it makes life very easy and manages all your backups for you and many other useful things like verifying a backup file is not corrupted and knowing what backup files are irrelavent.
Some dbas like the manual method. This has some advantages as well, but my preference is RMAN.
With RMAN all you have to issue is:
backup database plus controlfile;
then everything is done for you.- The_Duck
you can lead someone to something but they will never learn anything ...
10-22-04, 17:29 #3Registered User
- Join Date
- Dec 2003
First off, I have limited experience with Oracle (~10 months in the DBA role). I started out anti-RMAN, thinking that it's syntax was much more difficult to comprehend, and thus deemed it to be a less useful tool.
I would get the Oracle Press book on RMAN, and take that route. It's a great tool. The Oracle Documentation does a good job as well (http://download-west.oracle.com/docs...9_01/index.htm), but this book filled in all the gaps.