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--
This article introduces the knowledge of "how to turn off DRM in Oracle RAC DRM". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
View DRM default
SQL > SELECT x.ksppinm as name, y.ksppstvl as value, y.ksppstdf as isdefault, x.ksppdesc describ FROM SYS.x$ksppi x, SYS.x$ksppcv y WHERE x.inst_id = USERENV ('Instance') AND y.inst_id = USERENV (' Instance') AND x.indx = y.indx AND x.ksppinm in ('_ gc_policy_time','_ gc_undo_affinity')
NAMEVALUEISDEFAULTDESCRIB
1_gc_undo_affinityTRUETRUEif TRUE, enable dynamic undo affinity
2_gc_policy_time10 TRUEhow often to make object policy decisions in minutes
Shutdown method: all instances need to be stopped before you can start the instance
SQL > alter system set "_ gc_policy_time" = 0 scope=spfile sid='*';SQL > alter system set "_ gc_undo_affinity" = FALSE scope=spfile sid='*'; [oracle@rac01 ~] $srvctl stop database-d cjcdb [oracle@rac01 ~] $srvctl start database-d cjcdb [oracle@rac01 ~] $srvctl status database-d cjcdb-vInstance cjcdb1 is running on node rac01. Instance status: Open.Instance cjcdb2 is running on node rac02. Instance status: Open.
View the modified value
SELECT x.ksppinm as name, y.ksppstvl as value, y.ksppstdf as isdefault, x.ksppdesc describ FROM SYS.x$ksppi x, SYS.x$ksppcv y WHERE x.inst_id = USERENV ('Instance') AND y.inst_id = USERENV (' Instance') AND x.indx = y.indx AND x.ksppinm in ('_ gc_policy_time','_ gc_undo_affinity')
NAMEVALUEISDEFAULTDESCRIB
1_gc_undo_affinityFALSEFALSEif TRUE, enable dynamic undo affinity
2_gc_policy_time0FALSEhow often to make object policy decisions in minutes
If you only want to restart one of the instances after modifying the parameters, the error ORA-01105 and ORA-01606 will be reported.
-cjcdb1
SQL > alter system set "_ gc_policy_time" = 0 scope=spfile sid='*';SQL > alter system set "_ gc_undo_affinity" = FALSE scope=spfile sid='*';SQL > shutdown immediateSQL > startupORACLE instance started.Total System Global Area 1023004672 bytesFixed Size 2259640 bytesVariable Size 704644424 bytesDatabase Buffers 310378496 bytesRedo Buffers 5722112 bytesORA-01105: mount is incompatible with mounts by other instancesORA-01606: parameter not identical to that of another mounted instance
At this point, after restarting node 2, node 1 can also be started.
-cjcdb2
SQL > shutdown immediateSQL > startup
-cjcdb1
SQL > shutdown immediateSQL > alter database mount;SQL > alter database open; [oracle@rac01 ~] $srvctl status database-d cjcdb-vInstance cjcdb1 is running on node rac01. Instance status: Open.Instance cjcdb2 is running on node rac02. Instance status: Open.
If you want to turn off the DRM of only one of the nodes, it is obviously in conflict with the principle of DRM, and this method is not feasible.
SQL > alter system set "_ gc_policy_time" = 10 scope=spfile sid='cjcdb1';SQL > alter system set "_ gc_undo_affinity" = TRUE scope=spfile sid='cjcdb1' [oracle@rac01] $srvctl stop instance-d cjcdb-I cjcdb1-o immediate [oracle@rac01 ~] $srvctl start instance-d cjcdb-I cjcdb1-o openPRCR-1013: Failed to start resource ora.cjcdb.dbPRCR-1064: Failed to start resource ora.cjcdb.db on node rac01CRS-5017: The resource action "ora.cjcdb.db start" encountered the following error: ORA-01105: mount is incompatible with mounts by other instancesORA-01606: parameter not identical to that of another mounted instance. For details refer to "(: CLSN00107:)" in "/ u01/app/11.2.0/grid/log/rac01/agent/crsd/oraagent_oracle/oraagent_oracle.log" .CRS-2674: Start of 'ora.cjcdb.db' on' rac01' failed
DRM principle
Https://blogs.oracle.com/database4cn/drm
First of all, we introduce some concepts related to DRM.
Buffer: for RAC databases, when a block of data is read into buffer cache, we call it buffer, and cache fusion manages the buffer as a resource. Master: in the world of RAC databases, every resource has a master instance, and this master instance allocates some space in the shared pool (for example, gcs resource and ges resource) to store information related to this resource, such as which instance has the latest version of the buffer, which instance has what level of lock of the buffer, and so on. Also, be responsible for maintaining the status of this resource. Next, we briefly describe the process of accessing a buffer in a RAC environment. Let's take a 4-node RAC database as an example. Note that we will only list one of the more typical situations, not all the possible scenarios, and only give a brief introduction to the steps.
Step 1: instance 3 needs to access buffer1 in X (exclusive) mode, and a request is made to master instance (1). Step 2:master instance (1) discovers that instance 2 holds buffer1 in X mode, then informs instance 2 to release X lock and sends buffer1 to instance 3. Step 3: instance 2 releases X lock and sends the latest version of buffer1 to instance 3. Step 4: instance 3 obtains the buffer1 and informs the master instance (1) to update the latest status of the resource buffer1.
From the above steps, it is not difficult to see that when we access a buffer in the RAC database, up to three instances will participate, the master instance, the holder instance and the requestor instance. Two kinds of data transfers will occur, message: for information transmission related to lock, and data: for transmitting buffer. At the same time, according to the above steps, we will naturally think that if master and requestor are on the same instance, then the transmission of message between instances can be reduced and the code path (code path) accessed will be shorter, thus improving performance, but when each buffer is read to buffer cache, the selection of master nodes is random. Based on this consideration, oracle introduced a new feature, DRM (Dynamic Resource management), starting with 10g.
The main function of DRM is to determine which instance the corresponding buffer of the database object should be mastering to according to the number and mode of access to a database object (10gR1 is in data files) for each instance over a period of time (default is 10 minutes). Within a specified period of time, if an instance accesses a database object a certain number of times than other instances (default is 50 times), oracle will transfer the master information of all the buffer of this object to the corresponding instance (note: not transfer buffer). Of course, the process of transfer is gradual. When oracle decides to locate a master instance of buffer to a local instance, affinity lock is added to the buffer for quick access. This is also the origin of object affinity that we often talk about.
Next, we introduce the basic steps of DRM.
1. Oracle stops all operations on the buffer where remastering is required. Note: DRM is progressive, that is, remastering a portion of the buffer in windows units at a time. 2. Lmon notifies all instances to prepare for remastering3. Clear the master information of the corresponding buffer in the old master instance. 4. Pass the master information to the new master instance 5. Build the latest state of resources in the new master instance 6. End and release all the resources occupied by all previous steps.
Then, we briefly introduce some parameters related to DRM.
_ gc_policy_time: unit in minutes, which controls the interval between DRM and the number of buffer accesses by instances. Default is 10 minutes.
_ gc_affinity_ratio: controls the minimum ratio (threshold) required for remastering. The default is 50. That is, if an instance is within 10 minutes (_ gc_policy_time) and a database object is accessed 50 times more than all other instances (note: 50 times, not 50 times), remastering the buffer of that database object.
Note: please do not change the values of the above parameters unless you know exactly what you are doing or on the advice of the oracle engineer.
Finally, if you encounter problems related to DRM, it is recommended that you review the following information.
1. The trace file of the Lmon,lmd,lms and diag processes to confirm which step of the DRM the problem occurred and the state of the lms,lmon,lmd process. 2. AWR and ASH report, confirm that those waiting events have lasted for a long time, as well as the status of lmon,lms and lmd. 3. Refer to note 1492990.1 to get the output of the DMR diagnostic script. This is the end of how to turn off DRM in Oracle RAC DRM. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.