OraclePolicy-ManagedCluster-GrowforDBaaS

Source: Internet
Author: User
Policy-ManagedCluster is introduced in Oracle11gR2. When dbca is used in Oracle12c to create a RAC database, the Policy-Managed option has become the default value. So what is the Policy-Managed cluster and database? What is the difference from the previous Admin-Managed method? Which environment is suitable for this new method?

Policy-Managed Cluster is introduced in Oracle 11gR2. When dbca is used in Oracle 12c to create a RAC database, the Policy-Managed option has become the default value. So what is the Policy-Managed cluster and database? What is the difference from the previous Admin-Managed method? Which environment is suitable for this new method?

Policy-Managed Cluster is introduced in Oracle 11gR2. When dbca is used in Oracle 12c to create a RAC database, the Policy-Managed option has become the default value.

So what is the Policy-Managed cluster and database? What is the difference from the previous Admin-Managed method? Which environment is suitable for managing in this new way? This article attempts to answer these questions and make a simple test.

What is the Policy-Managed method?

Policy-based management is based on Server Pools. Simply put, some Server Pools are defined first, and the pool contains a certain number of servers, then define some policies. Based on these policies, Oracle automatically determines how many database instances are running on several machines in the pool. The database instance name suffix, the number of database instances, and the running host are determined by the policy, rather than the database administrator's prefix.

What is the difference between Admin-Managed and Admin-Managed?

In fact, the above statement clearly states the difference between Policy-Managed and Admin-Managed methods. Let's review the methods we used to create a RAC database, on the dbca interface, we choose to run database instances on several machines in the cluster, or two or three, or even more, however, as long as you select several machines during installation, if you do not add or remove nodes in the future, they will always run on these machines. In addition, database instances on each host are automatically named dbname1 to dbname according to the sort of host names.N. These will not automatically change after the Administrator installs them. This is the Admin-Managed method.

Which environment is suitable for managing in this new way?

When managing a large number of Server Clusters and running a variety of RAC databases with different importance and policies in these clusters, we recommend that you use the Policy-Managed method to simplify management, in fact, we recommend that you use Policy-Managed to manage the entire database cluster only when there are more than three servers in Oracle. Imagine the effect of using Policy-Managed: If we have 10 servers, we can define the key degree of the server pool based on the importance of different applications, then, when some of the machines are accidentally shut down, enough machines can be automatically maintained to provide database services to important systems, this minimizes the number of non-critical system database servers.

So what does the Policy-Managed method look like?

After the Oracle 12c RAC database is installed by default, it is found that the database instance is always started on only one node. Check the server pool configuration.

[oracle@dbserver2 ~]$ srvctl config srvpoolServer pool name: FreeImportance: 0, Min: 0, Max: -1Category:Candidate server names:Server pool name: GenericImportance: 0, Min: 0, Max: -1Category:Candidate server names:Server pool name: orcl_poolImportance: 0, Min: 0, Max: 1Category: hubCandidate server names:

The Free pool and Generic pool exist by default. The orcl_pool pool is defined by us when dbca creates a database. Min: 0, Max: 1 indicates that at least 0 machines are allowed in the pool, and at most one machine is allowed to be used. This also causes the database instances using this server pool to always start on only one node, even if this is a RAC database in our initial definition.

The current database instance is started in node 2. Compare the server usage of Node 1 and node 2.

[Grid @ dbserver2 ~] $ Crsctl status server dbserver1-fNAME = bandwidth = 3954CPU_COUNT = bandwidth = 2CPU_HYPERTHREADING = bandwidth = 1000 DEPLOYMENT = bandwidth = servers = 1SERVER_LABEL = PHYSICAL_HOSTNAME = STATE = ONLINEACTIVE_POOLS = Free -- show not Free here, node 1 does not belong to any running server pool resources. STATE_DETAILS = ACTIVE_CSS_ROLE = hub [grid @ dbserver2 ~] $ Crsctl status server dbserver2-fNAME = dbserver2MEMORY_SIZE = 3954CPU_COUNT = bandwidth = 2CPU_HYPERTHREADING = bandwidth = 1000 DEPLOYMENT = rack = 1SERVER_LABEL = PHYSICAL_HOSTNAME = STATE = ONLINEACTIVE_POOLS = ora. orcl_pool -- this shows that node 2 is running in the orcl_pool server pool resource. STATE_DETAILS = ACTIVE_CSS_ROLE = hub

