You can convert an administrator-managed database to a policy-managed database.
Note:
If the administrator-managed database is configured for a low-privileged user and you attempt to convert the database to a policy-managed database, then you must manually add a wallet (if one does not already exist) for this low privileged user, so that a Windows service for Oracle Database can be created.
To convert an administrator-managed database:
Check the current configuration of all services and the database (if you make a mistake and need to recover, then you can know what the configuration looked like when you began), as follows:
srvctl config database -db db_unique_name srvctl config service -db db_unique_name
Create a server pool for the policy-managed database (you must be a cluster administrator to do this), as follows:
srvctl add srvpool -serverpool server_pool -min 0 -max n
In the preceding command, 0 is the minimum number of servers you want in the server pool and n
is the maximum.
Note:
This step does not necessarily place servers in the newly-created server pool. If there are no servers in the Free pool from which the new server pool can allocate servers, for example, then you may have to use the srvctl relocate server
command to relocate a server from another server pool once the conversion is complete.
Stop the database using Oracle Enterprise Manager or SRVCTL, as follows:
srvctl stop database -db db_unique_name
Modify the database to be in the new server pool, as follows:
srvctl modify database -db db_unique_name -serverpool server_pool
Add a service user to the wallet, as follows:
crsctl add wallet -type OSUSER -user user_name -passwd
Check the status of the database to confirm that it is now policy managed by repeating the commands in step 1.
See Also:
Server Control Utility Reference for more information about these commands
Configure Oracle Enterprise Manager to recognize the change you made in the previous procedure, as follows:
In order for Oracle Enterprise Manager Cloud Control to recognize the new database instances, you must change the instance name from db_unique_name#
to db_unique_name_#
(notice the additional underscore (_) before the number sign (#) character).
Rename the orapwd
file in the dbs/database
directory (or create a new orapwd
file by running the orapwd
command).
By default, there is an orapwd
file with the instance name appended to it, such as orapwdORCL1
. You must change the name of the file to correspond to the instance name you changed in the previous step. For example, you must change orapwdORCL1
to orapwdORCL_1
or create a new orapwd
file.
You cannot directly convert a policy-managed database to an administrator-managed database. Instead, you can remove the policy-managed configuration using the srvctl remove database
and srvctl remove service
commands, and then register the same database as an administrator-managed database using the srvctl add database
and srvctl add instance
commands. Once you register the database and instance, you must use the srvctl add service
command to add back the services as you removed them.
See Also:
"SRVCTL Command Reference" for more information about these commands
Services for administrator-managed databases continue to be defined by the PREFERRED
and AVAILABLE
definitions. For policy-managed databases, a service is defined to a database server pool and can either be uniform (running on all instances in the server pool) or singleton (running on only one instance in the server pool). If you change the management policy of the database, then you must recreate the database services to be either uniform/singleton or PREFERRED
/AVAILABLE
, depending upon which database management policy you choose.
See Also:
"Service Deployment Options" for more information about managing services