亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

ADG系列之oracle rac到單機的ADG環境搭建

發布時間:2020-06-26 13:04:43 來源:網絡 閱讀:1308 作者:跑步跑步 欄目:關系型數據庫

地址規劃:

RAC: 1.1.1.62 rac5-vip

      1.1.1.64 rac6-vip

db_name hxzg

db_unique_name  hxzg


rac5-dg 1.1.1.68 

db_name hxzg

db_unique_name hxzgdg

歸檔路徑:/archivelog

數據文件路徑:/oradata/hxzg/


一、基本環境準備

1、確認機器為歸檔模式

archive log list

2、開啟主庫的force logging

alter database force logging;

二、主庫的操作

2.1修改參數

alter database force logging;

alter system set log_archive_config='dg_config=(hxzg,hxzgdg)' scope=both;

alter system set  log_archive_dest_1='location=+archive VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=hxzg';

alter system set LOG_ARCHIVE_DEST_2='SERVICE=hxzgdg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=hxzgdg' scope=both;    

alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE scope=both;    

alter system set LOG_ARCHIVE_DEST_STATE_2=ENABLE scope=both;    

alter system set FAL_SERVER=hxzgdg scope=both;       

alter system set FAL_CLIENT=hxzg1 scope=both;       

alter system set STANDBY_FILE_MANAGEMENT=auto scope=both;  

2.2 同步口令文件


三、配置網絡

  1. tns配置

    節點1/2/備庫的tnsnames.ora文件下添加如下內容:


hxzg1 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.62)(PORT = 1521))

    (ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.63)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = hxzg)

    )

  )


hxzgdg =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.68)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = hxzgdg)

    )

  )

2、配置備庫的listener

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = prod)

      (ORACLE_HOME = /oracle/app/db)

      (SID_NAME = hxzgdg)

    )

  )


LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER))

    )

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.68)(PORT = 1521))

    )

  )



ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON


四、備庫參數配置

獲取主庫的參數,在此基礎上進行修改

*.audit_file_dest='/oracle/app/oracle/admin/hxzg/adump'

*.audit_trail='db'

*.cluster_database=false

*.compatible='11.2.0.4.0'

*.control_files='/oradata/hxzg/control01.ctl'

*.db_block_size=8192

*.db_create_file_dest='/oradata/hxzg/'

*.db_domain=''

*.db_name='hxzg'

db_unique_name='hxzgdg'

*.db_recovery_file_dest_size=4621074432

*.diagnostic_dest='/oracle/app/oracle'

*.fal_client='HXZGDG'

*.fal_server='HXZG1'

*.log_archive_config='dg_config=(hxzg,hxzgdg)'

*.log_archive_dest_1='location=/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=hxzgdg'

*.log_archive_dest_2='SERVICE=hxzg1 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=hxzg'

*.log_archive_dest_state_1='ENABLE'

*.log_archive_dest_state_2='ENABLE'

*.memory_target=1200m

*.open_cursors=300

*.processes=150

*.remote_login_passwordfile='exclusive'

*.standby_file_management='AUTO'

*.undo_tablespace='UNDOTBS1'



--創建目錄

mkdir -p /oracle/app/oracle/admin/hxzg/adump

mkdir -p /oradata/hxzg


五、初始化數據庫

在主庫上執行備份動作

run

{

allocate channel ch2 type disk maxpiecesize =5120M;

allocate channel ch3 type disk maxpiecesize =5120M;

allocate channel ch4 type disk maxpiecesize =5120M;

allocate channel ch5 type disk maxpiecesize =5120M;

backup 

AS COMPRESSED BACKUPSET 

database filesperset 10 format '/backup/%d_DF_%T_%s_%p.bak';

 backup  AS COMPRESSED BACKUPSET 

 archivelog all format '/backup/%d_ARC_%T_%s_%p.bak';

 backup format '/backup/ctrl_%d_%T_%s'

 current controlfile for standby;

 backup spfile format '/backup/spfile_%d_%T_%s';

 release channel ch2;

 release channel ch3;

 release channel ch4;

 release channel ch5;

 }


2、在備庫上進行還原

RMAN> restore standby controlfile from '/backup/ctrl_HXZG_20171108_40';


RMAN> 

run{

set newname for database to '/oradata/hxzg/%b';

restore database;

switch datafile all;

}



3、創建standbylogfile

alter database add standby logfile thread 1 group 5 ('/oradata/hxzg/st_1_logfile5') size 50M;

alter database add standby logfile thread 1 group 6 ('/oradata/hxzg/st_1_logfile6') size 50M;

alter database add standby logfile thread 1 group 7 ('/oradata/hxzg/st_1_logfile7') size 50M;

alter database add standby logfile thread 1 group 11 ('/oradata/hxzg/st_1_logfile11') size 50M;



alter database add standby logfile thread 2 group 8 ('/oradata/hxzg/st_2_logfile8') size 50M;

alter database add standby logfile thread 2 group 9 ('/oradata/hxzg/st_2_logfile9') size 50M;

alter database add standby logfile thread 2 group 10 ('/oradata/hxzg/st_2_logfile10') size 50M;

alter database add standby logfile thread 1 group 12 ('/oradata/hxzg/st_2_logfile12') size 50M;



啟動mrp

alter database recover mananged standby database using current logfile disconnect from session;

七、相關檢查

1 在主庫上檢查第二歸檔終點是否正常

select name,status,error from v$archive_dest;


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

武鸣县| 辉南县| 宣汉县| 霍山县| 呼玛县| 贺兰县| 广水市| 扶风县| 荆州市| 苏州市| 巴东县| 县级市| 章丘市| 资中县| 清水县| 五家渠市| 衡阳市| 元谋县| 永平县| 霍城县| 崇礼县| 保定市| 苏尼特右旗| 尤溪县| 饶河县| 贺兰县| 那曲县| 商城县| 亳州市| 紫云| 大冶市| 和林格尔县| 宾川县| 登封市| 怀柔区| 宜州市| 北安市| 汉中市| 丰县| 怀化市| 天全县|