Next we need to modify the configuration so that the RAC database can be started on multiple nodes in a well-known manner. -Modify the minimum number of machines running in the orcl_pool pool, and the maximum number of machines running is 2. Do you still remember the degree of importance we mentioned above? Importance indicates the degree of priority of the pool. A greater number indicates a higher degree of priority. A higher priority is considered to meet the Min condition.

[oracle@dbserver2 ~]$ srvctl modify srvpool -serverpool orcl_pool -importance 5 -min 1 -max 2

-Re-check the server pool information. You can see that the modification was successful. Min: 1, Max: 2

[oracle@dbserver2 ~]$ srvctl config srvpoolServer pool name: FreeImportance: 0, Min: 0, Max: -1Category:Candidate server names:Server pool name: GenericImportance: 0, Min: 0, Max: -1Category:Candidate server names:Server pool name: orcl_poolImportance: 5, Min: 1, Max: 2Category: hubCandidate server names:

-Check the status of the current server pool. The active servers in the orcl_pool pool include Node 1 and node 2.

[grid@dbserver1 ~]$ crsctl status serverpoolNAME=FreeACTIVE_SERVERS=NAME=GenericACTIVE_SERVERS=NAME=ora.orcl_poolACTIVE_SERVERS=dbserver1 dbserver2

After the modification is completed, the database instance in node 1 will be automatically started. We can use the crsctl command to view the server status, where the STATE_DETAILS field shows that the resource is being started, this field is displayed as blank after normal start.

[grid@dbserver2 ~]$ crsctl status server dbserver1 -fNAME=dbserver1MEMORY_SIZE=3954CPU_COUNT=1CPU_CLOCK_RATE=2CPU_HYPERTHREADING=0CPU_EQUIVALENCY=1000DEPLOYMENT=otherCONFIGURED_CSS_ROLE=hubRESOURCE_USE_ENABLED=1SERVER_LABEL=PHYSICAL_HOSTNAME=STATE=ONLINEACTIVE_POOLS=ora.orcl_poolSTATE_DETAILS=STARTING RESOURCESACTIVE_CSS_ROLE=hub

Now there is an embarrassing situation (for our previous knowledge about managing RAC). Because the instance in dbserver1 is started later, the Instance name suffix is 2, in dbserver2, the Instance name suffix is 1. In fact, in the Policy-Managed RAC environment, you do not need to worry about which instance is started on which machine, what we need is to access the database through the scan ip address and the Service name, instead of accessing the database through the Instance name. However, to test the function, I decided to set 1 to 2 and 2 to 2. Have I said that I am a perfectionist?

-- First, reolocate the database service resource on dbserver1 to dbserver2, so that instance 2 runs back to dbserver2. [Grid @ dbserver1 ~] $ Crsctl relocate resource ora. orcl12c. db-s dbserver1-n dbserver2 -- start the instance in dbserver1, because instance 2 has been started in dbserver2, so even if the instance is started later, but it will still be named instance 1. [Oracle @ dbserver1 ~] $ Srvctl start instance-db orcl12c-node dbserver1

Finally, the RAC database is changed back to the default status where only one instance is started.

[oracle@dbserver2 ~] srvctl modify srvpool -serverpool orcl_pool -min 0 -max 1

In the future, no matter on which machine the database is started, the database instance name will always be dbname_1 (note that there is an underline here, which is the naming rule for Policy-Managed database instances ). However, we should not specify the Instance name when accessing the database. For example:

sqlplus sys/passwd@db-cluster-scan:1521/orcl12c as sysdba

Because now you don't need to worry about the machine on which the instance is started, and there is a resource pool behind it. Are you familiar with this statement? Yes, that's right, Cloud! We also post the red-to-purple word Cloud, which is one of the components of the Oracle private Cloud solution.

Share/Save

Related posts:

  1. How to change VIP interface in 10g cluster
  2. How to identify the cluster name
  3. How to change private interface in 10g cluster

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.