[20150804]提升scn3.txt

[20150804]提升scn3.txt

--上午做了做了提升scn的试验,在10g下费劲周折到下午才测试通过。参考连接。
http://blog.itpub.net/267265/viewspace-1761508/

--下午在11g下测试看看。

1.测试环境:
SYS@test> startup mount
ORACLE instance started.

Total System Global Area 1603411968 bytes
Fixed Size                  2228784 bytes
Variable Size            1006636496 bytes
Database Buffers          587202560 bytes
Redo Buffers                7344128 bytes
Database mounted.

SYS@test> @ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, UNRECOVERABLE_CHANGE# ,LAST_CHANGE#, OFFLINE_CHANGE#, ONLINE_CHANGE#,status FROM v$datafile;
       FILE# CHECKPOINT_CHANGE# UNRECOVERABLE_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS
------------ ------------------ --------------------- ------------ --------------- -------------- -------
           1        12718739566                     0  12718739566               0              0 SYSTEM
           2        12718739566                     0  12718739566               0              0 ONLINE
           3        12718739566                     0  12718739566               0              0 ONLINE
           4        12718739566                     0  12718739566     11991583673    11991583744 ONLINE
           5        12718739566                     0  12718739566               0              0 ONLINE
           6        12718739566                     0  12718739566     11992552382    11992552417 ONLINE
           7        12718739566                     0  12718739566               0              0 ONLINE
           8        12718739566                     0  12718739566     11736877818    11736877876 ONLINE
           9        12718739566                     0  12718739566               0              0 ONLINE
          10        12718739566                     0  12718739566               0              0 ONLINE
          11        12718739566                     0  12718739566     11737627980    11737628036 ONLINE
          12        12718739566                     0  12718739566               0              0 ONLINE
          13        12718739566                     0  12718739566     12688348217    12688352040 ONLINE
          14        12718739566                     0  12718739566               0              0 ONLINE

14 rows selected.

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy  FROM v$datafile_header;
       FILE# CHECKPOINT_CHANGE# CREATION_CHANGE# RESETLOGS_CHANGE# STATUS  CHECKPOINT_COUNT FUZ
------------ ------------------ ---------------- ----------------- ------- ---------------- ---
           1        12718739566                7        3011113647 ONLINE         856623668 NO
           2        12718739566             2140        3011113647 ONLINE         856623662 NO
           3        12718739566       3241444492        3011113647 ONLINE         856623663 NO
           4        12718739566            17993        3011113647 ONLINE         856623687 NO
           5        12718739566           973735        3011113647 ONLINE         856623665 NO
           6        12718739566          1412559        3011113647 ONLINE         856623631 NO
           7        12718739566          4383251        3011113647 ONLINE         856623660 NO
           8        12718739566         13169364        3011113647 ONLINE         856623663 NO
           9        12718739566       3223747107        3011113647 ONLINE         856623660 NO
          10        12718739566      12002485849        3011113647 ONLINE              1179 NO
          11        12718739566      11673111577        3011113647 ONLINE              2145 NO
          12        12718739566      11994962958        3011113647 ONLINE              1504 NO
          13        12718739566      11992635787        3011113647 ONLINE              1618 NO
          14        12718739566      11992670578        3011113647 ONLINE              1614 NO

14 rows selected.

SYS@test> SELECT 'controlfile' "SCN location", 'SYSTEM checkpoint' NAME, checkpoint_change#,open_mode,current_scn FROM v$database;
SCN locatio NAME                                               CHECKPOINT_CHANGE# OPEN_MODE             CURRENT_SCN
----------- -------------------------------------------------- ------------------ -------------------- ------------
controlfile SYSTEM checkpoint                                         12718739566 MOUNTED                         0

SYS@test> @10to16 12718739566
10 to 16 HEX   REVERSE16
-------------- -----------------------------------
00002f618906e 0x6e9018f6-02000000

SYS@test> show parameter control_files
NAME           TYPE    VALUE
-------------- ------- ----------------------------------------------------------------------------------------------------
control_files  string  /u01/app/oracle11g/oradata/test/control01.ctl, /u01/app/oracle11g/oradata/test/control02.ctl

