楼主: grassbell

[精华] 热备份(hot backup)期间到底做了什么?

[复制链接]
论坛徽章:
2
行业板块每日发贴之星
日期:2005-03-22 01:02:26授权会员
日期:2005-10-30 17:05:33
21#
发表于 2005-3-11 14:01 | 只看该作者
都是些牛人

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
22#
发表于 2005-3-17 15:01 | 只看该作者
感觉大家都跑题了,偶还是没明白“到底做了什么”(题):(

使用道具 举报

回复
论坛徽章:
7
授权会员
日期:2005-10-30 17:05:33ITPUB元老
日期:2006-10-06 09:52:15ERP板块每日发贴之星
日期:2007-02-09 01:06:11会员2007贡献徽章
日期:2007-09-26 18:42:10ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44
23#
发表于 2005-3-18 14:08 | 只看该作者
對於hot backup,由於文件頭的scn被凍結,在恢復過程中,oracle如何能得知一個塊中scn以后哪些data被更新了呢?還是它並不去做這一新舊版本的比較,而是直接利用redo中的信息來恢復呢?redo中的信息應該只是用來處理fractured block嗎?

使用道具 举报

回复
论坛徽章:
2
2014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11
24#
发表于 2005-8-14 19:33 | 只看该作者
好贴

使用道具 举报

回复
论坛徽章:
0
25#
发表于 2006-4-26 21:42 | 只看该作者
牛人啊!学习。。。。。。。。

使用道具 举报

回复
论坛徽章:
14
奥运会纪念徽章:自行车
日期:2008-04-25 21:00:142013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-10 13:11:14奥运会纪念徽章:皮划艇激流回旋
日期:2012-08-13 10:25:38鲜花蛋
日期:2012-02-10 11:40:172010新春纪念徽章
日期:2010-03-01 11:04:58授权会员
日期:2010-01-12 09:40:47ITPUB元老
日期:2010-01-12 09:33:092009新春纪念徽章
日期:2009-01-04 14:52:28奥运会纪念徽章:拳击
日期:2008-10-24 13:22:33
26#
发表于 2006-5-18 16:58 | 只看该作者
It's OK.

使用道具 举报

回复
招聘 : 数据库管理员
论坛徽章:
122
马上加薪
日期:2014-02-19 11:55:14ITPUB官方微博粉丝徽章
日期:2011-06-28 19:45:36管理团队成员
日期:2011-05-07 01:45:082010广州亚运会纪念徽章:拳击
日期:2011-03-29 13:11:152010广州亚运会纪念徽章:篮球
日期:2011-02-20 22:50:172011新春纪念徽章
日期:2011-02-18 11:42:492011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:50
27#
发表于 2006-8-13 11:01 | 只看该作者
最初由 ITjane 发布
[B]對於hot backup,由於文件頭的scn被凍結,在恢復過程中,oracle如何能得知一個塊中scn以后哪些data被更新了呢?還是它並不去做這一新舊版本的比較,而是直接利用redo中的信息來恢復呢?redo中的信息應該只是用來處理fractured block嗎? [/B]


锁定文件头的scn,只是提供恢复时候的起点信息,利用备份来恢复的时候从这一点开始做恢复。block的更新在block和redo中还有版本信息记录的,通过比较两者的版本大小可以判断该block是否需要利用redo来恢复

使用道具 举报

回复
论坛徽章:
4
会员2007贡献徽章
日期:2007-09-26 18:42:10祖国60周年纪念徽章
日期:2009-10-09 08:28:002013年新春福章
日期:2013-02-25 14:51:24ITPUB社区OCM联盟徽章
日期:2013-12-16 09:51:00
28#
发表于 2006-8-15 08:56 | 只看该作者
gppd

使用道具 举报

回复
论坛徽章:
10
数据库板块每日发贴之星
日期:2006-02-12 01:02:47授权会员
日期:2006-04-14 13:04:46数据库板块每日发贴之星
日期:2006-03-29 01:01:20数据库板块每日发贴之星
日期:2006-02-26 01:01:35数据库板块每日发贴之星
日期:2006-02-21 01:02:31数据库板块每日发贴之星
日期:2006-02-20 01:02:36数据库板块每日发贴之星
日期:2006-02-17 01:02:30数据库板块每日发贴之星
日期:2006-02-15 01:02:28数据库板块每日发贴之星
日期:2006-02-14 01:02:26会员2006贡献徽章
日期:2006-04-17 13:46:34
29#
发表于 2006-9-20 13:21 | 只看该作者
Summarize :
1   The article illustrates why the uses must put tablespace(s)  in backup mode ,when the users want to backup the tablespace(s) online,even your database runs in archived log mode .
2    When your tablespace(s) is in backup mode , the information that is recoded in redo logfile will  increase. And this will consume  more redo log buffer and create more archived logfile .
3   When your tablespace(s) run in backup mode, their datafile can be modified at the same time .
  SQL> create table tapes (name varchar2(32)) tablespace test;
Table created.
SQL> insert into tapes values ('DLT');
1 row created
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.

Now we ask Oracle what block number contains the new value:

SQL> select dbms_rowid.rowid_block_number(rowid) blk, name from tapes;
    BLK NAME
------- ----------------
      3 DLT

The value "DLT" is recorded in the third data block. Allowing nine blocks for the datafile headers, we can read the third block of data with dd and run strings on it to actually see that the value is there:

$ dd if=/db/Oracle/a/oradata/crash/test01.dbf ibs=8192 skip=11 count=1|strings
1+0 records in
16+0 records out
DLT

Now we place the tablespace in hot-backup mode:

SQL> alter tablespace test begin backup ;
Tablespace altered.

Now we update the table, commit the update, and force a global checkpoint on the database:

SQL> update tapes set name = 'AIT';
1 row updated
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.

Now we extract the same block of data to show the new value was actually written to disk:

$ dd if=/db/Oracle/a/oradata/crash/test01.dbf ibs=8192 skip=11 count=1|strings
1+0 records in
16+0 records out
DLT,
AIT

We now can take the tablespace out of backup mode:

SQL> alter tablespace test end backup;

This test proves that datafiles are indeed being written to during hot backups.

4   Why dose oracle must lock the datafile header when the tablepspace(s) run(s)  in backup mode .
    Someone says that it give the alter tablespace end backup command all the redo generated during the backup is applied to the datafile to advance the datafile SCN to database SCN.
   I donot aggree that .

SQL> select * from a;

         A
----------
         1
         1
         1
         1
         1
         1
         1
         1
         1
         1
         1

已选择11行。

SQL> select tablespace_name from dba_tables where table_name='A';

TABLESPACE_NAME
------------------------------
TEST_TS

SQL> alter tablespace test_ts begin backup ;

表空间已更改。

SQL> delete  from a;

已删除11行。

SQL> commit ;

提交完成。

SQL> alter system switch logfile ;

系统已更改。

SQL> /

系统已更改。

SQL> /

系统已更改。

SQL> /

系统已更改。

SQL> /

系统已更改。

SQL> /

系统已更改。

SQL> /

系统已更改。

SQL> /

系统已更改。

SQL> archive log list;
数据库日志模式            存档模式
自动存档             启用
存档终点            c:
最早的概要日志序列     34
下一个存档日志序列   36
当前日志序列           36
SQL> /

系统已更改。

SQL> alter system switch logfile ;

系统已更改。

SQL> archive log list;
数据库日志模式            存档模式
自动存档             启用
存档终点            c:
最早的概要日志序列     36
下一个存档日志序列   38
当前日志序列           38

======================================
= here I deleted  manually  all of the archived log
=====================================

SQL> alter tablespace test_ts end  backup ;

表空间已更改。

Here we can understand  that oracle dose not use the archived logfile to keep the sync of datafile with database .

  Maybe someone can give more explains .


THanks !

使用道具 举报

回复
论坛徽章:
9
数据库板块每日发贴之星
日期:2006-09-06 01:01:55数据库板块每日发贴之星
日期:2006-09-07 01:02:41数据库板块每日发贴之星
日期:2006-09-23 01:02:09数据库板块每日发贴之星
日期:2006-09-26 01:03:58数据库板块每日发贴之星
日期:2006-10-06 01:02:42数据库板块每日发贴之星
日期:2006-10-08 01:02:15数据库板块每日发贴之星
日期:2006-10-09 01:02:43授权会员
日期:2006-12-23 10:14:58会员2007贡献徽章
日期:2007-09-26 18:42:10
30#
发表于 2006-9-25 14:08 | 只看该作者
问一句,做了alter tablespace system begin backup后,要是没有END BACKUP,在生产中将造成什么样的后果?

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表