I configured data guard when I had never been familiar with Oracle before. Paid download a detailed configuration document for data guard 11g in Windows (requires a mailbox), but many of the parameters must be modified according to their own environment, this is quite difficult for a newbie. After 8 days of configuration, we finally achieved initial success. Now we will share with you some of the problems we may encounter during the configuration process.
The following sections describe Synchronization Based on the Configuration documentation.
Document 2: "When installing Oracle, the master database installs the database, and only the software is installed from the slave database.
The installation path is drive D. The default path is drive D: \ app \ Administrator \.
Instance name orcl
Put the data file in the D: \ data \ orcl folder, archive the log in the D: \ arch_log folder, online log
Default location"
Oracl is the default Instance name after the Oracle database is installed. in Oracle, each instance name corresponds to a database. I used the Database Configuration assistant tool that comes with Oracle to create another instance (which is the same as the database) named TT.
Run sqlplus on the master database for configuration, start -- run -- cmd
Sqlplus/As sysdba; this command means only connecting to the instance does not start the database.
Sqlplus/nolog; Conn sys/123 @ TT as sysdba; this command connects to the specified database
The command for viewing archived logs is:
Select name from V $ archived_log;
The command for setting the archive log path is:
Alter system set log_archive_dest_1 = 'location = D: \ arch_log mandatory 'scope = both;
3.4 create a parameter file
Create pfile = 'd: \ initora. ora 'from spfile;
3.5 edit the parameter file
Drag the cursor to the end. Add the following content and save :........
If you add parameters according to this step, it cannot be started. The configuration of my initora. ora file is as follows:
TT. _ db_cache_size = 322961408
TT. _ java_pool_size = 4194304
TT. _ large_pool_size = 4194304
TT. _ oracle_base = 'd: \ app \ Administrator '# oracle_base set from Environment
TT. _ pga_aggregate_target = 322961408
TT. _ sga_target = 482344960
TT. _ shared_io_pool_size = 0
TT. _ shared_pool_size = 142606336
TT. _ streams_pool_size = 0
*. Archive_lag_target = 1800
*. Audit_file_dest = 'd: \ app \ Administrator \ admin \ TT \ adump'
*. Audit_trail = 'db'
*. Compatible = '11. 2.0.0.0'
*. Control_files = 'd: \ app \ Administrator \ oradata \ TT \ control01.ctl ', 'd: \ app \ Administrator \ flash_recovery_area \ TT \ control02.ctl'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_file_name_convert = 'd: \ data \ orcl \ ', 'd: \ data \ orcl \'
*. Db_name = 'TT'
*. Db_recovery_file_dest = 'd: \ app \ Administrator \ flash_recovery_area'
*. Db_recovery_file_dest_size = 4039114752
*. Db_unique_name = 'TT'
*. Diagnostic_dest = 'd: \ app \ Administrator'
*. Dispatchers = '(Protocol = TCP) (Service = ttxdb )'
*. Fal_client = 'primary'
*. Fal_server = 'standby'
*. Log_archive_config = 'dg _ Config = (TT, standby )'
*. Log_archive_dest_1 = 'location = D: \ arch_log'
*. Log_archive_dest_2 = 'service = standby lgwr async valid_for = (online_logfiles, primary_role)
Db_unique_name = standby'
*. Log_archive_dest_state_1 = 'enable'
*. Log_archive_dest_state_2 = 'enable'
*. Log_archive_format = '% T _ % S _ % R. arc'
*. Log_file_name_convert = 'd: \ data \ orcl \ ', 'd: \ data \ orcl \'
*. Memory_target = 804257792
*. Nls_language = 'simplified Chinese'
*. Nls_territory = 'China'
*. Open_cursors = 300
*. Processses = 150
*. Remote_login_passwordfile = 'clusive'
*. Standby_file_management = 'auto'
*. Undo_tablespace = 'undotbs1'
Note: Some commands are entered in SQL, and some are in the root directory. You can create a new cmd to run the command. If you run the command in the same command window, the database may be closed.
3.8 configure the master database network listener (the same is true for the slave database)
Modify the listener. ora file with the following content:
Listener. ora network configuration file: C: \ oracle \ product \ 10.2.0 \ db_1 \ Network \ admin \ listener. ora
# Generated by Oracle configuration tools.
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = clrextproc)
(ORACLE_HOME = D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1)
(Program = EXTPROC)
(Envs = "extproc_dlls = only: D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ bin \ lrlr11.dll ")
)
(Sid_desc =
(Global_dbname = TT)
(ORACLE_HOME = D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1)
(Sid_name = TT)
)
)
Listener =
(Description_list =
(Description =
(Address = (Protocol = IPC) (Key = extproc1 ))
(Address = (Protocol = TCP) (host = 192.168.1.166) (Port = 1521 ))
)
)
Modify the tnsnames. ora file with the following content:
# Tnsnames. ora network configuration file: D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ Network \ admin \ tnsnames. ora
# Generated by Oracle configuration tools.
Primary =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.1.166) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = TT)
)
)
Standby =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.1.121) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = TT)
)
)
Extproc_connection_data =
(Description =
(Address_list =
(Address = (Protocol = IPC) (Key = extproc1 ))
)
(CONNECT_DATA =
(SID = plsextproc)
(Presentation = Ro)
)
)
Tt =
(Description =
(Address = (Protocol = TCP) (host = 192.168.1.166) (Port = 1521 ))
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME = TT)
)
)
3.12 create an instance in the standby Database
The instance name must be consistent with that of the master database.
Oradim-New-Sid TT
3.14 backup database parameter file
Add new system variables to the slave database. variable name: oracle_sid variable value: TT
Note: TT indicates the Instance name.
This step is not performed in the original text, resulting in startup errors.
3.15.3 copy a database
RMAN> connect auxiliary sys/sys @ standby
This operation means to connect to the slave database. If there is a problem, open the command window and enter tnsping 192.168.1.121.
The IP address is the slave database IP address.
If the connection fails, restart oracleoradb11g_hometnslistener in the service on the slave database.