SYS@test> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

2.开始修改控制文件:
--使用bvi修改:
\6e 90 18 f6
00044000  15 C2 00 00 11 00 00 00 60 3D 11 33 FF FF 01 04 59 64 00 00 00 00 00 00 00 00 00 00 CD 2F B7 2F 54 45 53 54 00 00 00 00 00 00 00 00 08 02 40 00 01 40 40 50 00 00 00 00 00 00 00 00 AF F2 79 B3
00044040  00 00 00 00 48 EF 98 2F AD 36 F1 00 00 00 00 00 A7 DE 24 2F 00 00 00 00 00 00 20 0B 0E 00 00 00 0E 00 00 00 01 00 00 00 6E 90 18 F6 02 00 00 00 01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00
                                                                                                                                  ~~~~~~~~~~~
00044080  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000440C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 01 00

--修改为6F 91 19 f7。

--使用bbed修改检查和。
SYS@test> @16to10 44000
16 to 10 DEC
------------
      278528

SYS@test> select 278528/16384 from dual ;
278528/16384
------------
17

BBED> set dba 20,17
        DBA             0x05000011 (83886097 20,17)

BBED> set count 16384
        COUNT           16384

BBED> set count 256
        COUNT           256

BBED> set blocksize 16384
        BLOCKSIZE       16384

