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

溫馨提示×

溫馨提示×

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

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

oracle ADG for windows install steps

發布時間:2020-05-26 16:26:50 來源:網絡 閱讀:290 作者:劉楓_Leo 欄目:關系型數據庫

環境介紹:
windows 2012 R2*2臺
主庫:安裝oracle軟件、監聽、實例
備庫:安裝oracle軟件、監聽
數據庫版本:11.2.0.4
主庫:orcl
備庫:prod

1、主庫
create pfile='C:\Users\Administrator\Desktop\file\pfile.ora' from spfile;
alter database force logging;

alter system set log_archive_config='DG_CONFIG=(orcl,prod)' scope=spfile;
alter system set log_archive_dest_1='location=C:\app\archive valid_for=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl' scope=both sid='';
alter system set log_archive_dest_2='service=prod LGWR ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=prod' scope=both sid='
';
alter system set log_archive_dest_state_1='enable' scope=both sid='';
alter system set log_archive_dest_state_2='enable' scope=both sid='
';
alter system set fal_client='orcl' scope=both sid='';
alter system set fal_server='prod' scope=both sid='
';
alter system set standby_file_management='AUTO' scope=both sid='';
alter system set db_file_name_convert='C:\app\datafiles\orcl\','C:\app\datafiles\prod\' scope=spfile sid='
';
alter system set log_file_name_convert='C:\app\datafiles\orcl\','C:\app\datafiles\prod\' scope=spfile sid='*';

SQL> create pfile='C:\Users\Administrator\Desktop\file\pfilebak.ora' from spfile;

2、備庫創建目錄
歸檔目錄 C:\app\archive
數據文件目錄 C:\app\datafiles\prod\
adump目錄 C:\app\Administrator\admin\prod\adump

3、主庫備份
rman target /
run{
allocate channel a1 device type disk;
allocate channel a2 device type disk;
allocate channel a3 device type disk;
crosscheck archivelog all;
sql 'alter system archive log current';
sql 'alter system archive log current';
backup full database format='C:\Users\Administrator\Desktop\file\full%U%T' include current controlfile for standby;
backup current controlfile for standby format 'C:\Users\Administrator\Desktop\file\control01.ctl';
backup archivelog all format 'C:\Users\Administrator\Desktop\file\arch
%d%T%U.arc';
release channel a1;
release channel a2;
release channel a3;
}

4、拷貝文件
密碼文件在$ORACLE_HOME/database
將密碼文件(需要改sid)、pfile、redo、temp、拷貝到備庫相應目錄。

5、修改host文件
192.168.3.2 WIN-JP7MSEND1SD
192.168.3.3 WIN-KL9BBQ52F5R

6、主備庫tnsnames一致

7、修改備庫pfile文件
更改pfile文件
db_name='orcl'應與主庫一致
.db_unique_name='prod'
.audit_file_dest='C:\app\Administrator\admin\prod\adump' 注意路徑
log_archive_dest_1='C:\app\archive'
.db_recovery_file_dest
oracle_base
刪除log_archive_dest_2、log_archive_dest_state_1
修改
fal_client='prod'
.fal_server='orcl'
.log_archive_config='DG_CONFIG=(orcl,prod)'
.log_archive_dest_1='location=C:\app\archive valid_for=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=prod'

*檢查文件中的路徑是否正確***

8、備庫添加服務
oradim -new -sid prod -startmode auto
set ORACLE_SID=prod

9、恢復備庫
sql>startup nomount pfile='C:\Users\Administrator\Desktop\file\pfilebak.ora';
sql>create spfile from pfile='C:\Users\Administrator\Desktop\file\pfilebak.ora';
若有需求更改數據文件目錄可通過
rman target / nocatalog
RMAN> restore standby controlfile from 'C:\Users\Administrator\Desktop\file\control01.ctl';
SQL>alter database mount;
catalog start with 'C:\Users\Administrator\Desktop\file\';

run
{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
set newname for datafile 1 to 'C:\app\datafiles\prod\system01.dbf';
set newname for datafile 2 to 'C:\app\datafiles\prod\sysaux01.dbf';
set newname for datafile 3 to 'C:\app\datafiles\prod\undotbs01.dbf';
set newname for datafile 4 to 'C:\app\datafiles\prod\users01.dbf';
set newname for datafile 5 to 'C:\app\datafiles\prod\example01.dbf';
restore database;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}
recover database;

10、主備庫添加standby日志(比online log至少多一個)
主庫
alter database add standby logfile thread 1 group 4('C:\app\datafiles\orcl\standby04.log') size 50M;
alter database add standby logfile thread 1 group 5 ('C:\app\datafiles\orcl\standby05.log') size 50M;
alter database add standby logfile thread 1 group 6 ('C:\app\datafiles\orcl\standby06.log') size 50M;
alter database add standby logfile thread 1 group 7 ('C:\app\datafiles\orcl\standby07.log') size 50M;
alter database add standby logfile thread 1 group 8 ('C:\app\datafiles\orcl\standby08.log') size 50M;
備庫
alter database add standby logfile thread 1 group 4('C:\app\datafiles\prod\standby04.log') size 50M;
alter database add standby logfile thread 1 group 5 ('C:\app\datafiles\prod\standby05.log') size 50M;
alter database add standby logfile thread 1 group 6 ('C:\app\datafiles\prod\standby06.log') size 50M;
alter database add standby logfile thread 1 group 7 ('C:\app\datafiles\prod\standby07.log') size 50M;
alter database add standby logfile thread 1 group 8 ('C:\app\datafiles\prod\standby08.log') size 50M;

11、主庫重啟DB 因為log_archive_config重啟生效

啟動同步
SQL>alter database recover managed standby database disconnect from session;
SQL> recover managed standby database cancel;
SQL>alter database open read only;
SQL>alter database recover managed standby database using current logfile disconnect from session;

驗證
主庫 v$archived_log
SQL> select thread#,max(sequence#) from v$archived_log where applied='NO' group by thread#;

備庫 v$archived_log
SQL> select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;

備庫 v$managed_standby;
select process,status,thread#,sequence# from v$managed_standby;
SQL> select process,status,thread#,sequence# from v$managed_standby;

PROCESS STATUS THREAD# SEQUENCE#


ARCH CONNECTED 0 0
ARCH CONNECTED 0 0
ARCH CLOSING 1 10
ARCH CLOSING 1 11
RFS IDLE 0 0
RFS IDLE 0 0
RFS IDLE 0 0
RFS IDLE 1 12
MRP0 APPLYING_LOG 1 12

向AI問一下細節

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

AI

同心县| 伊宁县| 日照市| 昌邑市| 宜良县| 南陵县| 诏安县| 绵竹市| 白山市| 浪卡子县| 富宁县| 霍州市| 靖西县| 唐海县| 广水市| 祁阳县| 大关县| 广南县| 陇川县| 临沧市| 延长县| 九龙坡区| 都兰县| 波密县| 涟源市| 金坛市| 隆化县| 德惠市| 伊宁县| 和平县| 阜城县| 昭通市| 姜堰市| 甘肃省| 兰西县| 叶城县| 南昌市| 平南县| 湟中县| 望都县| 新沂市|