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 V300R009C00 Single-Node System Software Installation Guide (SUSE Linux) 09

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 Running Parameters of the Oracle Database

Modifying Running Parameters of the Oracle Database

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

Prerequisites

Context

The Oracle logs are not deleted for a long time. As a result, the disk space usage is high or the partition is used up, and eSight is unavailable. You can manually execute the script in the eSight installation package to perform optimization as follows:

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

    Deleted logs cannot be restored. Excise caution when executing the script.

Procedure

  • The Oracle database and eSight are installed on the same server.
    1. Log in to the server as the ossuser user.
    2. Switch to the root user.

      > su - root

    3. Copy the script from the eSight installation directory to the Oracle home directory. Here, the installation directory /opt/eSight is used as an example.

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

    4. Set the owner and group of the script.

      # cd ~oracle

      # chown oracle:dba set_log_clean.sh

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

      # su - oracle

      > sh ./set_log_clean.sh

    6. Restart the database.

      > sqlplus / as sysdba

      SQL> shutdown immediate

      SQL> startup

      SQL> exit

    7. Check whether the database memory is set successfully.
      1. Run the following command to obtain the total memory of the server, in MB:
        free -m | grep Mem | sed 's/ /\n/g' |sed '/^[[:space:]]*$/d' |sed -n '2p'
        15951
      2. Log in to the database and query the maximum running memory of the database. In the query result, VALUE should be one fourth of the total memory of the server. (This is not an accurate value. The Oracle automatically adjusts the memory value slightly.)
        sqlplus / as sysdba
        SQL>show parameter
        memory_max_target;
        NAME                                 TYPE                   VALUE
        ------------------------------------
        ---------------------- ------------------------------
        memory_max_target                    big integer            3988M
    8. Check whether the log clearing task has been adjusted. In the query result, LAST_ARCHIVE_TS specifies a time one week before the script execution time, indicating that scripts of one week ago are all 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
  • The Oracle database is deployed independently.
    1. Log in to the Oracle server as the root user.
    2. Copy the script to the specified directory.
      1. Run the following command to copy the script from the eSight installation directory to the Oracle home directory:

        # scp -P 22 ossuser@192.168.1.100:/opt/eSight/AppBase/uninstall/scripts/cleanScripts/oracle/set_log_clean.sh ~oracle

        NOTE:

        Variables in the preceding command are described as follows and need to be changed based on the site requirements:

        • 22: port number of the eSight server.
        • 192.168.1.100: IP address of the eSight server.
        • /opt/eSight: installation directory.

        If it is the first time for you to connect to this server, you need to enter yes when executing this command to confirm the connection.

        During the execution of this command, you need to enter the password of the ossuser user.

      2. Run the following command to check whether the script exists. If yes, the script is successfully copied. If no, the script fails to be copied, and you need to manually copy it.

        # ls ~oracle/set_log_clean.sh

    3. Set the owner and group of the script.

      # cd ~oracle

      # chown oracle:dba set_log_clean.sh

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

      # su - oracle

      > sh ./set_log_clean.sh

    5. Restart the database.

      > sqlplus / as sysdba

      SQL> shutdown immediate

      SQL> startup

      SQL> exit

    6. Check whether the database memory is set successfully.
      1. Run the following command to obtain the total memory of the server, in MB:
        free -m | grep Mem | sed 's/ /\n/g' |sed '/^[[:space:]]*$/d' |sed -n '2p'
        15951
      2. Log in to the database and query the maximum running memory of the database. In the query result, VALUE should be one fourth of the total memory of the server. (This is not an accurate value. The Oracle automatically adjusts the memory value slightly.)
        sqlplus / as sysdba
        SQL>show parameter memory_max_target;
        NAME                                 TYPE                   VALUE
        ------------------------------------ ----------------------
        ------------------------------
        memory_max_target                    big integer            3988M
    7. Check whether the log clearing task has been adjusted. In the query result, LAST_ARCHIVE_TS specifies a time one week before the script execution time, indicating that scripts of one week ago are all 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
Download
Updated: 2019-05-17

Document ID: EDOC1100011860

Views: 92295

Downloads: 138

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