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

【OracleDatabase】OracleDataGuard(single-single)

Oracle Data Guard確保了企業(yè)數(shù)據(jù)的高可用性、數(shù)據(jù)保護(hù)和災(zāi)難恢復(fù)。Data Guard提供了一套全面的服務(wù),用于創(chuàng)建、維護(hù)、管理和監(jiān)視一個(gè)或多個(gè)備用數(shù)據(jù)庫,以使生產(chǎn)數(shù)據(jù)庫能夠在災(zāi)難和數(shù)據(jù)損壞中生存。Data Guard將這些備用數(shù)據(jù)庫維護(hù)為生產(chǎn)數(shù)據(jù)庫的事務(wù)一致副本。然后,如果由于計(jì)劃內(nèi)或計(jì)劃外停機(jī)而導(dǎo)致生產(chǎn)數(shù)據(jù)庫不可用,則Data Guard可以將任何備用數(shù)據(jù)庫切換到生產(chǎn)角色,從而將與停機(jī)相關(guān)的停機(jī)時(shí)間降至最低。數(shù)據(jù)保護(hù)可以與傳統(tǒng)的備份、恢復(fù)和群集技術(shù)一起使用,以提供高級(jí)別的數(shù)據(jù)保護(hù)和數(shù)據(jù)可用性。

讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來自于我們對這個(gè)行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長期合作伙伴,公司提供的服務(wù)項(xiàng)目有:空間域名、網(wǎng)絡(luò)空間、營銷軟件、網(wǎng)站建設(shè)、烏蘭察布網(wǎng)站維護(hù)、網(wǎng)站推廣。

[oracle@wallet01?~]$?sqlplus?/?as?sysdba
SQL>?alter?database?force?logging;
Database?altered.

SQL>?col?force_logging?for?a15
SQL>?select?force_logging?from?v$database;
FORCE_LOGGING
---------------
YES

SQL>?archive?log?list;
Database?log?mode??????????????Archive?Mode
Automatic?archival?????????????Enabled
Archive?destination????????????USE_DB_RECOVERY_FILE_DEST
Oldest?online?log?sequence?????35
Next?log?sequence?to?archive???37
Current?log?sequence???????????37

SQL>?alter?system?set?db_unique_name='walletmdb'?scope=spfile;
SQL>?alter?system?set?log_archive_config='dg_config=(walletmdb,walletsdb)'?scope=spfile;
SQL>?alter?system?set?log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST?valid_for=(all_logfiles,all_roles)?db_unique_name=walletmdb'?scope=spfile;
SQL>?alter?system?set?log_archive_dest_2='service=walletsdb?lgwr?async?valid_for=(online_logfiles,primary_role)?db_unique_name=walletsdb'?scope=spfile;
SQL>?alter?system?set?fal_server='walletsdb'?scope=spfile;
SQL>?alter?system?set?standby_file_management='auto'?scope=spfile;
SQL>?alter?system?set?log_archive_dest_state_2='defer'?scope=spfile;
SQL>?alter?system?set?service_names=walletdb,walletmdb?scope=spfile;

[oracle@wallet01?~]$?cd?$ORACLE_HOME/dbs
[oracle@wallet01?dbs]$?sqlplus?/?as?sysdba
SQL>?create?pfile?from?spfile;??
File?created.

[oracle@wallet01?dbs]$?scp?initwalletdb.ora?192.168.1.202:/u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@wallet01?dbs]$?scp?orapwwalletdb?192.168.1.202:/u01/app/oracle/product/11.2.0/db_1/dbs

[oracle@wallet01?~]$?mkdir?backup
[oracle@wallet02?~]$?mkdir?backup

[oracle@wallet01?~]$?rman?target?/
RMAN>?backup?device?type?disk?format?'/home/oracle/backup/%U'?database?plus?archivelog;
RMAN>?backup?device?type?disk?format?'/home/oracle/backup/%U'?current?controlfile?for?standby;

