ITPub博客

首页 > 数据库 > Oracle > DG 创建

DG 创建

原创 Oracle 作者:Michael_DD 时间:2015-08-07 10:05:07 0 删除 编辑
DG 创建



alter system set  LOG_ARCHIVE_CONFIG='DG_CONFIG=(pxdb,szpxdbdg,shpxdbdg)';

alter system set  LOG_ARCHIVE_DEST_3='SERVICE=shpxdbdg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=shpxdbdg';

backup current controlfile for standby format '/tmp/pcxdb_control_std_%T';

alter system set log_archive_dest_1='location=/arch/shpxdbdg VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=shpxdbdg';

alter system set DB_UNIQUE_NAME='shpxdbdg' scope=spfile;

alter system set SERVICE_NAMES='shpxdbdg' scope=spfile;

alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(pxdb,shpxdbdg,szpxdbdg)';

alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE;

alter system set REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE scope=spfile;

alter system set STANDBY_FILE_MANAGEMENT=AUTO;

alter system set FAL_SERVER='pxdb';

alter system set FAL_CLIENT='shpxdbdg';

alter system set INSTANCE_NAME='shpdbdg' scope=spfile;

alter system set db_file_name_convert='/oradata/pxdb/','/oradata/shpxdbdg/' scope=spfile;

alter system set log_file_name_convert='/oradata/pxdb/','/oradata/shpxdbdg/' scope=spfile;

*.local_listener='(ADDRESS_LIST= (ADDRESS = (PROTOCOL = TCP)(HOST = 192.24.172.118)(PORT = 1521)))'


 直接日志应用:

SQL> shutdown immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area 3290345472 bytes
Fixed Size                  2257720 bytes
Variable Size            3070233800 bytes
Database Buffers          201326592 bytes
Redo Buffers               16527360 bytes
SQL> alter database mount standby database;
Database altered.
SQL> alter database recover managed standby database disconnect from session;
Database altered.

select first_time,sequence#,applied from v$archived_log where first_time>sysdate-1;






来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29500582/viewspace-1764449/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-02-22

  • 博文量
    326
  • 访问量
    2435621