In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to build ADG, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!
1. Configure listening on the master and slave database:
Listener.ora should be changed in both master and slave. The port had better not be 1521, but another port, such as 1522, is equipped with static monitoring. The service name of the master library is called p, and the slave library is called s.
Then change the tnsnames.ora on the main library, match the alias of 1522 s and the alias of p, and copy the tnsnames.ora to the standby library.
two。 Copy the main library password file to standby library 3. Copy the environment variables of the master database to the slave database:
That is, every time what $ORACLE_HOME these, mainly to save trouble, copy to the reserve database and change it can be used.
4. Complete and back up the control files and copy them to the standby library
Rman target /
Backup database format'/ home/oracle/bak/%d_%U.full'
Backup current controlfile for standby format'/ home/oracle/dg.ctl'
Exit
Then put these things on the repository, such as copying to / home/oracle/yan on the repository.
5. Configuration parameter file
On the main library: create pfile='/home/oracle/initdg.ora' from spfile; (do not create pfile from spfile in the cluster environment, the pfile on the node will be covered. The contents of the pfile on the node record or point to the spfile on the asm)
Then copy the initdg.ora to the slave database, modify it, and mainly add the following parameters:
Db_unique_name=s
Log_archive_config='dg_config= (pmaine's)'(if the master has the same preparation, he has to match it)
Log_archive_dest_1='location=use_db_recovery_file_dest valid_for= (all_logfiles,all_roles) db_unique_name=s' (if FRA is used in the archive log path of master and slave libraries, this is the case)
Fal_server='p'
Fal_client='s' (with these two, you don't have to deal with gap manually, not absolutely!)
Log_archive_dest_2='service=p lgwr async valid_for= (online_logfiles,primary_role) db_unique_name=p'
Log_archive_dest_state_2=enable
Standby_file_management='AUTO' (automatically adds and deletes data files with the main library)
* .undo_tablespace='UNDOTBS1'
Db_create_file_dest='' (this is a good match if you are going to use omf)
Db_file_name_convert=' (), ()'
Log_file_name_convert=' (), ()'(if you don't use OMF, use this, a pair in parentheses)
If this is not written in the parameter file, and the path of the data file of the standby database is not the same as that of the main library, use set new name for... in rman.
And then
Startup nomount pfile='/home/oracle/initdg.ora'
Create spfile='+data/' from pfile='/home/oracle/initdg.ora'; (if you want to do a dg cluster, you must specify the path to pfile here. You cannot write pfile directly)
Shutdown
Startup nomount
6. Restore control files, restore database
Rman target /
Restore controlfile from'/ home/oracle/yan/dg.ctl'
Alter database mount
Catalog start with'/ home/oracle/yan'; (here, you don't have to do this if you put the backup under the same path as the main library, so that the control file can identify the new backup path)
Resotre database; (restore is enough)
Exit
7. Add standby log
Select max (sequence#), name,applied from vested archived log; is also fine
Anyway, we just wait to catch up, and then:
Recover managed standby database cancel
Alter database open
Recover managed standby database using current logfile disconnect
This starts to adg, 12c also needs:
Alter pluggable database all open
The above is all the contents of the article "how to build ADG". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.