1.Primary数据库生成LogMiner字典信息(生成之前,确保待转换的物理Standby停止REDO应用)
ORCLPRI_LG >execute dbms_logstdby.build;
PL/SQL procedure successfully completed.
2.逻辑Standby更名
ORCLSTD_LG >show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string orcl
ORCLSTD_LG >alter database recover to logical standby ORCLLDG;
alter database recover to logical standby ORCLLDG
*
ERROR at line 1:
ORA-19953: database should not be open
ORCLSTD_LG >shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
ORCLSTD_LG >alter database recover to logical standby ORCLLDG;
alter database recover to logical standby ORCLLDG
*
ERROR at line 1:
ORA-01034: ORACLE not available
ORCLSTD_LG >startup mount
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 62916852 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORCLSTD_LG >alter database recover to logical standby ORCLLDG;
Database altered.
ORCLSTD_LG >show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string orcl
ORCLSTD_LG >shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
ORCLSTD_LG >startup mount
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 62916852 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
Database mounted.
3.重启生效
ORCLSTD_LG >show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string ORCLLDG
ORCLSTD_LG >select database_role from v$database;
DATABASE_ROLE
----------------
LOGICAL STANDBY
4.创建本地和远程归档路径
修改Primary spfile:
orcl.__db_cache_size=92274688
orcl.__java_pool_size=4194304
orcl.__large_pool_size=4194304
orcl.__shared_pool_size=58720256
orcl.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.background_dump_dest='/u01/app/oracle/admin/orcl/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/oradata/orcl/control02.ctl','/u01/app/oracle/oradata/orcl/control03.ctl'#Restore Controlfile
*.core_dump_dest='/u01/app/oracle/admin/orcl/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/orclstd','/u01/rec_catalog','/u01/app/oracle/oradata/orclstd'
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.db_unique_name='orclpre'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.fal_client='orcl_192.168.1.222'
*.fal_server='orcls_192.168.1.223'
*.job_queue_processes=10
*.log_archive_config='dg_config=(orclpre,orclldg)'
*.log_archive_dest_1='location=/u01/arch_orcl'
*.log_archive_dest_2='service=orcls_192.168.1.223 lgwr async valid_for=(online_logfiles, primary_role) db_unique_name=orclldg'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='archive_%t_%s_%r.arclog'
*.log_file_name_convert='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/orclstd','/u01/rec_catalog',