Windows XP Pro + Oracle 10.0.1.0.2oracle_sid:dgtestoracle_home:d:\oracle\product\10.1.0\db_1
Configuration steps First, install Oracle on Primary and standby, build SIDs as dgtest libraries, and all settings are identical. Then stop Oracle on the shutdown two, and copy all the data files, control files, redo files, and password files on the primary to the corresponding location in the standby machine. (You can also use hot standby, Rman, etc. to create the initial standby library) so that we have two identical Oracle servers
1. Set up Force Loggingsql>alter database force logging on primary database;
2. Modify the initialization parameters of the primary databse db_unique_name= ' primary ' control_files= ' d:\oracle\product\oradata\control01.ctl ', ' d:\ Oracle\product\oradata\control02.ctl ', ' d:\oracle\product\oradata\control03.ctl ' log_archive_dest_1= ' location= D : \oracle\product\arch ' log_archive_dest_2= ' Service=standby ' log_archive_dest_state_1=enablelog_archive_dest_ state_2=enableremote_login_passwordfile=exclusivelog_archive_format= ' Arc%s%t%r.arc ' FAL_SERVER=standbyFAL_ Client=primarystandby_file_management=autolock_name_space----This is to set this argument when the primary and standby data are on the same machine, set to the SID of the standby database
3. Set primary database as Archivelog mode sql>shutdown immediate; Sql>startup Mount; Sql>alter database Archivelog; Sql>alter Database open:
4. Create the control file of standby database on primary database Sql>shutdown Immedaite; Sql>startup Mount; Sql>alter Database Create standby controlfile as ' D:\oracle\product\oradata\controlstandby.ctl ' Sql>alter Database open, and then copy the Controlfile to the corresponding location in standby server
Remote_login_passwordfile=exclusivefal_server=primaryfal_client=standbystandby_file_management=autodb_file_ Name_convert----Use Log_file_name_convert when the data file paths for primary and standby are inconsistent----use primary when the data file paths for standby and lock_name_ are inconsistent Space----The SID of the standby database when the primary and standby data are on the same computer
Refer to the Oracle online documentation for a description of the specific parameters
9. Launch standby database to recover manage mode Sql>alter database recover managed standby database disconnect from session;
Switchover
On the primary.
1. The value of Sql>select switchover_status from V$database Switchover_status is to standby, which can be directly switchover if sessions active , you need to add the with session shutdown after the switchover command
2. Sql>alter database commits to switchover to physical standby;
3. SQL>SHUTDOWM immediate;
4. Sql>startup Mount;
On the standby.
1. sql> Select Switchover_status from V$database
Switchover_status value is to primary, can be directly switchover, if it is sessions active, you need to switchover after the command Plus with the session shutdown
2. Sql>alter database commits to switchover to primary;
3. Sql>shutdown immediate;
4. sql>startup;
To successfully implement switchover, it is a good idea to set some initialization parameters for both primary and standby at the same time on each server, although some of these parameters only work on one of primary or standby
1. The log could not transmit sql>select dest_name,status,error from V$archive_dest; Check that the status of the appropriate archive path is valid, otherwise it will be handled according to the error information
2. Cannot use ALTER DATABASE rename data file on standby, the following actions are not allowed for ALTER DATABASE renamealter when setting standby_file_management as Auto: Databa SE add/drop logfilealter database add/drop standby logfile memberalter database create datafile as
3. Switchover failed Sql>alter database commit to switchover to physical Standbyora-01093:alter database close only Perm Itted with no session connected view the activity that caused the error sessionsql> select Sid,process,program from v$session where type= ' USER ' and sid<> (select distinct SID from V$mystat), disconnect the session, or use the following command to do Switchoversql>lter database commit to Switchover to physical standby and session shutdown;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.