No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

eSight V300R010C00SPC200, 300, and 500 Local HA System Software Installation Guide (SUSE Linux + Oracle + Veritas) 10

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Modifying the Running Parameters of the Oracle Database

Modifying the Running Parameters of the Oracle Database

You can execute the Oracle configuration script to optimize the database running memory and start the scheduled task for clearing database audit logs.

Prerequisites

  • The eSight installation package has been obtained and stored on the Oracle server.

Context

The Oracle database logs are not cleared for a long time. As a result, the disk usage is too high or the partition is used up, and eSight cannot be used. You can manually execute the scripts in the eSight installation package to optimize the Oracle database as follows:

  • The Oracle running memory is set to one fourth of the total server memory.
  • Database audit logs are stored for a week.

Deleted logs cannot be restored. Exercise caution when executing this script.

Procedure

In a Veritas HA system, perform the following operations on the active and standby servers:

  1. Log in to the server as the ossuser user.
  2. Switch to the root user.

    > su - root

  3. Start the Oracle database.

    1. Run the following command to start the Oracle database:

      # hares -online Oracle -sys $(hostname)

    2. Check whether the Oracle database is successfully started.

      # hares -state Oracle -sys $(hostname)

      If the following information is displayed, the Oracle database is successfully started:

      ONLINE

  4. Copy the script from the eSight installation directory to the home directory of the Oracle database. The following commands use the /opt/eSight installation directory as an example:

    # cp -rpf /opt/eSight/AppBase/uninstall/scripts/cleanScripts/oracle/set_log_clean.sh ~oracle

  5. Set the owner and group of the script.

    # cd ~oracle

    # chown oracle:dba set_log_clean.sh

  6. Switch to the oracle user and execute the script.

    # su - oracle

    > sh ./set_log_clean.sh

  7. Restart the database.

    1. Switch to the root user.

      > su - root

    2. Stop the Oracle database.
      1. Bring the Oracle resource offline.

        # hares -offline Oracle -sys $(hostname)

      2. Check whether the Oracle resource is offline.

        # hares -state Oracle -sys $(hostname)

    3. Start the Oracle database.
      1. Run the following command to start the Oracle database:

        # hares -online Oracle-sys $(hostname)

      2. Check whether the Oracle database is successfully started.

        # hares -state Oracle -sys$(hostname)

        If the following information is displayed, the Oracle database is successfully started:

        ONLINE

  8. Check whether the database memory is set successfully.

    1. Switch to the oracle user.

      # su - oracle

    2. Run the following command to obtain the total server memory (in MB):
      free -m | grep Mem | sed 's/ /\n/g' |sed '/^[[:space:]]*$/d' |sed -n '2p'
      15951
    3. Log in to the database and query the maximum running memory of the database. In the query result, the value of VALUE should be a quarter of the total memory of the server. The value is not an exact value because the Oracle database automatically adjusts the memory.
      sqlplus / as sysdba 
      SQL>show parameter memory_max_target; 
      NAME                                 TYPE                   VALUE 
      ------------------------------------ ---------------------- ------------------------------ 
      memory_max_target                    big integer            3988M

  9. Verify that the log deletion task has been modified. In the query result, LAST_ARCHIVE_TS indicates the week before the week during which the script is executed. That is, the logs generated one week ago will be deleted.

    SQL>SELECT * FROM DBA_AUDIT_MGMT_LAST_ARCH_TS WHERE AUDIT_TRAIL LIKE '%OS%'; 
    AUDIT_TRAIL                              RAC_INSTANCE LAST_ARCHIVE_TS 
    ---------------------------------------- ------------ ------------------------------------------------------- 
    OS AUDIT TRAIL                                      1 02-OCT-17 11.55.03.000000 PM +08:00     
    SQL> exit

Translation
Download
Updated: 2019-10-30

Document ID: EDOC1100044372

Views: 29447

Downloads: 26

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next