Linux Installation oracle10g Configuration Dataguard Introduction and steps
Dataguard is a high-availability database solution from Oracle, known as standby, before Oracle 8i. Officially renamed Data Guard starting with Oracle 9i. It is to ensure the synchronization of data between the primary node and the backup node through log synchronization, which can realize fast database switching and catastrophic recovery. Data guard simply sets up the database on the software and does not need to purchase any additional components. Users can synchronize the primary and standby databases with minimal impact on the primary database. The data differences between the primary and standby machines are limited to the online log section, so many enterprises are used as data disaster recovery solutions. (The above is the degree Niang explanation, I understand dataguard design for the disaster, his emergency switch can provide very good high availability, but at the same time the external service is only one pridb, so performance has not improved) this configuration for the Dataguard physical standby maximum performance mode.
1) Install and install oracle10g software on Linux operating system
PS: The main library to install the database software and build a library, only need to install the Oracle software does not need to build a library
The following main library is abbreviated as PRIDB Standby library Stydb
Linux installation oracle10g Portal: http://blog.csdn.net/w63667329/article/details/7890172
This environment:
pridb 172.25.56.149
Stydb 172.25.56.150
2) PRIDB configuration
1. Check whether the archive mode is turned on (since Dataguard high performance needs to be applied to archivelog recovery stydb, it must be turned on)
Archive Log List
If you do not need to open the database to mount mode
ALTER DATABASE archivelog;
ALTER DATABASE force logging; (Open forced archive, sometimes because the statement not logging may not generate Redolog)
Generate standby Controlfile
ALTER DATABASE create standby Controlfile as '/u01/temp/standbycontrolfile.ctl ';
2. Query Pridb The following file location
datafile (select name from V$datafile;)
redologfile (select member from V$logfile;) Controlfile (show parameter Control_files) SPFile (show parameter SPFile)
3. Close the main library shutdown immediate
4. Copy the datafile standbycontrolfile redologfile spfile listener.ora Tnsnames.ora passwdfile to the standby location (if there is no corresponding folder, New folder with the same name)scp/u01/oradata/willson/[Email protected]:/u01/oradata/
SCP standbycontrolfile.ctl [email protected]:/u01/oradata/
SCP Listener.ora Tnsnames.ora [email protected]:/u01/product/10.2.0/db_1/network/admin/
SCP Orapwwillson Spfilewillson.ora [email protected]:/u01/product/10.2.0/db_1/dbs/
scp-r willson/[email protected]:/u01/admin/
5. Configure the PRIDB role, configure the archive log address, configure the switching mode
alter system set log_archive_config= ' dg_config= (pridb,stydb) ';
alter system set Db_unique_name= ' Pridb ' scope=spfile;
shutdown immediate;
startup Mount;
alter system set log_archive_dest_1= ' Location=/u01/oradata/archivelog valid_for= (all_logfiles,all_roles) Db_unique_name=pridb ';
alter system set log_archive_dest_2= ' Service=stydb valid_for= (online_logfiles,primary_roles) db_unique_ Name=stydb ';
Alter system set log_archive_dest_state_1= ' Enable ';
alter system set log_archive_dest_state_2= ' Enable ';
alter system set fal_client= ' PRIDB ';
alter system set fal_server= ' Stydb ';
alter system set standby_archive_dest= '/u01/oradata/archivelog ';
alter system set standby_file_management= ' auto ';
6. Configuring Monitoring
[[email protected] admin]$ more listener.ora
# Listener.ora Network Configuration File:/ U01/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
Sid_list_listener =
(sid_list =
(Sid_desc =
(sid_name = Plsext Proc)
(oracle_home =/u01/product/10.2.0/db_1)
(program = Extproc)
& nbsp )
(Sid_desc =
(sid_name = willson)
&NB Sp (oracle_home = /u01/product/10.2.0/db_1)
)
)
LISTENER =
(description_list =
(DESCRIPTION =
( Address = (PROTOCOL = IPC) (KEY = EXTPROC1))
(address = (PROTOCOL = TCP) (HOST = 172.25.56.149) (PORT = 1521))
)
)
[Email protected] admin]$ Moretnsnames.ora
# Tnsnames.ora Network Configuration File:/u01/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
WILLSON =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.25.56.149) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = WILLSON)
)
)
PRIDB =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.25.56.149) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = WILLSON)
)
)
Stydb =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.25.56.150) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = WILLSON)
)
)
Extproc_connection_data =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))
)
(Connect_data =
(SID = Plsextproc)
(PRESENTATION = RO)
)
)
3) stydb configuration
1. Start the standby to Mount state (if failed to view initialization parameter files and control files are updated)
startup Mount;
2. Configure the Repository parameters
Alter system set log_archive_config= ' dg_config= (pridb,stydb) ';
Alter system set Db_unique_name= ' Stydb ' scope=spfile;
Shutdown immediate
Startup Mount
Alter system set log_archive_dest_1= ' location=/u01/oradata/archivelog valid_for= (all_logfiles,all_roles) DB_ Unique_name=stydb ';
Alter system set log_archive_dest_2= ' Service=pridb valid_for= (online_logfiles,primary_roles) Db_unique_name=pridb ';
alter system set log_archive_dest_state_1= ' Enable ';
alter system set log_archive_dest_state_2= ' Enable ';
alter system set fal_client= ' Stydb ';
alter system set fal_server= ' PRIDB ';
alter system set standby_archive_dest= '/u01/oradata/archivelog ';
alter system set standby_file_management= ' auto ';
ALTER DATABASE force logging;
Shutdown Immediate
3. Configuring Monitoring
[Email protected] admin]$ Morelistener.ora
# Listener.ora Network Configuration File:/u01/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home =/u01/product/10.2.0/db_1)
(program = Extproc)
)
(Sid_desc =
(Sid_name = WILLSON)
(Oracle_home =/u01/product/10.2.0/db_1)
)
)
LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.25.56.150) (PORT = 1521))
)
)
[Email protected] admin]$ more Tnsnames.ora
# Tnsnames.ora Network Configuration File:/u01/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
WILLSON =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.25.56.150) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = WILLSON)
)
)
PRIDB =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.25.56.149) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = WILLSON)
)
)
Stydb =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 172.25.56.150) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = WILLSON)
)
)
Extproc_connection_data =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))
)
(Connect_data =
(SID = Plsextproc)
(PRESENTATION = RO)
)
)
4) test configuration
PRIDB:
ALTER DATABASE open;
select Open_mode,database_role from V$database;
Open_mode Database_role
---------- ----------------
READ WRITE PRIMARY
Stydb
startup;
ALTER DATABASE recover managed standby database disconnect;
select Open_mode,database_role from V$database;
Open_mode Database_role
---------- ----------------
Mounted physical STANDBY
Synchronization test:
PRIDB:
Select sequence#,applied from V$archived_log;
Stydb:
select sequence#,applied from V$archived_log;
This Oracle Dataguard for Linux configuration is complete, and the Dataguard switch test has a portal: http://blog.csdn.net/w63667329/article/details/7900270
Linux Installation oracle10g configuration Dataguard Introduction and steps