Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

17

积分

0

好友

10

主题
1#
发表于 2012-8-14 00:44:34 | 查看: 6162| 回复: 2
我的dataguard配置完后,一直报这个错,不知道为何,哪位帮我看一下谢谢!
我的是RAC跟一个单实例做的DataGuard rac我只开一个节点。
两端的sys密码文件密码都是一样的。
网络也通,也可以用sys用户连接到对方的数据库
但是主库报ORA-16057
SQL> select dest_name,status,error from v$archive_dest;

DEST_NAME            STATUS     ERROR
-------------------- ---------- --------------------------------------------------
LOG_ARCHIVE_DEST_1   VALID      
LOG_ARCHIVE_DEST_2   INACTIVE   
LOG_ARCHIVE_DEST_3   ERROR      ORA-16057: Data Guard 配置中没有来自服务器的 DGID
LOG_ARCHIVE_DEST_4   INACTIVE   
LOG_ARCHIVE_DEST_5   INACTIVE   
LOG_ARCHIVE_DEST_6   INACTIVE   
LOG_ARCHIVE_DEST_7   INACTIVE   
LOG_ARCHIVE_DEST_8   INACTIVE   
LOG_ARCHIVE_DEST_9   INACTIVE   
alert中的错误信息
ORA-16057: DGID from server not in Data Guard configuration
Tue Aug 14 00:22:05 CST 2012
PING[ARC0]: Heartbeat failed to connect to standby 'single'. Error is 16057.
trc中的详情
[oracle@rac1 bdump]$ more /u01/app/oracle/admin/prod/bdump/prod1_arc0_31428.trc
/u01/app/oracle/admin/prod/bdump/prod1_arc0_31428.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/10g
System name:    Linux
Node name:      rac1.test.com
Release:        2.6.32-200.13.1.el5uek
Version:        #1 SMP Wed Jul 27 21:02:33 EDT 2011
Machine:        x86_64
Instance name: prod1
Redo thread mounted by this instance: 1
Oracle process number: 25
Unix process pid: 31428, image: oracle@rac1.test.com (ARC0)
*** 2012-08-14 00:22:05.362
*** SERVICE NAME:(SYS$BACKGROUND) 2012-08-14 00:22:05.361
*** SESSION ID:(146.2) 2012-08-14 00:22:05.361
Redo shipping client performing standby login
*** 2012-08-14 00:22:05.415 68920 kcrr.c
Logged on to standby successfully
Client logon and security negotiation successful!
This database DGID not in Data Guard configuration at 'single'
Error 16057 attaching to destination LOG_ARCHIVE_DEST_3 standby host 'single'
ORA-16057: DGID from server not in Data Guard configuration
*** 2012-08-14 00:22:05.419 64896 kcrr.c
PING[ARC0]: Heartbeat failed to connect to standby 'single'. Error is 16057.
*** 2012-08-14 00:22:05.419 63005 kcrr.c
kcrrfail: dest:3 err:16057 force:0 blast:1

