In this article, I am going to demo the basic Oracle Backup/Restore.
Find all the database files:
select name from v$datafile;
select name from v$tempfile;
select name from v$controlfile;
select member from v$logfile;
Offline backup/Cold backup
Shutdown the database server and use the operation command to copy.
Online Backup/Warm backup
-- Begin the backup for all datafile
alter database begin backup;
-- Begin backup for single data file
alter tablespace example begin backup;
-- Check if the data file is in backup mode
select * from v$backup;
- Shutdown the database server and use the operation command to copy.
- Also need to backup the parameter file.
- Backup the log file, archive the current log and backup the log use os command
ALTER SYSTEM ARCHIVE LOG current;
- Backup the control file
alter database backup controlfile to '/u01/app/oracle/control_back.ctl';
Database Recovery
-- shutdown the database and listener
-- startup listener
-- start database mount
-- recover database
-- alter database open
User Tablespace recovery
alter tablespace example offline immediate;
recover tablespace example;
alter tablespace example online;
DataFILE recovery
alter database datafile '/u01/app/oracle/oradata/oracledb1/system01.dbf' online;
recover datafile '/u01/app/oracle/oradata/oracledb1/system01.dbf';
alter database open;
• It’s always so sweet and also full of a lot of fun for me personally and my office colleagues to search your blog a minimum of thrice in a week to see the new guidance you have go
ReplyDeletehttps://www.besanttechnologies.com/training-courses/oracle-training