免费观看又色又爽又黄的小说免费_美女福利视频国产片_亚洲欧美精品_美国一级大黄大色毛片

oracleADGforwindowsinstallsteps

環(huán)境介紹:
windows 2012 R2*2臺
主庫:安裝oracle軟件、監(jiān)聽、實例
備庫:安裝oracle軟件、監(jiān)聽
數(shù)據(jù)庫版本:11.2.0.4
主庫:orcl
備庫:prod

創(chuàng)新互聯(lián)建站專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務,包含不限于網(wǎng)站建設、網(wǎng)站設計、江干網(wǎng)絡推廣、小程序設計、江干網(wǎng)絡營銷、江干企業(yè)策劃、江干品牌公關、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務,您的肯定,是我們最大的嘉獎;創(chuàng)新互聯(lián)建站為所有大學生創(chuàng)業(yè)者提供江干建站搭建服務,24小時服務熱線:18982081108,官方網(wǎng)址:m.newbst.com

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、備庫創(chuàng)建目錄
歸檔目錄 C:\app\archive
數(shù)據(jù)文件目錄 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';
若有需求更改數(shù)據(jù)文件目錄可通過
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

標題名稱:oracleADGforwindowsinstallsteps
新聞來源:http://m.newbst.com/article32/jesesc.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站收錄網(wǎng)站排名品牌網(wǎng)站制作、標簽優(yōu)化、網(wǎng)站建設、網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

搜索引擎優(yōu)化