Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use RMAN to replicate database active database

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to use RMAN to copy database active database". In daily operation, I believe many people have doubts about how to use RMAN to copy database active database. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to use RMAN to copy database active database". Next, please follow the editor to study!

Preface

RMAN can directly copy a running database to a new database with Oracle software installed. The following mainly describes the corresponding configuration process

Preparatory work:

The running source database (SOURCE) for replication.

Only the database with Oracle software installed (DESTINATION), which is not created by dbca.

SOURCE database must have ARCHIVE LOG mode turned on.

SOURCE database opens listener

Installation configuration process: SOURCE database configuration:

Configure the tnsnames.ora file

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 = (PROTOCOL = TCP) (HOST = 10.3.0.70) (PORT = 1521)) (CONNECT_DATA = (ORACLE_SID = DB11G) DESTINATION database configuration

DB_NAME and SID are consistent with SOURCE database

Create an init$DB_NAME.ora file under $ORACLE_HOME/dbs/ with only one line written in it:

DB_NAME=$SOURCE_DB_NAME

Configure tnsnames.ora and listener.ora to realize the interconnection between SOURCE and DESTINATION. After the configuration is completed, lsnrctl reload is executed, and the configuration takes effect.

$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 = (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 = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.3.0.70) (PORT = 1521) (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521) ADR_BASE_LISTENER = / u01/app/oracle

Create the corresponding directory, which is consistent with the SOURCE database (under oracle account)

Mkdir-p / u01/app/oracle/oradata/$DB_NAMEmkdir-p / u01/app/oracle/fast_recovery_area

Startup nomount

Rman target sys/password @ DB11G-SOURCE auxiliary sys/password @ DB11G-DESTINATION

Run the following command in RMAN

DUPLICATE DATABASE TO DB11G FROM ACTIVE DATABASE SPFILE NOFILENAMECHECK; at this point, the study on "how to use RMAN to replicate database active database" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report