由于FAL [客户端],Oracle数据保护无法正常工作

时间:2014-02-14 00:03:37

标签: oracle11g database-replication dataguard

我有两个数据库,主要和次要以及两者之间配置的数据保护,我重新启动了suse linux但是在启动数据库时,复制没有完成,我想我采取了错误的方式来启动备用数据库。 ...不,它刚刚安装,我有一个不能在备用间隙表中检测到的间隙,以及备用数据库中的“无FAL服务器指定”问题,可能是什么错误?

    From Primary:
    System parameters with non-default values:
    processes                = 1200
    nls_date_format          = "MM/DD/YYYY HH24:MI:SS"
    memory_target            = 8000M
    memory_max_target        = 8G
    control_files            = "/oracle/app/oradata/ora11g/control01.ctl"
    control_files            = "/oracle/app/oradata/ora11g/control02.ctl"
    control_files            = "/oracle/app/oradata/ora11g/control03.ctl"
    db_block_size            = 8192
    compatible               = "11.1.0.0.0"
    log_archive_start        = TRUE
    log_archive_dest_1       = "LOCATION=/home/oracle/archive"
    log_archive_format       = "%t_%s_%r.dbf"
    db_recovery_file_dest    = "/oracle/app/flash_recovery_area"
    db_recovery_file_dest_size= 2G
    undo_tablespace          = "UNDOTBS1"
    sec_case_sensitive_logon = FALSE
    remote_login_passwordfile= "EXCLUSIVE"
    db_domain                = ""
    dispatchers              = "(PROTOCOL=TCP) (SERVICE=ora11gXDB)"
    local_listener           = ""
    remote_listener          = ""
    session_cached_cursors   = 450
    cursor_sharing           = "FORCE"
    audit_file_dest          = "/oracle/app/admin/ora11g/adump"
    audit_trail              = "NONE"
    db_name                  = "ora11g"
    open_cursors             = 300
    diagnostic_dest          = "/oracle/app"

从待机数据库警报日志:

    Thu Feb 13 17:16:02 2014
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 3
    Autotune of undo retention is turned on.
    IMODE=BR
    ILAT =145
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    Starting up ORACLE RDBMS Version: 11.1.0.7.0.
    Using parameter settings in server-side spfile        
    /oracle/app/product/11g/db/dbs/spfileora11g.ora
    System parameters with non-default values:
    processes                = 1200
    nls_date_format          = "MM/DD/YYYY HH24:MI:SS"
    memory_target            = 8000M 
    memory_max_target        = 8G
    control_files            = "/oracle/app/oradata/ora11g/control01.ctl"
    control_files            = "/oracle/app/oradata/ora11g/control02.ctl"
    control_files            = "/oracle/app/oradata/ora11g/control03.ctl"
    db_block_size            = 8192
    compatible               = "11.1.0.0.0"
    log_archive_start        = TRUE
    log_archive_dest_1       = "LOCATION=/home/oracle/archive"
    log_archive_format       = "%t_%s_%r.dbf"
    db_recovery_file_dest    = "/oracle/app/flash_recovery_area"
    db_recovery_file_dest_size= 2G
    undo_tablespace          = "UNDOTBS1"
    sec_case_sensitive_logon = FALSE
    remote_login_passwordfile= "EXCLUSIVE"
    db_domain                = ""
    dispatchers              = "(PROTOCOL=TCP) (SERVICE=ora11gXDB)"
    local_listener           = ""
    remote_listener          = ""
    session_cached_cursors   = 450
    cursor_sharing           = "FORCE"
    audit_file_dest          = "/oracle/app/admin/ora11g/adump"
    audit_trail              = "NONE"
    db_name                  = "ora11g"
    open_cursors             = 300
    diagnostic_dest          = "/oracle/app"
    Deprecated system parameters with specified values:
    log_archive_start
    End of deprecated system parameter listing
    Thu Feb 13 17:16:04 2014
    .
    .
    .
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)   (PROTOCOL=TCP))'...
    Thu Feb 13 17:16:04 2014
    MMNL started with pid=15, OS id=10039
    starting up 1 shared server(s) ...
    ORACLE_BASE from environment = /oracle/app
    Thu Feb 13 17:16:04 2014
    ALTER DATABASE   MOUNT
    Setting recovery target incarnation to 2
    ARCH: STARTING ARCH PROCESSES
    Thu Feb 13 17:16:09 2014
    ARC0 started with pid=19, OS id=10272
    Thu Feb 13 17:16:09 2014
    ARC1 started with pid=20, OS id=10274
    Thu Feb 13 17:16:09 2014
    ARC2 started with pid=21, OS id=10276
    ARC0: Archival started
    ARC1: Archival started
    ARC2: Archival started
    Thu Feb 13 17:16:09 2014
    ARC3 started with pid=22, OS id=10278
    ARC3: Archival started
    ARCH: STARTING ARCH PROCESSES COMPLETE
    ARC0: Becoming the 'no FAL' ARCH
    ARC0: Becoming the 'no SRL' ARCH
    ARC0: Thread not mounted
    ARC1: Becoming the heartbeat ARCH
    ARC2: Thread not mounted
    ARC1: Thread not mounted
    ARC3: Thread not mounted
    Successful mount of redo thread 1, with mount id 4235628820
    Physical Standby Database mounted.
    Lost write protection disabled
    Completed: ALTER DATABASE   MOUNT
    FAL[client]: Error fetching gap sequence, no FAL server specified

