动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
电脑书籍下载:程序设计书籍 | 数据库教程书籍 | 平面与多媒体书籍 | 网络通讯书籍 | 系统管理书籍 | 网络安全书籍 | 认证考试书籍
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息



本月文章推荐
.在DB2中如何實現Oracle的相關功能.
.ORACLE常用傻瓜问题1000问(之十).
.在Linux下装配Oracle.
.oracle sqlplus 格式化输出的命令.
.Oracle的Password文件作用.
.Oracle以网格技术解决成本难题.
.Oracle诊断案例1 -SGA与Swap.
.Oracle数据库中Undo数据段的作用.
.用不同的isp访问internet.
.Oracle9i初始化参数中文说明(一.
.解析Oracle 8i/9i的计划稳定性.
.TestKing Oracle 1z0-001 V4.
.Oracle数据库管理系统发布11i安全.
.Oracle数据库优化及其应用程序研.
.Oracle ADF框架介绍.
.怎样做8i完全(备份)与完全(恢.
.查看本用户下的各种对象的SQL脚本.
.关于回滚机制的一些测试.
.Red Hat 将纳入 Oracle 的丛集技.
.Oracle数据库技术(37).

Create Standby Database

发表日期:2008-2-9 |



This document describes how to create an Oracle standby database(PCB4) from a primary database(PCB5),  what should be backed up on primary database in order to enable standby database recovery, how to sync the standby database with the primary database offline archives, and how to activate standby database at last.  It also mentions the daily support notes on supporting Oracle standby database.


1. Actions to be performed on primary database

Hot-backup database datafiles on the primary system.

Create standby controlfile after hot-backup done

SVRMGR >  ALTER DATABASE CREATE STANDBY CONTROLFILE AS <Backup control file > ;

Ensure all online archives are archived
SVRMGR > ALTER SYSTEM ARCHIVE LOG CURRENT ; 

      d)   Backup the current init<SID>.ora of the database. 

2.Create Oracle Service for Standby database

To create a new database as standby database with same <SID> as the primary database.  We could create a small one with SYSTEM tablespace initially, using Oracle Database Assistant.   It  helps creation of the Oracle NT services. 

Use the same Oracle version on creating the database

Ensure Oracle listener could serve the new Oracle service.

On NT service, change the oracleStart<SID>?service to manually mode, to avoid it automatically start-up on the NT reboot. 

Shutdown the oracleStart<SID>?service once the above steps done, and ensure the 揙racleService<SID>?service is still running on.

3.Create DB Directories

Pls create the directories for holding the database datafiles, as same as the setting as on primary database.

You should follow the same drives mapping
Pls create the directories for logs, redo logs, pfile, bdump, udump etc,  similar to the primary database also.

4.Transfer files to Standby Server

Transfer all of the hot-backup datafiles to the standby system.

The file list is
backup standby controlfile
Hot-backup datafiles
All offline archives available on archived directory
backup init<SID>.ora file 

The destination of the transferred files should be specified as: 

Backup standby control file: 
Copied to all members of the control files, the exact directory path as specified in backup 
init<SID>.ora file. 

Hot-backup datafiles: 
Copied to original datafiles location, exactly the same directory path as on primary system. 

All offline archives: 
Copied to the DB archive directory, exactly the same directory path as on primary system.

Backup init<SID>.ora file: 
Copied to $ORACLE_HOME/dbs or the IFILE parameter refer to location.   

5.Sync Standby Database 

5.1 Turn Standby DB on recovery mode
           
         a.  Ensure oracleService<SID>?service started.
         b.  Mount the DB  

SVRMGR > CONNECT INTERNAL/ <PASSWD>
SVRMGR > STARTUP NOMOUNT PFILE=<path>/init<SID>.ora
SVRMGR > ALTER DATABASE MOUNT STANDBY DATABASE;
SVRMGR > EXIT;

         We could place the above commands into a STARTUP.SQL? and it will be called
         by a batch command startup_standby.bat?.   See Appendix for details.   


        You could place a shortcut on the desktop on NT standby server, to depict the job. 


5.2 Apply archived logs

        a.  Ensure the standby DB in recovery mode.
        b.  Apply the logs 
   
SVRMGR > CONNECT INTERNAL/ <PASSWD>
SVRMGR > SET AUTORECOVERY ON; 
SVRMGR > RECOVER STANDBY DATABASE;
SVRMGR > EXIT;

         We could place the above commands into a RECOVER.SQL?script, and it will be called
         by a batch recover.bat?.  See Appendix for details.

5.3 Continuous Apply archived logs in recovery mode

Ensure a regular job to copy the primary offline archives to the standby server.

Pls see aync_log.bat?file for a reference.  See Appendix for details.

You could use WINCRON to schedule a job to copy drive archives from primary site to local 
archive directory with 1 hr interval.


Perform the apply archived logs in recovery mode?job once new archives arrival

Pls see sync_log.bat?file for a reference.  See Appendix for details.

You could use WINCRON to schedule the job to apply archives with 1 hr interval.


Perform clean job on obsolete offline archives on standby system

Pls see archive.cmd ?file for a reference.  See Appendix for details.

You could use WINCRON to schedule the job to clean obsolete archives with 2 days retention.

5.4 Activate Standby Database

To activate the standby database, copy the latest offline archive logs from primary server over to the standby system.

Apply the archives to the standby database as mentioned on Section 3.2.

Activate the standby database 
SVRMGR > ALTER DATABASE ACTIVATE STANDBY DATABASE ;


Shutdown the standby DB to reset file headers and clear all buffers. 
      SVRMGR > SHUTDOWN NORMAL;

Open the database.   You could start it by NT 揙racleStart<SID>?service and then enable the service to start automatically now.

You do not need copy any online redo logs from the primary server to the standby system once it is activated. 

Take a DB hot-backup after the database opens.  

5.5 Special Notes 

Any physical changes that occur on the primary must be accomplished on the standby as well.  

New datafiles added on primary database, file entries are added to the standby controlfile only.  

If the standby database can't find the physical datafile, standby recovery will stop with an
 ORA-1157 error.    

Use ALTER DATABASE CREATE DATAFILE <PATH> as <PATH>; ?to recreate the physical 
datafile or physically copy the missing datafiles to the standby system.

You can add or drop log files on the primary without affecting the standby DB.

If you do recreation controlfile?on the primary server, you must also recreate the controlfile for the standby database.   Shut down the standby database, and use a current backup standby control file from primary server. 


Jimi
GIT
上一篇:Linux 8.0 安装 Oracle 9i 人气:354
下一篇:Oracle入门心得(2) 人气:430
浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-7-24 Sablog-X v2.0 预览版
2008-7-24 帝国备份王EmpireBak 2008 正式版
2008-7-24 网趣网上购物系统时尚版 v8.2
2008-7-24 纵横B2B电子商务系统XYECS!B2B v
2008-7-24 e路小说小偷 v1.2.0723
2008-7-24 凌风美女图片站程序 v2.2
2008-7-24 TOM15电影收索程序
2008-7-24 清风信息自动采集生成系统 v1.0
2008-7-24 QQ邮箱编辑器 v1.0 (小小菜刀ASP
2008-7-19 UltraEdit 简体中文增强版 14.10
2008-7-19 CentOS 5.2 i386 LiveCD
2008-7-19 Snapture多功能相机 v1.4
2008-7-19 iAcces中文输入法 v1.0Build016
2008-7-19 Cookbook烹饪秘籍 v2.5
2008-7-19 苹果专用DVD转换工具 v1.1.59汉化
2008-7-19 Modem修复软件ZiPhone修改版04.0
2008-7-19 AgileMessenger即时通讯工具美化
2008-7-19 Sketches画图软件 v0.7b6破解版


  发表评论
姓 名: 验证码:
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号