You support a three-instance, policy-managed, multitenant RAC database CDB1 with two PDBs PDB_1 and PDB_2.
It runs on an eight-node cluster and a serverpool prod_pool has three servers.
Examine these commands executed on HOST01:
$ srvctl add service –db CDB1 –pdb PDB_1 –service HR –serverpool prod_pool
$ srvctl start service –db CDB1 –service HR
$ srvctl stop service –db CDB1 –service HR
Which two statements are true?
A.
HR is uniformly managed across all instances in prod_pool.
B.
srvctl stop service only closes PDB_1 in the instance on HOST01.
C.
srvctl stop service closes PDB_1 on all CDB1 instances.
D.
srvctl stop service prevents logins for HR only to CDB1 on HOST01.
E.
srvctl stop service prevents logins to any instance of CDB1 using service HR.
F.
HR is available on a single instance of prod_pool.
Explanation:
Hi,
Should not be A and E?
srvctl add service –db CDB1 –pdb PDB_1 –service HR –serverpool prod_pool : don’t we have a uniform service as singleton is not specified?
srvctl stop service –db CDB1 –service HR : for me stop service will stop services on all instances.
Can you help ?
Regards
The correct answer is: A & C
You manage PDBs in an Oracle RAC-based CDB by managing services, regardless of whether the PDBs are policy managed or administrator managed. Assign one dynamic database service to each PDB to coordinate start, stop, and placement of PDBs across instances in a clustered container database.
For example, if you have a CDB called raccont with a policy-managed PDB called spark, which is in a server pool called prod, then assign a service called plug to this database using the following command:
srvctl add service -db raccont -pdb spark -service plug -serverpool prod
The service plug will be uniformly managed across all nodes in the server pool. If you want to have this service running as a singleton service in the same server pool, use the -cardinality singleton parameter with the preceding command.
— Assume a PDB called raccont with a policy-managed PDB called spark in a server pool called prod:
• To start and stop the PDB:
$ srvctl start service -db raccont -service plug
$ srvctl stop service -db raccont -service plug
Another example:
$ srvctl stop service -d cdbl -service mypdblserv
$ srvctl status service -d cdbl -service mypdblserv
Service mypdblserv is not running.
$ srvctl start service -d cdbl -service mypdb1serv
$ srvctl status service -d cdbl -service mypdblserv
Service mypdblserv is running on nodes: host03,host02,host0l
But we can have multiples services running on a PDB, stopping a service will not stop the PDB
https://docs.oracle.com/database/121/RACAD/srvctladmin.htm#RACAD7881
So I think is A and E
The service was stopped, no way to be used to connect (“…using service HR”)! Secondly, nowhere was it said that there were multiple services, that’s a simple deduction from you. Third, the text and examples above were taken from the Oracle RAC course workbook.
And…
To update the preferred and available lists of an existing service:
srvctl add service -db db_unique_name -service service_name
-update {-prefered preferred_list | -available available_list} [-force]
[-verbose]
Parameter Description
-db db_unique_name Unique name for the database.
-service service_name The service_name.service_domain should be unique within the cluster unless you want to spread connections across multiple databases that offer the same service. If you do not specify the service domain as part of the service name (such
as sales.example.com), then the DB_DOMAIN database attribute is appended to the service
name.
…
OK! It was a failure of mine, really, the services are automate the PDB startup and not its shutdown (or close)…
You’re right! The correct answer is “A” and “E”
I think A and E
srvctl stop service > Stops the service only but the pdb remains open until you issue alter pluggable database pdb_name close [immediate];
Thus B and C are out
The stop service command stops the service on the entire cluster hence D and F are out
I do not know!
The RAC Course material says/teaches:
Administering an Oracle RAC-based multitenant container database (CDB) is somewhat
similar to administering a non-CDB. The differences are only that some administrative tasks
apply to the entire CDB, some apply only to the root, and some apply to specific pluggable
databases (PDB5). Administering a PDB involves a small subset of the tasks required to
administer a non-CDB. In this subset of tasks, most are the same for a PDB and a non-CDB.
There are some differences, however, such as when you modify the open mode of a PDB.
Also, a PDB administrator is limited to managing a single PDB and is not affected by other
PDBs in the CDB.
You manage PDBs in an Oracle RAC-based CDB by managing services, regardless o
whether the PDBs are policy managed or administrator managed. Assign one dynamic
database service to each PDB to coordinate start, stop, and placement of PDBs across
instances in a clustered container database.
For example, if you have a CDB called raccont with a policy-managed PDB called spark,
which is in a server pool called prod, then assign a service called plug to this database using the following command:
srvctl add service —db raccont —pdb spark —service plug —serverpool prod
The service plug will be uniformly managed across all nodes in the server pool. If you want to have this service running as a singleton service in the same server pool, use the
-cardinality singleton parameterwith the preceding command.
To start the PDB spark, you must start the respective service, plug, as follow
srvctl start service -db raccont -service plug
***To stop the PDB spark***, you must ***stop the respective service, plug***, as follows:
srvctl stop service -db raccont -service plug
You can check the status of the database using the srvctl status service command.
Because PDBs are managed using dynamic database services, typical Oracle RAC-based
management practices apply. So, if the service plug is in the oNLINEstate when Oracle
Clusterware is shut down on a server hosting this service, then the service will be restored to its original state after the restart of Oracle Clusterware on this server. This way, starting PDBSD is automated as with any other Oracle RAC database
Note: The service name associated with a PDB when it is created may not be used to stop and start the PDB.
Someone can test this?