The following table lists the PostgreSQL databases that can be created during the installation of the WEM application. Certain databases are only created if their respective functionality is enabled in the application. Refer to the Determining Available Databases section of this chapter for information on determining which databases have been created.
Caution: To ensure proper operation and data integrity, the PostgreSQL database instances installed with the WEM should only be used by the application.
Step 2 ./psql -U postgres_name template1postgres_name is the name of the PostgreSQL database administrator (postgres by default).The removal of these “old” records is done by “vacuuming” the database using the PostgreSQL vacuumdb command.Caution: Database vacuuming should only be performed at a time when there are minimal database transactions. Typically, this would correspond to a time frame in which no configurations are being performed, infrequent alarm updates, and/or infrequent bulk statistics transfers. Before vacuuming the database, the server must check for already running vacuuming. If this is already running, then the next scheduled vacuum process must be skipped. Hence, WEM must execute only one vacuum query at a time for every database.
Periodic, automatic database vacuuming can be performed through the configuration of a text file as described in the Configuring Automated Periodic Database Vacuuming section that follows. This is the preferred method. One-time automatic vacuuming can be performed through the use of the UNIX cron application as described in the Using Cron to Automate Database Vacuuming section. Vacuuming can also be performed manually as described in the Manually Vacuuming WEM Databases section.
• VACUUM ANALYZE : Performs the vacuum function as described previously in this chapter but also collects statistics about the proportions of duplicate values within a column and the min/max value.
• VACUUM : Performs only the vacuum function.
• VACUUM FULL : Physically reorders the tables. This requires an exclusive lock on each table while it is being processed. * Any non-zero number specified for a database in the Database Name section supersedes the CompleteDB parameter setting for the database. For example, if the start value for the Configuration database is 13 and the databases corresponding CompleteDB parameter is set to 0, then vacuuming is to be done for the entire database and all of the tables. However, if there is a conflict between the start times specified for any of the tables within the database and that specified for the database itself, vacuuming will not be started for that table.From the above example, you can see that the vacuumdb command is located in the bin sub-directory of the PostgreSQL installation directory (/users/ems/postgresx.x.x by default). The -U parameter indicates the PostgreSQL database administrator name (postgres by default).
Step 1 Ensure that the database(s) are backed-up prior to vacuuming. Refer to the Backing-up WEM Databases section of this chapter for information on performing a database backup.
The name of the database to be vacuumed. Refer to the Determining Available Databases section of this chapter for information on determining which databases are available.Caution: Database backups should only be performed at a time when there are minimal database transactions. Typically, this would correspond to a time frame in which no configurations are being performed, infrequent alarm updates, and/or infrequent bulk statistics transfers.
Caution: Database restoration should only be performed after the WEM application has been successfully un- and re-installed. Additionally, it should only be performed with the assistance of a qualified customer support representative.
This option is also used with the backup script backup.sh. It restores the WEM databases. No extra parameters are required for restoring the database other than the ‘restore’ keyword. Script itself asks for more parameters like postgres dir path, backup file location, etc.
![]() |
Cisco Systems Inc. |
Tel: 408-526-4000 |
Fax: 408-527-0883 |