[oracle@wallet01?~]$?scp?/home/oracle/backup/*??192.168.1.202:/home/oracle/backup

[oracle@wallet01?~]$?vi?$ORACLE_HOME/network/admin/tnsnames.ora
walletmdb?=
??(DESCRIPTION?=
????(ADDRESS_LIST?=
??????(ADDRESS?=?(PROTOCOL?=?TCP)(HOST?=?192.168.1.201)(PORT?=?1521))
????)
????(CONNECT_DATA?=
??????(SERVICE_NAME?=?walletdb)
????)
??)
walletsdb?=
??(DESCRIPTION?=
????(ADDRESS_LIST?=
??????(ADDRESS?=?(PROTOCOL?=?TCP)(HOST?=?192.168.1.202)(PORT?=?1521))
????)
????(CONNECT_DATA?=
??????(SERVICE_NAME?=?walletdb)
????)
??)

[oracle@wallet02?~]$?vi?$ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER?=
??(SID_LIST?=
????(SID_DESC?=
??????(GLOBAL_DBNAME?=?walletdb)
??????(ORACLE_HOME?=?/u01/app/oracle/product/11.2.0/db_1)
??????(SID_NAME?=?walletdb)
????)
??)
LISTENER?=
??(DESCRIPTION?=
????(ADDRESS?=?(PROTOCOL?=?TCP)(HOST?=?wallet02)(PORT?=?1521))
??)
ADR_BASE_LISTENER?=?/u01/app/oracle

[oracle@wallet02?~]$?lsnrctl?start
[oracle@wallet02?~]$?lsnrctl?status??

[oracle@wallet02?~]$?vi?$ORACLE_HOME/network/admin/tnsnames.ora
walletmdb?=
??(DESCRIPTION?=
????(ADDRESS_LIST?=
??????(ADDRESS?=?(PROTOCOL?=?TCP)(HOST?=?192.168.1.201)(PORT?=?1521))
????)
????(CONNECT_DATA?=
??????(SERVICE_NAME?=?walletdb)
????)
??)
walletsdb?=
??(DESCRIPTION?=
????(ADDRESS_LIST?=
??????(ADDRESS?=?(PROTOCOL?=?TCP)(HOST?=?192.168.1.202)(PORT?=?1521))
????)
????(CONNECT_DATA?=
??????(SERVICE_NAME?=?walletdb)
????)
??)
??
[oracle@wallet01?~]$?tnsping?walletsdb
Used?TNSNAMES?adapter?to?resolve?the?alias
Attempting?to?contact?(DESCRIPTION?=?(ADDRESS_LIST?=?(ADDRESS?=?(PROTOCOL?=?TCP)(HOST?=?192.168.1.202)(PORT?=?1521)))?(CONNECT_DATA?=?(SERVICE_NAME?=?
walletdb)))
OK?(40?msec)

[oracle@wallet02?~]$?tnsping?walletmdb
Used?TNSNAMES?adapter?to?resolve?the?alias
Attempting?to?contact?(DESCRIPTION?=?(ADDRESS_LIST?=?(ADDRESS?=?(PROTOCOL?=?TCP)(HOST?=?192.168.1.201)(PORT?=?1521)))?(CONNECT_DATA?=?(SERVICE_NAME?=?
walletdb)))
OK?(30?msec)??

[oracle@wallet02?~]$?cd?$ORACLE_HOME/dbs
[oracle@wallet02?dbs]$?vi?initambdb.ora
*.audit_file_dest='/u01/app/oracle/admin/walletdb/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/u01/app/oracle/oradata/ambdb/control01.ctl','/u01/app/oracle/fast_recovery_area/ambdb/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='walletdb'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=107374182400
*.db_unique_name='walletsdb'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP)?(SERVICE=walletdbXDB)'
*.fal_server='walletmdb'
*.log_archive_config='dg_config=(walletmdb,walletsdb)'
*.log_archive_dest_1='location=db_recovery_file_dest?valid_for=(all_logfiles,all_roles)?db_unique_name=walletsdb'
*.log_archive_dest_2='service=walletmdb?lgwr?async?valid_for=(online_logfiles,primary_role)?db_unique_name=walletmdb'
*.memory_max_target=1073741824
*.memory_target=1073741824
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.service_names='walletdb','walletsdb'
*.standby_file_management='auto'
*.undo_tablespace='UNDOTBS1'

[oracle@wallet02?dbs]$?sqlplus?/?as?sysdba
SQL>?create?spfile?from?pfile;

File?created.

[oracle@wallet02?~]$?mkdir?-p?/u01/app/oracle/admin/walletdb/adump
[oracle@wallet02?~]$?mkdir?-p?/u01/app/oracle/oradata/walletdb
[oracle@wallet02?~]$?mkdir?-p?/u01/app/oracle/fast_recovery_area/walletdb

[oracle@wallet02?~]$?sqlplus?/?as?sysdba
SQL>?startup?nomount;
ORACLE?instance?started.

Total?System?Global?Area?1068937216?bytes
Fixed?Size??????????????????2260088?bytes
Variable?Size?????????????432014216?bytes
Database?Buffers??????????629145600?bytes
Redo?Buffers????????????????5517312?bytes

[oracle@wallet02?~]$?rman?target?sys/oracle@walletmdb?auxiliary?sys/oracle@walletsdb?nocatalog
Recovery?Manager:?Release?11.2.0.4.0?-?Production?on?Sat?Mar?31?14:25:26?2018
Copyright?(c)?1982,?2011,?Oracle?and/or?its?affiliates.??All?rights?reserved.
connected?to?target?database:?walletdb?(DBID=1072562510)
using?target?database?control?file?instead?of?recovery?catalog
connected?to?auxiliary?database:?walletdb?(not?mounted)

RMAN>?duplicate?target?database?for?standby?dorecover?nofilenamecheck;

[oracle@wallet02?~]$?sqlplus?/?as?sysdba
SQL>?alter?database?add?standby?logfile?'/u01/app/oracle/oradata/walletdb/standby01.log'?size?50m;
SQL>?alter?database?add?standby?logfile?'/u01/app/oracle/oradata/walletdb/standby02.log'?size?50m;
SQL>?alter?database?add?standby?logfile?'/u01/app/oracle/oradata/walletdb/standby03.log'?size?50m;
SQL>?alter?database?add?standby?logfile?'/u01/app/oracle/oradata/walletdb/standby04.log'?size?50m;

SQL>?alter?database?recover?managed?standby?database?disconnect?from?session?using?current?logfile;

[oracle@wallet01?~]$?sqlplus?/?as?sysdba
SQL>?alter?system?set?log_archive_dest_state_2=enable?scope=both;
SQL>?alter?system?switch?logfile;

[oracle@wallet02?~]$?sqlplus?/?as?sysdba
SQL>?alter?database?recover?managed?standby?database?cancel;
SQL>?alter?database?open;
SQL>?alter?database?recover?managed?standby?database?disconnect?from?session?using?current?logfile;

[oracle@wallet01?~]$?sqlplus?/?as?sysdba
sql>?set?line?200
sql>?col?database_mode?for?a30
sql>?col?protection_mode?for?a30
sql>?col?recovery_mode?for?a30
sql>?select?dest_id?,?database_mode?,?recovery_mode?,?protection_mode?from?v$archive_dest_status?where?dest_id=2;
???dest_id?database_mode??????????????????recovery_mode??????????????????protection_mode
----------?------------------------------?------------------------------?------------------------------
?????????2?open_read-only?????????????????managed?real?time?apply????????maximum?performance
?????????
sql>?col?dest_name?for?a20
sql>?col?destination?for?a30
sql>?col?error?for?a50?
sql>?select?dest_id,dest_name,status,?destination,?error?from?v$archive_dest?where?dest_id<=2;
???dest_id?dest_name????????????status??????????????????????destination????????????????????error
----------?--------------------?---------------------------?------------------------------?--------------------------------------------------
?????????1?log_archive_dest_1???valid???????????????????????db_recovery_file_dest
?????????2?log_archive_dest_2???valid???????????????????????walletsdb

sql>?col?type?for?a20
sql>?select?dest_name,destination,status,type,archived_seq#,applied_seq#?from?v$archive_dest_status?where?dest_id<=2;?

dest_name????????????destination????????????????????status??????????????????????type?????????????????archived_seq#?applied_seq#
--------------------?------------------------------?---------------------------?--------------------?-------------?------------
log_archive_dest_1???db_recovery_file_dest??????????valid???????????????????????local???????????????????????????50????????????0
log_archive_dest_2???walletsdb??????????????????????valid???????????????????????physical????????????????????????50???????????49


sql>?select?thread#?,?sequence#?,?status?from?v$log;

???thread#??sequence#?status
----------?----------?------------------------------------------------
?????????1?????????49?inactive
?????????1?????????50?inactive
?????????1?????????51?current
?????????
[oracle@wallet02?~]$?sqlplus?/?as?sysdba
sql>?set?line?200
sql>?col?archived?for?a10
sql>?select?thread#?,?sequence#?,?archived?,?status?from?v$standby_log;
???thread#??sequence#?archived???status
----------?----------?----------?------------------------------
?????????1?????????51?yes????????active
?????????1??????????0?no?????????unassigned
?????????0??????????0?yes????????unassigned
?????????0??????????0?yes????????unassigned
?????????
sql>?select?process?,?status?,?thread#?,?sequence#?,?block#?,?blocks??from?v$managed_standby?where?process?!=?'ARCH';
process?????????????????????status??????????????????????????????????thread#??sequence#?????block#?????blocks
---------------------------?------------------------------------?----------?----------?----------?----------
rfs?????????????????????????idle??????????????????????????????????????????0??????????0??????????0??????????0
rfs?????????????????????????idle??????????????????????????????????????????0??????????0??????????0??????????0
rfs?????????????????????????idle??????????????????????????????????????????1?????????51???????4381??????????1
mrp0????????????????????????applying_log??????????????????????????????????1?????????51???????4381?????102400

Data?Guard?保護(hù)模式
Data?Guard?保護(hù)模式
SQL>?alter?system?set?log_archive_dest_2='SERVICE=walletsdb?LGWR?SYNC?AFFIRM?valid_for=(online_logfiles,primary_role)?db_unique_name=walletsdb'?scope=spfile;
SQL>?shutdown?immediate;
SQL>?startup?mount;
SQL>?alter?database?set?standby?database?to?maximize?availability;
SQL>?alter?database?open;
SQL>?select?DEST_ID?,?DATABASE_MODE?,?RECOVERY_MODE?,?PROTECTION_MODE?from?v$archive_dest_status?where?DEST_ID=2;
???DEST_ID?DATABASE_MODE???RECOVERY_MODE???????????PROTECTION_MODE
----------?---------------?-----------------------?--------------------
?????????2?OPEN_READ-ONLY??MANAGED?REAL?TIME?APPLY?MAXIMUM?AVAILABILITY
?????????
SQL>?alter?system?set?log_archive_dest_2='SERVICE=walletsdb?LGWR?SYNC?AFFIRM?valid_for=(online_logfiles,primary_role)?db_unique_name=walletsdb'?scope=spfile;
SQL>?shutdown?immediate;
SQL>?startup?mount;
SQL>?alter?database?set?standby?database?to?maximize?protection;
SQL>?alter?database?open;
QL>?select?DEST_ID?,?DATABASE_MODE?,?RECOVERY_MODE?,?PROTECTION_MODE?from?v$archive_dest_status?where?DEST_ID=2;
???DEST_ID?DATABASE_MODE???RECOVERY_MODE???????????PROTECTION_MODE
----------?---------------?-----------------------?--------------------
?????????2?OPEN_READ-ONLY??MANAGED?REAL?TIME?APPLY?MAXIMUM?PROTECTION
?????????
SQL>?alter?system?set?log_archive_dest_2='SERVICE=walletsdb?LGWR?ASYNC?valid_for=(online_logfiles,primary_role)?db_unique_name=walletsdb'?scope=spfile;
SQL>?shutdown?immediate;
SQL>?startup?mount;
SQL>?alter?database?set?standby?database?to?maximize?performance;
SQL>?alter?database?open;
SQL>?select?DEST_ID?,?DATABASE_MODE?,?RECOVERY_MODE?,?PROTECTION_MODE?from?v$archive_dest_status?where?DEST_ID=2;
???DEST_ID?DATABASE_MODE???RECOVERY_MODE???????????PROTECTION_MODE
----------?---------------?-----------------------?--------------------
?????????2?OPEN_READ-ONLY??MANAGED?REAL?TIME?APPLY?MAXIMUM?PERFORMANCE

Data?Guard?Switchover
原主庫(轉(zhuǎn)換為備庫)
SQL>?select?switchover_status?from?v$database;
SWITCHOVER_STATUS
--------------------
TO?STANDBY

SQL>?alter?database?commit?to?switchover?to?physical?standby?with?session?shutdown;
Database?altered.

SQL>?shutdown?immediate;
SQL>?startup?mount;
SQL>?alter?database?open?read?only;
Database?altered.
SQL>?alter?database?recover?managed?standby?database?using?current?logfile?disconnect?from?session;
Database?altered.

SQL>?select?database_role?from?v$database;
DATABASE_ROLE
----------------
PHYSICAL?STANDBY

原備庫(轉(zhuǎn)換為主庫)
SQL>?select?switchover_status?from?v$database;
SWITCHOVER_STATUS
--------------------
TO?PRIMARY

SQL>?alter?database?commit?to?switchover?to?primary;
Database?altered.

SQL>?alter?database?open;?????
Database?altered.

SQL>?select?database_role?from?v$database;
DATABASE_ROLE
----------------
PRIMARY

SQL>?select?DEST_ID?,?DATABASE_MODE?,?RECOVERY_MODE?,?PROTECTION_MODE?from?v$archive_dest_status?where?DEST_ID=2;
???DEST_ID?DATABASE_MODE???RECOVERY_MODE???????????PROTECTION_MODE
----------?---------------?-----------------------?--------------------
?????????2?OPEN_READ-ONLY??MANAGED?REAL?TIME?APPLY?MAXIMUM?PERFORMANCE

Data?Guard?Failover
開啟主庫的閃回模式
SQL>?select?name,?open_mode,?database_role,?flashback_on?from?v$database;?
NAME??????OPEN_MODE????????????DATABASE_ROLE????FLASHBACK_ON
---------?--------------------?----------------?------------------
DB01??????READ?WRITE???????????PRIMARY??????????NO

SQL>?shutdown?immediate;

SQL>?startup?mount?
SQL>?alter?database?flashback?on;
SQL>?alter?database?open;?

SQL>?select?flashback_on?from?v$database;?
FLASHBACK_ON
------------------
YES

SQL>?show?parameter?flashback?
NAME?????????????????????????????????TYPE????????VALUE
------------------------------------?-----------?------------------------------
db_flashback_retention_target????????integer?????1440

模擬主庫故障
SQL>?shutdown?abort;?

原備庫(轉(zhuǎn)換為主庫)
SQL>?alter?database?recover?managed?standby?database?cancel;?
SQL>?alter?database?recover?managed?standby?database?finish;?
SQL>?select?open_mode,?database_role?from?v$database;?
OPEN_MODE????????????DATABASE_ROLE
--------------------?----------------
READ?ONLY????????????PHYSICAL?STANDBY

SQL>?alter?database?commit?to?switchover?to?primary?with?session?shutdown;?
Database?altered.

SQL>?alter?database?open;
Database?altered.

SQL>??select?open_mode,?database_role?from?v$database;?
OPEN_MODE????????????DATABASE_ROLE
--------------------?----------------
READ?WRITE???????????PRIMARY

SQL>?select?STANDBY_BECAME_PRIMARY_SCN?from?v$database;
STANDBY_BECAME_PRIMARY_SCN
--------------------------
???????????????????1194433
???????????????????
原主庫(轉(zhuǎn)換為備庫)
SQL>?startup?mount;?

SQL>?flashback?database?to?scn?1194433;
Flashback?complete.

SQL>?alter?database?convert?to?physical?standby;
Database?altered.

SQL>?shutdown?immediate;
SQL>?startup?mount;
SQL>?select?open_mode,?database_role?from?v$database;?
OPEN_MODE????????????DATABASE_ROLE
--------------------?----------------
MOUNTED??????????????PHYSICAL?STANDBY

SQL>?alter?database?recover?managed?standby?database?using?current?logfile?disconnect?from?session;?
Database?altered.

SQL>?alter?database?recover?managed?standby?database?cancel;
SQL>?alter?database?open;?
SQL>?alter?database?recover?managed?standby?database?using?current?logfile?disconnect?from?session;?

SQL>?select?open_mode,?database_role?from?v$database;?
OPEN_MODE????????????DATABASE_ROLE
--------------------?----------------
READ?ONLY?WITH?APPLY?PHYSICAL?STANDBY

標(biāo)題名稱:【OracleDatabase】OracleDataGuard(single-single)
當(dāng)前路徑:http://m.newbst.com/article20/jegsco.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管軟件開發(fā)品牌網(wǎng)站設(shè)計(jì)網(wǎng)站收錄微信公眾號(hào)App開發(fā)

廣告

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

綿陽服務(wù)器托管