主要

    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    --------------
    1606


    SQL> SELECT name FROM v$archived_log WHERE thread# = 1 AND dest_id = 1 AND sequence#         BETWEEN 1591 and 1606;
    /home/oracle/archive/1_1606_792822090.dbf
    16 rows selected.

    SQL>  SELECT GROUP#, BYTES FROM V$LOG;
    GROUP#      BYTES
    ---------- ----------
     1   52428800
     2   52428800
     3   52428800

二次

    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    --------------
    1591



    SQL>select process, thread#, sequence#, status from v$managed_standby where   process='MRP0';
    no rows selected


    SQL> SELECT GROUP#, BYTES FROM V$STANDBY_LOG;
    no rows selected

2 个答案:

答案 0 :(得分:0)

您需要在init文件或spfile(sqlplus)中设置参数

在主数据库中:

FAL_SERVER='standby_database'
FAL_CLIENT='primary_database'

在备用数据库中:

FAL_SERVER='primary_database'
FAL_CLIENT='standby_database'

获取存档日志文件需要这两个参数(FAL表示Fetch ArchiveLog)。

希望我帮助你。

答案 1 :(得分:0)

这个问题已有5年历史了,但我觉得还没有完全回答。

首先,oracle如何解决这一差距:

MRP过程是触发GAP请求的过程。 该过程是这样打开的: 没有备用重做日志: 更改数据库恢复托管备用数据库断开连接; 使用待机重做: 使用当前日志文件断开连接更改数据库以恢复托管备用数据库;

如果主数据库只有一个备用数据库,那么实际上不需要配置fal_server和fal_client参数。

如果缺少fal_server,oracle将从log_archive_dest_n中获取该信息。

这意味着还需要在备用数据库上配置log_archive_dest_2。

那么如何解决GAP解析问题:

  1. 确保在主数据库和备用数据库中都设置了log_archive_dest_n
  2. 请确保的“服务”值中没有错字 log_archive_dest_n。
  3. 确保服务值引用tnsnames.ora中的有效tns条目
  4. 确保在主群集和备用群集的所有节点上使用相同的密码文件。
  5. 确保您可以从主数据库和备用数据库同时连接sqlplus“ sys / syspassword @ primary as sysdba”和sqlplus“ sys / syspassword @ standby as sysdba”。列表项

MRP流程每隔一段时间发送一次GAP解析请求。如果您想立即获得它以确保其有效: SQL> alter database restore托管备用数据库取消; SQL> alter database使用当前日志文件恢复托管备用数据库; (使用备用重做日志,它可以在备用数据库上更快地应用日志)


如果要设置级联备用设置,则

fal_server和fal_client参数实际上存在。

主数据库A将存档的日志发送到备用数据库B 如果备用数据库B成为主要数据库,则将存档的日志发送到备用数据库C。

11.2(文档ID 1394472.1)上的FAL行为

  

从11.2开始,无需提及FAL_CLIENT主数据库将其用于   log_archive_dest_n(从其接收到的远程目标备用数据库   FAL request)服务。

级联待机的FAL_SERVER和FAL_CLIENT设置(文档ID 358767.1)