下面是一些参数文件
主库参数
prod2.__db_cache_size=67108864
prod1.__db_cache_size=62914560
prod2.__java_pool_size=4194304
prod1.__java_pool_size=4194304
prod2.__large_pool_size=4194304
prod1.__large_pool_size=4194304
prod2.__shared_pool_size=121634816
prod1.__shared_pool_size=125829120
prod2.__streams_pool_size=0
prod1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/prod/adump'
*.background_dump_dest='/u01/app/oracle/admin/prod/bdump'
*.cluster_database_instances=2
*.cluster_database=TRUE
*.compatible='10.2.0.5.0'
*.control_files='+DATA/prod/controlfile/current.256.786834991','+FLABAK/prod/controlfile/current.256.786834993'
*.core_dump_dest='/u01/app/oracle/admin/prod/cdump'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain='test.com'
*.db_file_multiblock_read_count=16
*.db_file_name_convert='/u02/oradata/single','+DATA/prod/datafile','/u02/oradata/single/tempfile','+DATA/prod/tempfile'
*.db_name='prod'
*.db_recovery_file_dest='+FLABAK'
*.db_recovery_file_dest_size=3221225472
*.dispatchers='(PROTOCOL=TCP) (SERVICE=prodXDB)'
prod1.fal_client='rac1'
prod2.fal_client='rac2'
*.fal_server='single'
prod2.instance_number=2
prod1.instance_number=1
*.job_queue_processes=1
*.log_archive_config='dg_config=(single,rac1)'
prod2.log_archive_dest_1='location=/u02/arch'
prod1.log_archive_dest_1='location=/u02/arch'
prod1.log_archive_dest_2=''
prod2.log_archive_dest_2=''
*.log_archive_dest_3='service=single valid_for=(online_logfiles,primary_role) db_unique_name=prod'
prod1.log_archive_format='log%t_%s_%r.arc'
prod2.log_archive_format='log%t_%s_%r.arc'
*.log_archive_max_processes=2
*.log_file_name_convert='/u02/oradata/single/onlinelog','+DATA/prod/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=67108864
*.processes=150
*.remote_listener='LISTENERS_PROD'
*.remote_login_passwordfile='exclusive'
*.service_names='prod.test.com,rac.test.com'
*.sga_target=202375168
*.standby_archive_dest=''
prod1.standby_archive_dest='/u02/arch'
prod2.standby_archive_dest='/u02/arch'
*.standby_file_management='AUTO'
prod2.thread=2
prod1.thread=1
*.undo_management='AUTO'
prod2.undo_tablespace='UNDOTBS2'
prod1.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/prod/udump'
备库参数
*.__db_cache_size=62914560
prod.__db_cache_size=62914560
*.__java_pool_size=4194304
prod.__java_pool_size=4194304
*.__large_pool_size=4194304
prod.__large_pool_size=4194304
*.__shared_pool_size=125829120
prod.__shared_pool_size=125829120
*.__streams_pool_size=0
prod.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/single/adump'
*.background_dump_dest='/u01/app/oracle/admin/single/bdump'
*.compatible='10.2.0.5.0'
*.control_files='/u02/oradata/single/control01.ctl','/u02/oradata/single/control02.ctl','/u02/oradata/single/control03.ctl'#Restore Controlfile
*.core_dump_dest='/u01/app/oracle/admin/single/cdump'
*.db_block_size=8192
*.db_domain='test.com'
*.db_file_multiblock_read_count=16
*.db_file_name_convert='+DATA/prod/datafile','/u02/oradata/single','+DATA/prod/tempfile','/u02/oradata/single/tempfile'
*.db_name='prod'
*.db_recovery_file_dest='/u02/oradata/single/flabak'
*.db_recovery_file_dest_size=3221225472
*.db_unique_name='single'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=prodXDB)'
*.fal_client='single'
*.fal_server='rac1','rac2'
*.job_queue_processes=1
*.log_archive_config='dg_config=(rac1,single)'
*.log_archive_dest_1='location=/u02/arch'
#*.log_archive_dest_3='service=rac1 valid_for=(online_logfiles,primary_role) db_unique_name=prod'
*.log_archive_dest_3='service=rac1 valid_for=(online_logfiles,primary_role) db_unique_name=single'
*.log_archive_format='log%t_%s_%r.arc'
*.log_archive_max_processes=2
*.log_file_name_convert='+DATA/prod/onlinelog','/u02/oradata/single/onlinelog'
*.open_cursors=300
*.pga_aggregate_target=67108864
*.processes=150
*.remote_login_passwordfile='exclusive'
*.sga_target=202375168
*.standby_archive_dest='/u02/arch'
*.standby_file_management='auto'
*.thread=1
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/single/udump'
主库 listener.ora
[oracle@rac1 admin]$ cat listener.ora
# listener.ora.rac1 Network Configuration File: /u01/app/oracle/product/10g/network/admin/listener.ora.rac1
# Generated by Oracle configuration tools.
LISTENER_RAC1 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.21)(PORT = 1521)(IP = FIRST))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )
备库
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME=prod)
      (ORACLE_HOME = /u01/app/oracle/product/10g)
      (SID_NAME = prod)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.51)(PORT = 1521))
    )
  )
主库备库的tnsnames.ora配置都一样。
listeners_prod =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
  )
rac =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = prod.test.com)
      )
    )
  )
rac1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = prod.test.com)
      (INSTANCE_NAME = prod1)
    )
  )

rac2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = prod.test.com)
      (INSTANCE_NAME = prod2)
   )  
  )
single =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.51)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID = prod)
    )
  )
2#
发表于 2012-8-15 00:47:22
oerr ora 16057
应该会给出答案的  
log_archive_config没有设置吧

回复 只看该作者 道具 举报

3#
发表于 2012-8-15 11:40:09
log_archive_config='dg_config=(single,rac1)'

有设置,问题找到了,这个应该是db_unique_name
我设置成服务名了.

LOG_ARCHIVE_CONFIG enables or disables the sending of redo logs to remote destinations and the receipt of remote redo logs, and specifies the unique database names (DB_UNIQUE_NAME) for each database in the Data Guard configuration.

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-16 02:38 , Processed in 0.048378 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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