What Happens When The Database Is in Begin Backup Mode
What Happens When The Database Is in Begin Backup Mode
More
Next Blog
Create Blog
Sign In
Home
Sponsored Partners
Followers
Members (2)
Blog Archive
2012 (9) September (2) June (1) April (1) What happens when the database is in Begin backup ... March (4) January (1) 2011 (6)
By freezing the checkpoint SCN in the data le headers, any subsequent recovery on that par cular hot backup will know that it must commence at that SCN. Having an old SCN in the le header tells recovery that the le is an old one, and that it should look for the archivelog containing that SCN, and applies recovery star ng there. Here we need to know that in hot backup mode the checkpoints to data les are not suppressed . The main checkpoint ag is frozen, frozen but the hot backup Checkpoint SCN will be updated in the le header.
SQL> select * from tab; TNAME TABTYPE CLUSTERID ------------------------------ ------- ---------DEPT TABLE EMP TABLE BONUS TABLE SALGRADE TABLE
1 of 4
2013-03-29 20:33
Oracle DBA Flavours: What happens when the database is in Begin backup mode?
Insert some values into the student table: SQL> insert into student values('venkat'); 1 row created. SQL> commit; Commit complete.
Check the block number and the datale in which the data is stored. SQL> select dbms_rowid.rowid_rela ve_fno(rowid) le_num,dbms_rowid.rowid_block_number(rowid) block_num, name from student; FILE_NUM BLOCK_NUM NAME -------------------------------------4 68 venkat Check the data in the block number 68 with the dd command: [oracle@dg2 ~]$ dd bs=8k skip=68 count=1 if=/u02/oradata/DBACLASS /users01.dbf |strings 1+0 records in 1+0 records out 8192 bytes (8.2 kB) copied, 6.9861e-05 seconds, 117 MB/s Insert another row, commit the transac on and check the block and le informa on: SQL> insert into student values('ram'); 1 row created. SQL> commit; Commit complete. SQL> select dbms_rowid.rowid_rela ve_fno(rowid) "le num", dbms_rowid.rowid_block_number(rowid) "block num",name from student; le num block num NAME ---------- ---------- -------------------4 68 venkat 4 68 ram Make the database in Backup mode: SQL> alter tablespace users begin backup; Tablespace altered. Update the record in the student table:
2 of 4
2013-03-29 20:33
Oracle DBA Flavours: What happens when the database is in Begin backup mode?
SQL> update student set name='rama krishna' where name='ram'; 1 row updated.
[oracle@dg2 ~]$ dd bs=8k skip=68 count=1 if=/u02/oradata/DBACLASS /users01.dbf |strings 1+0 records in 1+0 records out 8192 bytes (8.2 kB) copied, 6.5554e-05 seconds, 125 MB/s ram, venkat
Run the checkpoint process which creates an SCN and invoke the DBWn process to write the changed blocks to the datales: SQL> alter system checkpoint; System altered. Now extract the informa on in the 68 block of that par cular data le. We can observe that the changes made to the table (database) are wri+en into the data le during the backup mode. [oracle@dg2 ~]$ dd bs=8k skip=68 count=1 if=/u02/oradata/DBACLASS /users01.dbf |strings 1+0 records in 1+0 records out 8192 bytes (8.2 kB) copied, 7.0099e-05 seconds, 117 MB/s rama krishna, ram, venkat
So, it is clear that the data les can be writable during the hot backup mode. End the tablespace backup mode. SQL> alter tablespace users end backup; Tablespace altered.
Comment as:
3 of 4
2013-03-29 20:33
Oracle DBA Flavours: What happens when the database is in Begin backup mode?
Newer Post
Older Post
4 of 4
2013-03-29 20:33