Red Hat Network Satellite with Embedded Database requires a utility for managing that database. Red Hat provides just such a tool: RHN DB Control. This command line utility allows you to do everything from make, verify, and restore backups to obtain database status and restart it when necessary. You must be the oracle user to invoke RHN DB Control. To begin, switch to the oracle user:
su - oracle
Next, issue the following command:
9.4.1. DB Control Options
RHN DB Control offers many command line options. To use them, as oracle insert the option and the appropriate value, if needed, after the
Table 9.1. RHN DB Control Options
| Option || Description |
| Lists these |
db-control options with additional details.
| Backs up the database to the directory specified. |
| Examines the contents of a backup directory. Returns the timestamp of backup creation and reports on its contents. |
| Increase the Red Hat Network Oracle tablespace |
| Gather statistics on Red Hat Network Oracle database objects. PCT is the percentage of rows to estimate (the default is 15%). |
| Reports on current usage of database space. |
| Reports on segments with stale or empty statistics. |
| Restores the database from backup kept in DIRNAME. Database must be stopped for this command to run successfully. |
| Starts the database instance. This can also be accomplished by issuing the |
service oracle start command as root.
| Shrinks Red Hat Network Oracle database segments with signifcant amounts of free space. |
| Shows the current status of the database, either "running" or "offline". |
| Stops the database instance. This can also be accomplished by issuing the |
service oracle stop command as root.
| Show space report for each table |
| Verifies the contents of the backup kept in DIRNAME. This command runs a checksum of each of the files kept in the backup. |
Database statistics are collections of data that describe more details about the database and the objects in the database. These statistics are used by the query optimizer to choose the best execution plan for each SQL statement. Because the objects in a database can be constantly changing, statistics must be regularly updated so that they accurately describe these database objects. Statistics are maintained automatically by Oracle. However, if your database has performance issues after a significant amount of data changes, consider performing manual gathering of statistics.
After deleting large amount of data, use the
segment-shrink feature to reclaim fragmented free space in an Oracle Database segment. The benefits of
segment-shrink are compaction of data that leads to better cache utilization and the compacted data requires fewer blocks to be scanned in full table scans, which both lead to better performance.
The segment shrink feature works only on newly created Oracle Database 10g Release 2 that comes with Red Hat Network Satellite Server. Due to different default database settings in Oracle Database 9i this feature does not work on databases that were upgraded from previous Red Hat Network Satellite Server releases.