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

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

73

积分

0

好友

0

主题
1#
发表于 2011-11-27 22:55:01 | 查看: 5583| 回复: 4
主从库的 OS  window 2003 ,db   oracle 10.2.0.1

db_name =orcl

主库db_unique_name=orcl  从库的为orcldg

主库的初始化参数

orcl.__db_cache_size=419430400
orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__shared_pool_size=176160768
orcl.__streams_pool_size=0
*.audit_file_dest='F:\oracle\product\10.2.0/admin/orcl/adump'
*.background_dump_dest='F:\oracle\product\10.2.0/admin/orcl/bdump'
*.compatible='10.2.0.1.0'
*.control_files='F:\oracle\product\10.2.0\oradata\orcl\control01.ctl','F:\oracle\product\10.2.0\oradata\orcl\control02.ctl','F:\oracle\product\10.2.0\oradata\orcl\control03.ctl'
*.core_dump_dest='F:\oracle\product\10.2.0/admin/orcl/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='orcl'
*.db_recovery_file_dest='F:\oracle\product\10.2.0/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.db_unique_name='orcl'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.fal_client='orcldg'
*.fal_server='orcl'
*.job_queue_processes=10
*.log_archive_config='dg_config=(orcl,orcldg)'
*.log_archive_dest_1='location=F:\oracle\product\10.2.0/flash_recovery_area valid_for=(all_logfiles,all_roles) db_unique_name=orcl'
*.log_archive_dest_2='service=orcldg lgwr async valid_for=(online_logfiles,primary_roles) db_unique_name=orcldg'
*.log_archive_dest_state_1='enable'
*.log_archive_dest_state_2='enable'
*.log_archive_format='%d_%t_%s_%r.arc'
*.open_cursors=300
*.pga_aggregate_target=203423744
*.processes=150
*.remote_login_passwordfile='exclusive'
*.sga_target=612368384
*.standby_file_management='auto'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='F:\oracle\product\10.2.0/admin/orcl/udump'




从库的初始化参数

orcl.__db_cache_size=134217728
orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__shared_pool_size=75497472
orcl.__streams_pool_size=0
*.audit_file_dest='F:\oracle\product\10.2.0/admin/orcl/adump'
*.background_dump_dest='F:\oracle\product\10.2.0/admin/orcl/bdump'
*.compatible='10.2.0.1.0'
*.control_files='F:\oracle\product\10.2.0\oradata\orcl\control01.ctl','F:\oracle\product\10.2.0\oradata\orcl\control02.ctl','F:\oracle\product\10.2.0\oradata\orcl\control03.ctl'
*.core_dump_dest='F:\oracle\product\10.2.0/admin/orcl/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='orcl'
*.db_recovery_file_dest='F:\oracle\product\10.2.0/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.db_unique_name='ORCLDG'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=72351744
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=219152384
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='F:\oracle\product\10.2.0/admin/orcl/udump'
*.log_archive_config='dg_config=(orcl,orcldg)'
*.log_archive_dest_1='location=F:\oracle\product\10.2.0/flash_recovery_area valid_for=(all_logfiles,all_roles) db_unique_name=orcldg'
*.log_archive_dest_2='service=orcl lgwr async valid_for=(online_logfiles,primary_roles) db_unique_name=orcl'
*.log_archive_dest_state_1=enable
*.log_archive_dest_state_2=enable
*.remote_login_passwordfile=exclusive
*.log_archive_format=%d_%t_%s_%r.arc
*.log_archive_max_prosesses=5
*.fal_server=orcl
*.fal_client=orcldg
*.standby_file_management=auto
*.DB_FILE_NAME_CONVERT='oradata\orcl','oradata\orcl'
*.LOG_FILE_NAME_CONVERT='oradata\orcl','oradata\orcl'


采用 rman duplicate 做的DG

主库:
RMAN> backup full format='F:\oracle\bak\full_%d_%t_%s' database include current controlfile for standby
2> plus archivelog format='F:\oracle\bak\arch_%d_%t_%s';


从库
duplicate target database for standby dorecover nofilenamecheck;




验证

主库

当前日志序列           26
SQL> alter system  switch logfile
  2  /
系统已更改。
SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
            26


从库--
SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
            24


从库告警日志

