Month: August 2014

My Oracle Support 认证(Accreditation)

My Oracle Support 认证(Accreditation)

My Oracle Support 的认证系列(Accreditation Series)提供有针对性的学习体验,旨在通过 My Oracle Support 的核心功能来提高您的专业知识,并提高技能以帮助您更好的利用 Oracle 的产品解决方案,工具和知识。

Oracle 数据库认证框架,是针对积极使用 My Oracle Support 和 Oracle 数据库的客户和合作伙伴。内容重点是围绕建设技能的最佳实践,建议和工具的启用 – 将您的 Oracle 数据库专业知识引领到一个新的水平。
Oracle数据库课程内容包括:

        掌握最新资讯
        安装
        补丁修复
        升级
        性能
        安全性
        可扩展性

请访问 My Oracle Support Accreditation Index,今天开始,从 My Oracle Support 认证路径的1级别和 Oracle 数据库学习路径 2级别开始吧。

更多信息,请参考文档:My Oracle Support Accreditation – Series Index (Doc ID 1583898.1)

The Next Big Thing

Oracle’s 12.1.0.2 was released a few weeks ago (You can download it from OTN here: Oracle 12.1.0.2 Download). While technically a minor point release, it contains a couple of major features that would normally be rolled out in a more substantial version change like 12cR2 or perhaps V13. Of course the most highly anticipated feature […]

Data Guard – Snapshot Standby Database配置

概述

——–

一般情况下,物理standby数据库处于mount状态接收和应用主库的REDO日志,物理standby数据库不能对外提供访问。如果需要只读访问,那么可以临时以read-only的方式open物理备库,或者配置ACTIVE DATA GUARD,那么物理standby数据库可以进行只读(read-only)访问(比如报表业务查询),但是物理standby数据库不能进行读写操作(read-write)。

有些情况下,为了实现系统的压力测试或者Real Application Testing(RAT)或者其他读写操作测试,那么可以临时将物理standby数据库转换为snapshot standby数据库然后进行测试,因为snapshot standby数据库是独立于主库的,并且是可以进行读写操作(read-write)。测试过程中snapshot standby数据库正常接收主库的归档日志,保证主库的数据安全,但是不会应用这些日志,当压力测试结束后,可以非常简单的再将snapshot standby转换为物理standby数据库,继续同步主库日志。

配置

——— 

1.物理standby配置闪回日志

SQL> Alter system set db_recovery_file_dest_size=500M;

System altered.

SQL> Alter system set db_recovery_file_dest=’/u01/app/oracle/snapshot_standby’;

System altered.

2.物理standby停止应用日志

SQL> alter database recover managed standby database cancel;

Database altered.

3.物理standby转换为snapshot standby,并且open snapshot standby

SQL> alter database convert to snapshot standby;

Database altered.

SQL> alter database open;   

Database altered.

检查snapshot standby数据库角色是SNAPSHOT STANDBY,open模式是READ WRITE:

SQL> select DATABASE_ROLE,name,OPEN_MODE from v$database;

DATABASE_ROLE    NAME      OPEN_MODE

—————- ——— ——————–

SNAPSHOT STANDBY FSDB      READ WRITE

4.对snapshot standby数据库进行压力测试或者Real Application Testing(RAT)或者其他读写操作。

5.测试结束后,再将snapshot standby转换为physical standby,并且重新开始应用日志

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.

Database mounted.

SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;

Database altered.

SQL> shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.

Database mounted.

SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Database altered.

5.转换为物理standby后,查看备库角色是PHYSICAL STANDBY,open模式是MOUNTED

SQL> select DATABASE_ROLE,name,OPEN_MODE from v$database;

DATABASE_ROLE    NAME      OPEN_MODE

—————- ——— ——————–

PHYSICAL STANDBY FSDB      MOUNTED

6.检查主库和物理备库日志是同步的

主库日志:

SQL> select ads.dest_id,max(sequence#) “Current Sequence”,

           max(log_sequence) “Last Archived”

       from v$archived_log al, v$archive_dest ad, v$archive_dest_status ads

       where ad.dest_id=al.dest_id

       and al.dest_id=ads.dest_id

       and al.resetlogs_change#=(select max(resetlogs_change#) from v$archived_log )

       group by ads.dest_id;

   DEST_ID Current Sequence Last Archived

———- —————- ————-

     1              361           361

     2              361           362

–备库日志

SQL>    select al.thrd “Thread”, almax “Last Seq Received”, lhmax “Last Seq Applied”

      from (select thread# thrd, max(sequence#) almax

          from v$archived_log

          where resetlogs_change#=(select resetlogs_change# from v$database)

          group by thread#) al,

         (select thread# thrd, max(sequence#) lhmax

          from v$log_history

          where resetlogs_change#=(select resetlogs_change# from v$database)

          group by thread#) lh

     where al.thrd = lh.thrd;

    Thread Last Seq Received Last Seq Applied

———- —————– —————-

         1               361              361

参与此主题的后续讨论,请回复blog,或者访问我们的中文社区,跟帖”分享:Data Guard – Snapshot Standby Database配置” 

Why I like the term “Research Lab”

I love the term “Research Lab” to refer to our collection of Oracle Engineered Systems. It’s because that’s what we do with the equipment. We test it, we try weird experiments with it, we take it apart with a screw driver and we put it back together again. And lot’s of times we break things. […]

Exadata Zone Maps

Just a quick post on a new Exadata feature called Zone Maps. They’re similar to storage indexes on Exadata, but with more control (you can define the columns and how the data is refreshed for example). People have complained for years that storage indexes provided no control mechanisms, but now we have a way to […]

TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569