EVENT ADJUST_SCN 说明 [30681.1]

 

       在一篇文章中引用了ID 为[30681.1] 的文档,刚才去MOS 上查,居然没有了,原来MOS 有时也靠不住。 在google 上展转了一下,找到了这篇文章。贴过来,备用。

 

DocID:  Note:30681.1

Subject:  EVENT: ADJUST_SCN - Quick Reference

Type:  REFERENCE

Status:  PUBLISHED

 Content Type: TEXT/PLAIN

CreationDate:  20-OCT-1997

LastRevision Date:  04-AUG-2000

Language:  USAENG

 

 

ADJUST_SCNEvent

~~~~~~~~~~~~~~~~

***WARNING ***

   This event should only ever be used underthe guidance

   of an experienced Oracle analyst.

   If an SCN is ahead of the current databaseSCN, this indicates

   some form of database corruption. Thedatabase should be rebuilt

   after bumping the SCN.

****************

 

    The ADJUST_SCN event is useful in somerecovery situations where the

    current SCN needs to be incremented by alarge value to ensure it

    isahead of the highest SCN in the database. This is typically

    required if either:

      a. An ORA-600 [2662] error is signalledagainst database blocks

    or

      b. ORA-1555 errors keep occuring afterforcing the database open

         or ORA-604 / ORA-1555 errors occurduring database open.

         (Note: If startup reports ORA-704& ORA-1555 errors together

                then the ADJUST_SCN eventcannot be used to bump the

                SCN as the error is occuringduring bootstrap.

                Repeated startup/shutdown attemptsmay help if the SCN

                mismatch is small)

    or

      c. If a database has been forced openused _ALLOW_RESETLOGS_CORRUPTION

         (See<Parameter:Allow_Resetlogs_Corruption> )

 

 

    The ADJUST_SCN event acts as describedbelow.

 

  **NOTE: You can check that the ADJUST_SCNevent has fired as it

          should write a message to the alert log inthe form

         "Debugging event used to advance scn to %s".

         If this message is NOT present in the alert log the event

         has probably not fired.

 

 

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  If the database will NOT open:

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Take a backup.

    You can use event 10015 to trigger anADJUST_SCN on database open:

 

        startup mount;

 

        alter session set events '10015 tracename adjust_scn level 1';

 

        (NB: You can only use IMMEDIATE here onan OPEN database. If the

            database is only mounted use the 10015 trigger to adjust SCN,

            otherwise you get ORA 600 [2251], [65535], [4294967295] )

 

        alter database open;

 

        If you get an ORA 600:2256 shutdown, usea higher level and reopen.

 

    Do *NOT* set this event in init.ora or theinstance will crash as soon

    as SMON or PMON try to do any clean up.Always use it with the

    "alter session" command.

 

  ~~~~~~~~~~~~~~~~~~~~~~~~~~

  If the database *IS* OPEN:

  ~~~~~~~~~~~~~~~~~~~~~~~~~~

    You can increase the SCN thus:

 

        alter session set events 'IMMEDIATEtrace name ADJUST_SCN level 1';

 

    LEVEL: Level 1 is usually sufficient - it raises the SCN to 1 billion

                                           (1024*1024*1024)

           Level 2 raises it to 2 billion etc...

 

           If you try to raise the SCN to a level LESS THAN or EQUAL to its

           current setting you will get <OERI:2256>    - See below.

           Ie: The event steps the SCN to known levels. You cannot use

               the same level twice.

 

  Calculating a Level from 600 errors:

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        To get a LEVEL for ADJUST_SCN:

 

        a) Determine the TARGET scn:

            ora-600 [2662]    See <OERI:2662>  Use TARGET >= blocks SCN

           ora-600 [2256]    See<OERI:2256>  Use TARGET >=Current SCN

 

        b)Multiply the TARGET wrap number by 4. This will give you the level

          to use in the adjust_scn to get the correct wrap number.

        c) Next, add the following value to thelevel to get the desired base

          value as well :

 

        Add to Level         Base

        ~~~~~~~~~~~~ ~~~~~~~~~~~~

                   0            0

                   1   1073741824

                   2   2147483648

                   3   3221225472

 

 

 

 

-------------------------------------------------------------------------------------------------------

QQ:492913789

Email:ahdba@qq.com

Blog:  http://www.cndba.cn/dave

Weibo:   http://weibo.com/tianlesoftware

Twitter:  http://twitter.com/tianlesoftware

Facebook: http://www.facebook.com/tianlesoftware

Linkedin: http://cn.linkedin.com/in/tianlesoftware

DBA1 群:62697716(满);   DBA2 群:62697977(满)  DBA3 群:62697850(满)  

DBA 超级群:63306533(满);  DBA4 群: 83829929  DBA5群: 142216823   

DBA6 群:158654907  聊天 群:40132017   聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
insert overwrite table discountdw.dwd_sd_adds_order_bill_inc partition(dt = '2023-06-06') select t1.order_bill_id, t1.counterfoil_no, t1.acceptor, date_format(to_utc_timestamp(cast(t1.expiry_date as bigint) ,'GMT-8'),'YYYY-MM-dd'), t2.company_id, t1.cert_no, t1.company_name, t1.third_order_id, t1.counterfoil_amt/10000, t1.transaction_amt/10000, t1.rate, '3bp' as service_tariffing, ((DATEDIFF(to_utc_timestamp(t1.expiry_date ,'GMT-8'),to_utc_timestamp(t1.transaction_date ,'GMT-8') ) + adjust_days)* 0.0003 *(counterfoil_amt))/ 360 as service_fee, 360 as total_days, DATEDIFF(to_utc_timestamp(t1.expiry_date ,'GMT-8'),to_utc_timestamp(t1.transaction_date ,'GMT-8') ) + adjust_days as modulation_date, t3.channel_type, t3.bank_name, date_format(to_utc_timestamp(cast(t1.transaction_date as bigint) ,'GMT-8'),'YYYY-MM-dd'), t1.order_status_code, t1.order_status_msg, t4.fee_amt, t4.status, t1.tenant_id, t5.revenue, to_utc_timestamp(cast(t1.create_date as bigint) ,'GMT-8'), to_utc_timestamp(cast(t1.update_date as bigint) ,'GMT-8') from (select * from discountdw.ods_adds_order_bill_inc where dt ='2023-06-06' and channel_id=101110004 )t1 left join (select * from mecdw.ods_company_full where platform_id='sdpjw')t2 on t1.cert_no=t2.cert_no and t1.tenant_id=t2.tenant_id left join discountdw.dim_adds_product_full t3 on t1.partner_id=t3.partner_id and t1.product_id=t3.product_id left join (select * from mecdw.dwd_sc_fee_record_full where dt='2023-06-06' and biz_type=2 ) t4 on t1.order_bill_id=t4.third_id left join (select * from discountdw.ods_sd_order_ext_inc where dt='2023-06-06') t5 on t1.order_bill_id=t5.order_bill_id left join sdpjwdw.dim_holiday_info_full t6 on date_format(to_utc_timestamp(t1.expiry_date ,'GMT-8'),'YYYY-MM-dd') = t6.civic_holiday ;
最新发布
06-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值