Managed Standby Recovery not using Real Time Apply
Sun Nov 27 22:35:06 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 1 of thread 1
Sun Nov 27 22:35:06 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 1 of thread 1
Clearing online redo logfile 1 F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCLDG\ONLINELOG\O1_MF_1_U_.LOG
Clearing online log 1 of thread 1 sequence number 23
Sun Nov 27 22:35:06 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 1 of thread 1
Sun Nov 27 22:35:06 2011
Completed: ALTER DATABASE RECOVER  managed standby database disconnect from session  
Sun Nov 27 22:35:08 2011
Clearing online redo logfile 1 complete
Sun Nov 27 22:35:08 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 2 of thread 1
Sun Nov 27 22:35:08 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 2 of thread 1
Clearing online redo logfile 2 F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCLDG\ONLINELOG\O1_MF_2_U_.LOG
Clearing online log 2 of thread 1 sequence number 24
Sun Nov 27 22:35:08 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 2 of thread 1
Clearing online redo logfile 2 complete
Sun Nov 27 22:35:09 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 3 of thread 1
Sun Nov 27 22:35:09 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 3 of thread 1
Clearing online redo logfile 3 F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCLDG\ONLINELOG\O1_MF_3_U_.LOG
Clearing online log 3 of thread 1 sequence number 22
Sun Nov 27 22:35:09 2011
Errors in file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc:
ORA-00313: open failed for members of log group 3 of thread 1
Clearing online redo logfile 3 complete
Media Recovery Waiting for thread 1 sequence 25


orcl_mrp0_2704.trc 的内容

Dump file f:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mrp0_2704.trc
Sun Nov 27 22:35:00 2011
ORACLE V10.2.0.1.0 - Production vsnsta=0
vsnsql=14 vsnxtr=3
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Windows Server 2003 Version V5.2 Service Pack 2
CPU                 : 1 - type 586, 1 Physical Cores
Process Affinity    : 0x00000000
Memory (Avail/Total): Ph:306M/799M, Ph+PgF:1344M/1865M, VA:1653M/2047M
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 21
Windows thread id: 2704, image: ORACLE.EXE (MRP0)

*** SERVICE NAME:() 2011-11-27 22:35:00.968
*** SESSION ID:(150.1) 2011-11-27 22:35:00.968
*** 2011-11-27 22:35:00.968 60680 kcrr.c
MRP0: Background Managed Standby Recovery process started
*** 2011-11-27 22:35:05.984 1011 krsm.c
Managed Recovery: Initialization posted.
*** 2011-11-27 22:35:05.984 60680 kcrr.c
Managed Standby Recovery not using Real Time Apply
Recovery target incarnation = 2, activation ID = 1296068253
Influx buffer limit = 7984 (50% x 15968)
Start recovery at thread 1 ckpt scn 627272 logseq 25 block 2
*** 2011-11-27 22:35:06.249
Media Recovery add redo thread 1
*** 2011-11-27 22:35:06.249 1011 krsm.c
Managed Recovery: Active posted.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00313: open failed for members of log group 1 of thread 1
*** 2011-11-27 22:35:06.296 60680 kcrr.c
Clearing online redo logfile 1 F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCLDG\ONLINELOG\O1_MF_1_%U_.LOG
ORA-00313: open failed for members of log group 1 of thread 1
*** 2011-11-27 22:35:08.015 60680 kcrr.c
Clearing online redo logfile 1 complete
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00313: open failed for members of log group 2 of thread 1
*** 2011-11-27 22:35:08.015 60680 kcrr.c
Clearing online redo logfile 2 F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCLDG\ONLINELOG\O1_MF_2_%U_.LOG
ORA-00313: open failed for members of log group 2 of thread 1
*** 2011-11-27 22:35:09.827 60680 kcrr.c
Clearing online redo logfile 2 complete
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00313: open failed for members of log group 3 of thread 1
*** 2011-11-27 22:35:09.843 60680 kcrr.c
Clearing online redo logfile 3 F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCLDG\ONLINELOG\O1_MF_3_%U_.LOG
ORA-00313: open failed for members of log group 3 of thread 1
*** 2011-11-27 22:35:11.187 60680 kcrr.c
Clearing online redo logfile 3 complete
*** 2011-11-27 22:35:11.218 60680 kcrr.c
Media Recovery Waiting for thread 1 sequence 25

现在就是采用alter sysytem switch logfile  

归档日志还是没传过去 ,大家帮看看
2#
发表于 2011-11-27 23:02:34
你因该是在同一台server上做DG吧?

*.DB_FILE_NAME_CONVERT='oradata\orcl','oradata\orcl'
*.LOG_FILE_NAME_CONVERT='oradata\orcl','oradata\orcl' ?

回复 只看该作者 道具 举报

3#
发表于 2011-11-27 23:18:33
我的从库是在虚拟机上

主从库的安装目录完全一样

所以我上面配的
*.DB_FILE_NAME_CONVERT='oradata\orcl','oradata\orcl'
*.LOG_FILE_NAME_CONVERT='oradata\orcl','oradata\orcl' ?

多余

但是不明白主库的归档没有传过去

回复 只看该作者 道具 举报

4#
发表于 2011-11-27 23:21:00
F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCLDG\ONLINELOG\O1_MF_1_%U_.LOG

仔细看一下,ONLINELOG的目录时不一样的吧?

回复 只看该作者 道具 举报

5#
发表于 2011-11-28 02:19:02
谢谢 ML  我的搞定

回复 只看该作者 道具 举报

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

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

GMT+8, 2024-11-15 01:55 , Processed in 0.050724 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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