您好,登錄后才能下訂單哦!
這篇文章主要介紹“怎么使用RMAN復(fù)制數(shù)據(jù)庫active database”,在日常操作中,相信很多人在怎么使用RMAN復(fù)制數(shù)據(jù)庫active database問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”怎么使用RMAN復(fù)制數(shù)據(jù)庫active database”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習吧!
RMAN 可以直接復(fù)制一臺正在運行的數(shù)據(jù)庫到新的安裝了Oracle軟件的數(shù)據(jù)庫上。下面主要介紹相應(yīng)的配置過程
正在運行的源數(shù)據(jù)庫(SOURCE),用于進行復(fù)制。
僅安裝有Oracle軟件的數(shù)據(jù)庫(DESTINATION),此數(shù)據(jù)庫不用dbca進行數(shù)據(jù)庫創(chuàng)建。
SOURCE數(shù)據(jù)庫必須開啟ARCHIVE LOG 模式。
SOURCE數(shù)據(jù)庫打開listener
配置tnsnames.ora文件
DB11G-SOURCE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.3.0.60)(PORT = 1521)) ) (CONNECT_DATA = (ORACLE_SID = DB11G) ) ) DB11G-DESTINATION = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.3.0.70)(PORT = 1521)) ) (CONNECT_DATA = (ORACLE_SID = DB11G) ) )
DB_NAME和SID與SOURCE數(shù)據(jù)庫保持一致
在$ORACLE_HOME/dbs/下創(chuàng)建init$DB_NAME.ora文件,里面只寫一行:
DB_NAME=$SOURCE_DB_NAME
配置tnsnames.ora和listener.ora,用于實現(xiàn)SOURCE和DESTINATION的互聯(lián)互通,配置完成后執(zhí)行l(wèi)snrctl reload,生效配置
$ORACLE_HOME/network/admin/tnsnames.ora
DB11G-SOURCE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.3.0.60)(PORT = 1521)) ) (CONNECT_DATA = (ORACLE_SID = DB11G) ) ) DB11G-DESTINATION = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.3.0.70)(PORT = 1521)) ) (CONNECT_DATA = (ORACLE_SID = DB11G) ) )
$ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = DB11G) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1) (SID_NAME = DB11G) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.3.0.70)(PORT = 1521)) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) ADR_BASE_LISTENER = /u01/app/oracle
創(chuàng)建相應(yīng)目錄,與SOURCE數(shù)據(jù)庫保持一致(oracle賬戶下)
mkdir -p /u01/app/oracle/oradata/$DB_NAME mkdir -p /u01/app/oracle/fast_recovery_area
startup nomount
rman target sys/password @DB11G -SOURCE auxiliary sys/password @DB11G -DESTINATION
在RMAN中運行如下命令
DUPLICATE DATABASE TO DB11G FROM ACTIVE DATABASE SPFILE NOFILENAMECHECK;
到此,關(guān)于“怎么使用RMAN復(fù)制數(shù)據(jù)庫active database”的學(xué)習就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學(xué)習,快去試試吧!若想繼續(xù)學(xué)習更多相關(guān)知識,請繼續(xù)關(guān)注億速云網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。