A,B两机,操作系统、数据库、实例、目录结构均相同,A、B均为归档模式,拟实现B机作为A机的备份机.
思路:
1、安装与第一次创建数据库对象后,A、B 机同步;
2、工作时,用自编程序将A机的ARCHIVE LOG文件COPY到B机对应位置;
3、用recover方式,在B机上重演而保持A、B机的同步;
问题:
当进行第三步时(在B机上操作):
svrmgrl>startup nomount;
svrmgrl>alter database mount;
svrmgrl>set recovery on;
svrmgrl>recover database;     出错
ora-00283  ???????
ora-01165  ???????
查询ORACLE HELP,不明白其中原因,敬请高手指点?

解决方案 »

  1.   

    补充说明一下:
    1、2步是正常的,即:
    A、B机分别按相同参数与路径创建实例后
    A机创建工作表空间
    将A、B机实例停止后,将所有实例相关文件COPY到B机
    启动B机实例,正常,且经查检,A、B完全一致;
      

  2.   

    根据你的说明,你采用了两种办法:
    1、只将 archive log copy到b机,然后用recover database 保持同步。
      这时候由于b数据库处于一致状态,不需要恢复,也就无法apply archived log了。
      解决办法:
       先配置好b数据库的alias,然后在a数据库的init_sid.ora文件加入:
       log_archive_dest_2 = "SERVICE=alias"
      这样a数据库会自动更新b数据库了。
    2、将所有数据库文件copy 到b数据库:
      这时b数据库也就同a数据库一样了。不过copy的代价很高,且copy时a,b数据库都必须down掉
      

  3.   

    请问:
       先配置好b数据库的alias,然后在a数据库的init_sid.ora文件加入:
       log_archive_dest_2 = "SERVICE=alias"1.您的意思是指在A机tnsname.ora中配一个alias,如:HSMIS2,然后:
      log_archive_dest_2 = "SERVICE=HSMIS2"
    2."这样a数据库会自动更新b数据库了",这样B机与A机会有多少延迟?
      谢谢!
      

  4.   

    忘记说明了:
    在A、B机一致后,为了测试,在A机建立了测试表,而B机没有建;
    而后强行A机归档,将archive log文件COPY到B机;
    但recover database until cancel后,B机仍然没有测试表及数据;
      

  5.   

    recover database使用这个方法太慢,同步可以使用其他方法呀
    如建立DBLINK,建立关键表的触发器等
      

  6.   

    建议使用standy database.....................
    14-8 Enterprise DBA Part 1B: Backup and Recovery Workshop
    1 Copy the init.ora file from the primary server to the standby database. Edit
    the following init.ora parameters for the standby database:
    CONTROL_FILES, DB_FILE_NAME_CONVERT, and
    LOG_FILE_NAME_CONVERT
    You may also need to change parameters such as LOG_ARCHIVE_DEST,
    LOG_ARCHIVE_FORMAT, BACKGROUND_DUMP_DEST,and
    USER_DUMP_DEST which provide the file locations to reflect the file and
    directory layout on the standby.
    2 Create the control file for the standby database by issuing the following
    command on the primary database
    SQL> alter database create standby controlfile as <filename>;
    This command creates a copy of the primary database’s control file. Copy the
    control file specified above to the standby server at the appropriate location
    specified by the CONTROL_FILES parameter of standby database.
    3 Back up the data files belonging to the primary database. You can take the
    backups while the database is online or offline. You can use the online
    tablespace backup methodology if you are using online backup. Otherwise, shut
    down the primary database cleanly and back up data files. Use this backup and
    copy them to the appropriate location in the standby database server.
    .....................
    Creating a Standby Database
    How to Create a Standby Database (continued)
    4 If you have used online backup in step 3, archive the current online logs of the
    primary database by issuing:
    SQL> alter system archive log current;
    This forces a log switch to archive the current log to guarantee complete recovery
    can be performed on the standby database. Copy the archive logs to the standby
    database server.
    5 Start the standby database in Nomount mode.
    SQL> startup pfile=$HOME/initsndby.ora nomount
    6 Mount the database using the following command:
    SQL> alter database mount standby database;
    7 Issue the recover command and apply the archived logs to the standby database
    to synchronize it with the primary database by using a special recover command:
    SQL> recover standby database;说的也不是非常清楚,你最好找本这方面的书看看
      

  7.   

    我正在一本书,<<oracle backup & recovery 101>>.
    请问一下各位,在实际应用中,都有那些好的方法做备份数据库?