[Dg] RMAN to create maximum availability datagard

RMAN create maximum availability datagard

Main library db_name is testdb, the primary library is not provided db_unique_name, master repository data and online log path / orasoft / ora11g / oradata / testdb, prepared by the library data file path / orasoft / ora11g / data, online path / orasoft / ora11g / log, the master archive logs are prepared path / orasoft / ora11g / archivelog

1. Copy the master password file to the backup database library

2. Make sure the main library force_logging values ​​are yes and log_mod value archivelog

alter database archivelog;

alter database force logging;

select name,log_mode,force_logging from v$database

Configuration files standby same tns

testdb =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.98.7.41)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = TESTDB)

     )

  )

 

testdg =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.98.7.39)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = slave)

    )

  )

4. Create a pfile main library file for use by the library

create pfile='/orasoft/pfile.ora' from spfile;

The primary library to perform full backups rman

backup database format '/orasoft/full_%U.bak';

6. Main Library rman backup standby control file

backup current controlfile for standby format '/orasoft/control_%U';

7. The main library created pfile parameter file and the control file backup and backup data files to a backup copy of the library, put the backup equipment inventory master file path and libraries, are / orasoft

8. Preparation of library of modified pfile copied file, add the following several

*.db_unique_name='slave'

*.log_archive_config='DG_CONFIG=(testdb,slave)'

*.log_archive_dest_1='location=/orasoft/ora11g/archivelog'

*.remote_login_passwordfile='EXCLUSIVE'

*.fal_client='testdg'

*.fal_server='testdb'

*.db_file_name_convert='/orasoft/ora11g/oradata/testdb','/orasoft/ora11g/data'

*.log_file_name_convert='/orasoft/ora11g/oradata/testdb','/orasoft/ora11g/log'

*.STANDBY_FILE_MANAGEMENT='AUTO'

9. The library prepared by the modified pfile starting state to nomount

startup  nomount pfile='/orasoft/pfile.ora'

10. Preparation of library rman recovery standby controlfile

restore standby controlfile from '/orasoft/control_09ps9sla_1_1';

11. Preparation of state started to mount library

alter database mount;

12. Preparation of library data file restore rman

restore database;

13. The standby database to create standby redo log

First, in the main database query how many groups redo log, redo log groups have N N + 1 group on the establishment of standby log, redo log much, standby log also establish how much

alter database add standby logfile group 4 '/orasoft/ora11g/log/standby_redo04.log' size 50M,group 5 '/orasoft/ora11g/log/standby_redo05.log' size 50M,group 6 '/orasoft/ora11g/log/standby_redo06.log' size 50M,group 7 '/orasoft/ora11g/log/standby_redo07.log' size 50M;

14. The parameter adjustment main library

alter system set log_archive_dest_2='service=testdg lgwr sync affirm valid_for=(online_logfiles,primary_role) db_unique_name=slave'

alter system set log_archive_config='dg_config=(testdb,slave)'

15. Preparation of library sequentially perform the following operations

select sequence #, applied from v $ archived_log; archive logs to see if the transmission came over the main library

alter database recover managed standby database disconnect from session; archive log application

alter database recover managed standby database cancel;

alter database open read only;

alter database recover managed standby database disconnect from session;

16. The standby database to perform create spfile from pfile // library equipment, although read only, but you can also create

17. The main library adjusted to the maximum available mode, perform the following sequence

alter database set standby database to maximize availability; // After application of the pool of archived logs are also automatically become maximize availability, downtime pool of the main library or maximize availability status

shutdown immediate

startup

18. Preparation of libraries to perform the sequence

alter database recover managed standby database cancel;

alter database recover managed standby database disconnect from session;

alter database recover managed standby database cancel;

alter database recover managed standby database using current logfile disconnect from session;

 

Guess you like

Origin blog.csdn.net/viviliving/article/details/91868062