Useful shortcuts for vi editor

Wednesday, 7 June 2017

A brief look to Oracle backup mode

Backup mode; 
Oracle runs slightly different that database files are able to only use for read (not for write) in SGA and all database changes (DML, DDL, etc) are written into redo log files by Oracle. In that time, user can copy database files to desired folders because database file are frozen by system.
For example, when DML execute, all data block changes are written to redo log files as a exact block not as a delta log. Therefore, 
Oracle runs slowly according to normal mode and staying backup mode for a long time is also important risk for recovery operations. 
e.g. -> if you run "shutdown abort",  database gets crash in startup (ORA-10873, ORA-01110). To solve it, run "recover database".

Enable backup mode:
SQL> alter database begin backup;

If you get ORA-01123 error;
Enable archivelog mode;
https://ozsoyler.blogspot.com.tr/2014/10/how-to-checkopen-archieve-log-in-sqlplus.html

To check current db file status:
SQL> select * from v$backup;
-- status column output should be "ACTIVE"

Now we are able to copy/paste operation on disk:
find datafile paths;
SQL> select * from v$datafile;

Finish file transfer operations then disable backup mode:
SQL> alter database end backup;