Oracle Enterprise Manager Ops Center uses an Oracle Database 12c Enterprise Edition instance to store product data. You can manage this database.
This chapter includes the following sections:
The Enterprise Controller uses an Oracle Database 12c Enterprise Edition database to store Oracle Enterprise Manager Ops Center data. This can be the embedded database installed with the Enterprise Controller, or a new or existing customer-managed database. You can manage the existing database, change, back up, or recover the database schema, or migrate the data to a customer-managed database.
You can use the backup and recovery actions available in Oracle Enterprise Manager Ops Center to back up an Enterprise Controller with either an embedded or a customer-managed database. These options do not require database administrator privileges. These options are discussed in Perform Backup and Recovery.
Note:
If you are using a customer-managed database, you can edit the createOCSchema_remote.sql
script to restrict the OC schema user from running certain commands on the database.
Note:
The OC Dump Directory is set when the Enterprise Controller is installed or when a new Oracle Enterprise Manager Ops Center database is specified.
Some of the procedures described in this section use the ecadm
command. See Command Line Administration for more information about this command.
On Oracle Solaris systems, this command is in the /opt/SUNWxvmoc/bin/
directory.
On Linux systems, this command is in the /opt/sun/xvmoc/bin/
directory.
You require specific roles to perform database management tasks in Oracle Enterprise Manager Ops Center.
The following table lists the tasks and the role required to complete the task. Contact your administrator if you do not have the necessary role or privilege to complete a task.
Table 4-1 Database Management Tasks and Roles
Task | Role |
---|---|
Verify the database |
Ops Center Admin |
Change database credentials |
Ops Center Admin |
You can perform various database management operations using Oracle Enterprise Manager Ops Center.
Using Oracle Enterprise Manager Ops Center, you can perform the following tasks:
Install a customer-managed database
Configure a customer-managed database
Migrate to customer-managed database from an embedded database
Change the customer-managed database location
Verify the database
Upgrade the customer-managed database
Change database credentials
Defragment an embedded database
Consolidate reports data on customer-managed database
In the Oracle Enterprise Manager Ops Center user interface, you can find database information in different locations.
Table 4-2 Location of Database Management Information in the UI
To See | Location |
---|---|
Database management actions |
Expand Administration in the Navigation pane and select the Enterprise Controller. |
View database credentials |
Expand Administration in the Navigation pane and select the Enterprise Controller. |
If you want to use a customer-managed database, you must install and configure it to work with Oracle Enterprise Manager Ops Center.
Once you have installed and configured the database, you can migrate to it using the Migrating to a Customer-Managed Database procedure.
This procedure assumes that the database is already installed. This procedure describes the steps to install and configure a customer-managed database.
If you want to use a customer-managed database running Oracle 12 multitenant container database (CDB), you must install and configure it to work with Oracle Enterprise Manager Ops Center.
This procedure assumes that the database is already installed. This procedure describes the steps to prepare the Oracle 12CDB customer-managed database for Oracle Enterprise Manager Ops Center installation.
Create a pluggable database (PDB) for the Oracle Enterprise Manager Ops Center schema where the database objects will be placed.
Create the following tablespaces in the PDB:
Default tablespace: This is the default tablespace for the Oracle Enterprise Manager Ops Center user. If the default tablespace does not exist, create this tablespace with the name USERS
.
Report tablespace: This is the tablespace used for report data. Create this tablespace with the name OC_RM_RESOURCE_TS
.
Temporary tablespace: This is the temporary tablespace for the Oracle Enterprise Manager Ops Center user.
Copy the createOCSchema_remotePDB.sql
script from the Enterprise Controller to the database.
On Oracle Solaris for x86 systems, this script is in the /var/tmp/OC/dvd/SunOS_i386/Product/installer/scripts
directory.
On Oracle Solaris for SPARC systems, this script is in the /var/tmp/OC/dvd/SunOS_SPARC/Product/installer/scripts
directory.
On Linux systems, this script is in the/var/tmp/OC/dvd/Linux_i686/Product/installer/scripts
directory.
For example:
# scp root@EnterpriseController:/var/tmp/OC/dvd/SunOS_i386/Product/installer/scripts/createOCSchema_remotePDB.sql. Password: createOCSchema_remotePDB.sql 100% |*********************| 1486 00:00
As the database administrator, run the createOCSchema_remotePDB.sql
script and enter the following information:
Oracle Enterprise Manager Ops Center pluggable database name: This is a database to which the Oracle Enterprise Manager Ops Center connects to.
Oracle Enterprise Manager Ops Center user name: This is a database user that is created by the script, which Oracle Enterprise Manager Ops Center uses to access the database.
Oracle Enterprise Manager Ops Center password: This is the password for the database user.
Oracle Enterprise Manager Ops Center read-only user name: This is a read-only database user, which Oracle Enterprise Manager Ops Center uses to view the database.
Oracle Enterprise Manager Ops Center read-only password: This is the password for the read-only database user.
Default tablespace: This is the default tablespace for the Oracle Enterprise Manager Ops Center user.
Report tablespace: This is the tablespace used for report data.
Temporary tablespace: This is the temporary tablespace for the Oracle Enterprise Manager Ops Center user.
Oracle Enterprise Manager Ops Center dump directory: This directory must exist and must be owned by the oracle
user. If you are using Oracle RAC, this directory must be shared between all Oracle RAC nodes.
For example:
[oracle@OAK0 OC_Scripts] $ sqlplus '/as sysdba' @createOCSchema_remotePDB.sql SQL*Plus: Release 12.1.0.2.0 Production on Mon Jul 27 13:11:20 2015 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics and Real Application Testing options "SQLTrace: Entering createOCSchema_remotePDB.sql" Enter PDB name for Ops Center database login: PDB_ODAOCDB Enter username for Ops Center database login: OC Enter password for Ops Center database login: Enter username for read only Ops Center database login: OC_RO Enter password for read only Ops Center database login: Enter default tablespace for Ops Center user: USERS Enter report tablespace for Ops Center user: OC_RM_RESOURCE_TS Enter temporary tablespace for Ops Center user: TEMP Enter Oracle Data Pump destination directory: /var/tmp/ocdumpdir
The database properties file contains the location of the customer-managed database and a user name and password that can access the database. With Oracle 12CDB, the database service should point to the puggable database service name. This database information can be found in the tnsnames.ora
file.
For example:
# vi /var/tmp/RemoteDBProps.txt mgmtdb.appuser=TESTSCHEMA mgmtdb.password=TESTSCHEMA_PWD mgmtdb.roappuser=TESTSCHEMA_RO mgmtdb.ropassword=TESTSCHEMA_RO_PWD mgmtdb.dburl=jdbc:oracle:thin:@<database host name>:<port>/<Pluggable database service name>
If you are using the embedded database, you can migrate to a customer-managed database.
You must install and configure the customer-managed database in the destination location as described in the Installing and Configuring a Customer-Managed Database or Installing and Configuring Oracle 12CDB Customer-Managed Database procedure before beginning this procedure.
Note:
The Enterprise Controller system must be routable by host name from the customer-managed database server for the migration to succeed.
You can change the location of the customer-managed database.
You must install and configure the database in the destination location as described in the Installing and Configuring a Customer-Managed Database or Installing and Configuring Oracle 12CDB Customer-Managed Database section before beginning this procedure.
You must have root access to the Enterprise Controller system and database administrator access to the source database and destination database to complete this procedure.
You can verify that the configured database is operational and accessible from the Enterprise Controller.
For example:
Use the ecadm
command with the verify-db
subcommand to verify the database.
./ecadm verify-db ecadm: --- Verified database #
You can upgrade the database software. To do so, you must shut down the Enterprise Controller.
Before upgrading the database software, verify that the version you intend to upgrade to is supported.
You can change the database password for the Oracle Enterprise Manager Ops Center user or the read-only user on an embedded or customer-managed database.
The following topics are covered:
You can change the database credentials for the Ops Center user by using interactive mode or by using a password file.
This section describes the two methods to change the database credentials for the Ops Center user.
Using interactive mode:
You can change the credentials by using the ecadm
command with the change-db-password
subcommand and the -i
option.
For example:
# ./ecadm change-db-password -i Changing the database password. The Enterprise Controller will be restarted after the database password is changed. Continue? (y/n) y Enter password: Re enter password: ecadm: --- Changed database password, restarting.
Using password file:
Create a temporary file containing the new password and secure it with 600 permissions.
For example:
# touch /tmp/password # chmod 600 /tmp/password # vi /tmp/password newpassword
Use the ecadm
command with the change-db-password
subcommand and the -p <password file>
option to change the database password. When prompted, confirm the Enterprise Controller restart.
For example:
# ./ecadm change-db-password -p /tmp/password The Enterprise Controller will be restarted after the database password is changed. Continue? (y/n) y ecadm: --- Changed database password, restarting. ecadm: shutting down Enterprise Controller using SMF... ecadm: Enterprise Controller services have stopped ecadm: Starting Enterprise Controller with SMF... ecadm: Enterprise Controller services have started #
If you have a high availability configuration, the ecadm
command copies the new database properties to each remote cluster node. Enter the root password for each remote cluster node.
For example:
ecadm: --- Changed database password, restarting. The DB configuration file must now be copied to each remote cluster node. You will be prompted for the root password for each node to perform the copy. Copying to node OC-secondary Password: password <output omitted> ecadm: --- Enterprise Controller successfully started HA #
Remove the temporary file containing the new password.
For example:
# rm /tmp/password
You can change the database credentials for the read-only user by using interactive mode or by using a password file.
This section describes the two methods to change the database credentials for the read-only user.
Using interactive mode:
You can change the credentials for a read-only user by using the ecadm
command with the change-db-password
subcommand and the -i
and -r
options.
For example:
# ./ecadm change-db-password -i -r Changing the read-only database password. Continue? (y/n) y Enter password: Re enter password: ecadm: --- Changed database password.
Using password file:
Create a temporary file containing the new password.
For example:
# vi /tmp/password newpassword
Use the ecadm
command with the change-db-password
subcommand and the -p <password file>
and -r
options to change the database password. When prompted, confirm the Enterprise Controller restart.
For example:
# ecadm change-db-password -r -p /tmp/password The Enterprise Controller will be restarted after the database password is changed. Continue? (y/n) y ecadm: --- Changed database password, restarting. ecadm: shutting down Enterprise Controller using SMF... ecadm: Enterprise Controller services have stopped ecadm: Starting Enterprise Controller with SMF... ecadm: Enterprise Controller services have started #
If you have a high availability configuration, the ecadm
command copies the new database properties to each remote cluster node. Enter the root password for each remote cluster node.
For example:
ecadm: --- Changed database password, restarting. The DB configuration file must now be copied to each remote cluster node. You will be prompted for the root password for each node to perform the copy. Copying to node OC-secondary Password: password <output omitted> ecadm: --- Enterprise Controller successfully started HA #
Remove the temporary file containing the new password.
For example:
# rm /tmp/password
You can defragment an embedded database to increase free space and improve performance.
To defragment an embedded database, perform the following steps:
If you have installed or upgraded to Oracle Enterprise Manager Ops Center version 12.2.2.0.0 or later with a customer-managed database, reporting data may be stored in the main tablespace, which can cause Enterprise Controller downtime if the tablespace reaches its maximum size.
To determine if the reporting data is correctly stored in the OC_RM_RESOURCE_TS
tablespace, you can check the satadmsqlplus.log
file after upgrading or installing. This log file is located in the /var/opt/sun/xvm/logs
and indicates whether report data is correctly stored in the OC_RM_RESOURCE_TS
tablespace.
If the reporting data is not stored in the OC_RM_RESOURCE_TS
tablespace, you can use the ecadm
command to move this data to the OC_RM_RESOURCE_TS
tablespace.
You can view the Oracle Enterprise Manager Ops Center documents for additional information.
For more information, see these Oracle resources:
For information on editing the createOCSchema_remote.sql
script to restrict the OC schema user from running certain commands on the database, see Oracle Enterprise Manager Ops Center Security
For information on changing the OC Dump Directory, follow the procedure in MOS document 1543144.1
For Enterprise Controller installation procedures, see Oracle Enterprise Manager Ops Center Installation for Oracle Solaris Operating System or Oracle Enterprise Manager Ops Center Installation for Linux Operating Systems
For information on restoring an Enterprise Controller with an embedded database on a new system, see Oracle Enterprise Manager Ops Center Restore an Enterprise Controller and Embedded Database on a New System
For more information on product administration, see http://docs.oracle.com/cd/E59957_01/nav/administer.htm
For end-to-end examples, see the Deploy How To library at http://docs.oracle.com/cd/E59957_01/nav/deploy.htm
and the Operate How To library at http://docs.oracle.com/cd/E59957_01/nav/operate.htm
For more information on Enterprise Manager Ops Center, see the Ops Center blog at https://blogs.oracle.com/opscenter/