BBED> dump /v
File: /u01/app/oracle11g/oradata/test/control01.ctl (20)
Block: 17                                                          Offsets:    0 to  255                                                      Dba:0x05000011
---------------------------------------------------------------------------------------------------------------------------------------------------------------
15c20000 11000000 603d1133 ffff0104 59640000 00000000 00000000 cd2fb72f 54455354 00000000 00000000 08024000 l ........`=.3....Yd..........././TEST..........@.
01404050 00000000 00000000 aff279b3 00000000 48ef982f ad36f100 00000000 a7de242f 00000000 0000200b 0e000000 l .@@P..........y.....H../.6........$/...... .....
0e000000 01000000 6f9119f7 02000000 01000000 00000000 02000000 00000000 00000000 00000000 00000000 00000000 l ........o.......................................
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 l ................................................
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 l ................................................
00000000 00000000 00000000 03000100                                                                         l ................

<48 bytes per line>

BBED> sum
Check value for File 20, Block 17:
current = 0x6459, required = 0x6459
--不需要修改。注意我修改正好巧合,如果全部偶数修改为奇数,+1就没有问题。

3.ok,打开数据库到mount:

SYS@test> startup mount
ORACLE instance started.
Total System Global Area   1603411968 bytes
Fixed Size                    2228784 bytes
Variable Size               973082064 bytes
Database Buffers            620756992 bytes
Redo Buffers                  7344128 bytes
Database mounted.

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, UNRECOVERABLE_CHANGE# ,LAST_CHANGE#, OFFLINE_CHANGE#, ONLINE_CHANGE#,status FROM v$datafile;
       FILE# CHECKPOINT_CHANGE# UNRECOVERABLE_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS
------------ ------------------ --------------------- ------------ --------------- -------------- -------
           1        12718739566                     0  12718739566               0              0 SYSTEM
           2        12718739566                     0  12718739566               0              0 ONLINE
           3        12718739566                     0  12718739566               0              0 ONLINE
           4        12718739566                     0  12718739566     11991583673    11991583744 ONLINE
           5        12718739566                     0  12718739566               0              0 ONLINE
           6        12718739566                     0  12718739566     11992552382    11992552417 ONLINE
           7        12718739566                     0  12718739566               0              0 ONLINE
           8        12718739566                     0  12718739566     11736877818    11736877876 ONLINE
           9        12718739566                     0  12718739566               0              0 ONLINE
          10        12718739566                     0  12718739566               0              0 ONLINE
          11        12718739566                     0  12718739566     11737627980    11737628036 ONLINE
          12        12718739566                     0  12718739566               0              0 ONLINE
          13        12718739566                     0  12718739566     12688348217    12688352040 ONLINE
          14        12718739566                     0  12718739566               0              0 ONLINE

14 rows selected.

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy  FROM v$datafile_header;
       FILE# CHECKPOINT_CHANGE# CREATION_CHANGE# RESETLOGS_CHANGE# STATUS  CHECKPOINT_COUNT FUZ
------------ ------------------ ---------------- ----------------- ------- ---------------- ---
           1        12718739566                7        3011113647 ONLINE         856623668 NO
           2        12718739566             2140        3011113647 ONLINE         856623662 NO
           3        12718739566       3241444492        3011113647 ONLINE         856623663 NO
           4        12718739566            17993        3011113647 ONLINE         856623687 NO
           5        12718739566           973735        3011113647 ONLINE         856623665 NO
           6        12718739566          1412559        3011113647 ONLINE         856623631 NO
           7        12718739566          4383251        3011113647 ONLINE         856623660 NO
           8        12718739566         13169364        3011113647 ONLINE         856623663 NO
           9        12718739566       3223747107        3011113647 ONLINE         856623660 NO
          10        12718739566      12002485849        3011113647 ONLINE              1179 NO
          11        12718739566      11673111577        3011113647 ONLINE              2145 NO
          12        12718739566      11994962958        3011113647 ONLINE              1504 NO
          13        12718739566      11992635787        3011113647 ONLINE              1618 NO
          14        12718739566      11992670578        3011113647 ONLINE              1614 NO

14 rows selected.

SYS@test> SELECT 'controlfile' "SCN location", 'SYSTEM checkpoint' NAME, checkpoint_change#,open_mode,current_scn FROM v$database;
SCN locatio NAME                                               CHECKPOINT_CHANGE# OPEN_MODE             CURRENT_SCN
----------- -------------------------------------------------- ------------------ -------------------- ------------
controlfile SYSTEM checkpoint                                         12718739566 MOUNTED                         0

--还是不行,为什么?
BBED> set dba 20,18
        DBA             0x05000012 (83886098 20,18)

BBED> set count 256
        COUNT           256

BBED> set blocksize 16384
        BLOCKSIZE       16384

BBED> dump /v
File: /u01/app/oracle11g/oradata/test/control01.ctl (20)
Block: 18                                                          Offsets:    0 to  255                                                      Dba:0x05000012
---------------------------------------------------------------------------------------------------------------------------------------------------------------
15c20000 12000000 6d3d1133 ffff0104 5a640000 00000000 00000000 cd2fb72f 54455354 00000000 00000000 08024000 l ........m=.3....Zd..........././TEST..........@.
01404050 00000000 00000000 aff279b3 00000000 48ef982f ad36f100 00000000 a7de242f 00000000 0000200b 0e000000 l .@@P..........y.....H../.6........$/...... .....
0e000000 01000000 6f9119f7 02000000 01000000 00000000 02000000 00000000 00000000 00000000 00000000 00000000 l ........o.......................................
                   ~~~~~~~~
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 l ................................................
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 l ................................................
00000000 00000000 00000000 03000100                                                                         l ................

<48 bytes per line>

BBED> sum
Check value for File 20, Block 18:
current = 0x645a, required = 0x645a
--难道要修改2处?以上是已经修改的(我喜欢使用bvi修改)

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, UNRECOVERABLE_CHANGE# ,LAST_CHANGE#, OFFLINE_CHANGE#, ONLINE_CHANGE#,status FROM v$datafile;
       FILE# CHECKPOINT_CHANGE# UNRECOVERABLE_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# STATUS
------------ ------------------ --------------------- ------------ --------------- -------------- -------
           1        12718739566                     0  12718739566               0              0 SYSTEM
           2        12718739566                     0  12718739566               0              0 ONLINE
           3        12718739566                     0  12718739566               0              0 ONLINE
           4        12718739566                     0  12718739566     11991583673    11991583744 ONLINE
           5        12718739566                     0  12718739566               0              0 ONLINE
           6        12718739566                     0  12718739566     11992552382    11992552417 ONLINE
           7        12718739566                     0  12718739566               0              0 ONLINE
           8        12718739566                     0  12718739566     11736877818    11736877876 ONLINE
           9        12718739566                     0  12718739566               0              0 ONLINE
          10        12718739566                     0  12718739566               0              0 ONLINE
          11        12718739566                     0  12718739566     11737627980    11737628036 ONLINE
          12        12718739566                     0  12718739566               0              0 ONLINE
          13        12718739566                     0  12718739566     12688348217    12688352040 ONLINE
          14        12718739566                     0  12718739566               0              0 ONLINE

14 rows selected.

SYS@test> SELECT file#, CHECKPOINT_CHANGE#, CREATION_CHANGE#  , RESETLOGS_CHANGE#,status, CHECKPOINT_COUNT,fuzzy  FROM v$datafile_header;
       FILE# CHECKPOINT_CHANGE# CREATION_CHANGE# RESETLOGS_CHANGE# STATUS  CHECKPOINT_COUNT FUZ
------------ ------------------ ---------------- ----------------- ------- ---------------- ---
           1        12718739566                7        3011113647 ONLINE         856623668 NO
           2        12718739566             2140        3011113647 ONLINE         856623662 NO
           3        12718739566       3241444492        3011113647 ONLINE         856623663 NO
           4        12718739566            17993        3011113647 ONLINE         856623687 NO
           5        12718739566           973735        3011113647 ONLINE         856623665 NO
           6        12718739566          1412559        3011113647 ONLINE         856623631 NO
           7        12718739566          4383251        3011113647 ONLINE         856623660 NO
           8        12718739566         13169364        3011113647 ONLINE         856623663 NO
           9        12718739566       3223747107        3011113647 ONLINE         856623660 NO
          10        12718739566      12002485849        3011113647 ONLINE              1179 NO
          11        12718739566      11673111577        3011113647 ONLINE              2145 NO
          12        12718739566      11994962958        3011113647 ONLINE              1504 NO
          13        12718739566      11992635787        3011113647 ONLINE              1618 NO
          14        12718739566      11992670578        3011113647 ONLINE              1614 NO

14 rows selected.

SYS@test> SELECT 'controlfile' "SCN location", 'SYSTEM checkpoint' NAME, checkpoint_change#,open_mode,current_scn FROM v$database;
SCN locatio NAME                                               CHECKPOINT_CHANGE# OPEN_MODE             CURRENT_SCN
----------- -------------------------------------------------- ------------------ -------------------- ------------
controlfile SYSTEM checkpoint                                         12735582575 MOUNTED                         0

SYS@test> @16to10 2f719916f
16 to 10 DEC
------------
12735582575

--这次正确了。
-- 增加了 12735582575-12718739566=16843009

SYS@test> alter database open ;

Database altered.

SYS@test> SELECT 'controlfile' "SCN location", 'SYSTEM checkpoint' NAME, checkpoint_change#,open_mode,current_scn FROM v$database;
SCN locatio NAME                                               CHECKPOINT_CHANGE# OPEN_MODE             CURRENT_SCN
----------- -------------------------------------------------- ------------------ -------------------- ------------
controlfile SYSTEM checkpoint                                         12735582578 READ WRITE            12735582968

--ok没有认为问题。

4.重复测试:
--重复测试要修改前面2处,检查和要清除3位(加前面1位0x40),也可以使用bbed 计算,注意控制文件的块大小16384.

时间: 2024-11-14 11:43:24

[20150804]提升scn3.txt的相关文章

[20150804]提升scn2.txt

[20150804]提升scn2.txt --有时候修复数据库,要避免一些ora-00600错误,要提升数据库的scn.自己花了1点时间google许多资料,做1个总结: --安全起见,我做了一个冷备份.便于重复测试. --拿比较常见的ORA-600 [2662]错误: ORA-600 [2662] "Block SCN is ahead of Current SCN",说明当前数据库的数据块的SCN早于当前的SCN,主要是和存储在UGA变量中的 dependent SCN进行比较,如

[20170417]另类提升scn2.txt

[20170417]另类提升scn2.txt --//上个星期的测试偶然发现,通过修改一些块的scn能够提升scn.我还是通过例子说明: --//如果数据库异常关闭,在某种特殊修复后,会出现数据文件块的scn大于数据文件头的scn号,这样在访问这些块时会报: Errors in file /opt/oracle/admin/conner/udump/conner_ora_31607.trc: ORA-00600: internal error code, arguments: [2662], [

[20150624]提升scn.txt

[20150624]提升scn.txt --有时候修复数据库,要避免一些ora-00600错误,要提升数据库的scn.自己花了1点时间google许多资料,做1个总结: --安全起见,我做了一个冷备份.便于重复测试. --拿比较常见的ORA-600 [2662]错误: ORA-600 [2662] "Block SCN is ahead of Current SCN",说明当前数据库的数据块的SCN早于当前的SCN,主要是和存储在UGA变量中的 dependent SCN进行比较,如果

舍卒保帅:巧用robots.txt提升网站权重

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 这不是什么绝窍,而是向大家提供一种思路. 目前采集站很多,加上百度算法频繁调整,被降权,被K成光杆司令的站比比皆是. 我的新站易拍屋www.epioo.com就更不例外了.这是一个网摘类站点,在会员收藏网页的同时不仅给网页截图还保存原网页代码,即完全备份一个页面,存在高度复制性. 刚开始的时候百度收录3千页每天就有1千多IP,可是好景不长,几

[20151109]提升scn号11g测试.txt

[20151109]提升scn号11g测试.txt --以前的测试都在10g下进行的,在11.2.0.4下重复测试. 1.测试环境: SCOTT@book> @ &r/ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- ------------------------------------------------------------

打造高权重网站必看:如何迅速提升搜索引擎信用度?

seo都希望网站的关键词排名迅速提升,这需要网站具备高权重.但权重不是凭空出现的,和网站在搜索引擎的信用度有很大关系!网站信用度如何快速提升?下面,seo奇兵分享给大家. 1.网站空间要快速.稳定.安全.如果网站经常打不开,关键词排名和流量都是空谈.选择空间大家不要选择太便宜的,特廉价的服务商很可能后期跑路或出问题找不到人.seo奇兵建议大家尽量买独立ip空间,比共享ip信任度要高. 2.网站基础seo优化工作做好,内部结构合理.像网站地图.robots.txt.301跳转.404页面 等都要做

PHP学习之挖掘细节提升网站性能

相信互联网已经越来越成为人们生活中不可或缺的一部分.ajax,flex等等富客户端的应用使得人们越加"幸福"地体验着许多原先只能在C/S实 现的功能.比如Google机会已经把最基本的office应用都搬到了互联网上.当然便利的同时毫无疑问的也使页面的速度越来越慢.自己是做前端开发的,在性能方面,根据yahoo的调查,后台只占5%,而前端高达95%之多,其中有88%的东西是可以优化的. 以上是一张web2.0页面的生命周期图.工程师很形象地讲它分成了"怀孕,出生,毕业,结婚&

如何使用google网站站长工具来提升你的网站流量

  Google网站站长工具改版后的分组更能让使用者了解到你的网站在搜索引擎每一步工作中的情况. 这篇文章就来说说,如何使用google网站站长工具来提升你的网站流量. 首先,我们知道Google Web Master Tool的工具分为搜索外观,搜索流量,google索引,抓取四大块. 搜索外观 搜索外观是搜索用户看到的界面内容.里面有结构化数据,数据标注工作,HTML改进,网站链接.这些都是用户在搜索结果中可以看到内容.优化好这部分内容有助于提高搜索点击率. 结构化数据: 假如一个页面的展示

揭密快速提升二级域名排名的方式论

拿二级域名来做排名一直以来都争议很大,笔者找了许多的相关文章发现,很多SEO人都在纠结,以为二级域名不利于优化.在以往的时候我也是这样想的,但是经过我的实践与见证发现,二级域名同样可以做得有声有色. 首先我们要有一个心态,把二级域名当成是一级域名的态度来去做优化才行,不然心态决定一切.如果总是有觉得二级域名不好这样的心态,那么优化起来基本就没戏了. 所以经过笔者实践证明,二级域名同样可以快速提升排名.笔者优化的是医疗网站(http://nanke.tianya.cn/),接下来就由这个网站中道出