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

CloudEC V600R019C00 Fault Information Collection (Enterprise On-premises, Convergent Conference)

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).
Collecting Database Information

Collecting Database Information

You need to collect database information when an ECS service fault occurs.

Collecting Oracle Database Information

The following table describes information to be collected and the commands for the Oracle 11g database.

Table 6-1 Information to be collected and the commands for the Oracle 11g database

No.

Information to Collect

Command

Description

1

Database alarm log file

$ cd ${ORACLE_BASE}/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace

Log in to the database server as the oracle user, run this command to go to the directory for storing log files, and find the alert_$ORACLE_SID.log file.

2

Database trace file

$ cd ${ORACLE_BASE}/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace

Log in to the database server as the oracle user, run this command to go to the directory for storing log files, and find the .TRC file.

3

Initialization parameter file

SQL>create pfile='/opt/oracle/init.ora' from spfile;

The initialization parameter file is readable only after it is converted into a text file using this command.

4

Current process information

$ cd ${ORACLE_HOME}/network/admin/

Log in to the database server as the oracle user, run this command to go to the directory for storing process information, and find the listener.ora and tnsnames.ora files.

5

Database version

$ sqlplus /nolog

Run this command as the oracle user and record version information.

6

Database status information

$ sqlplus / as sysdba

> select * from v$instance;

Run this command as the oracle user.

7

Database listener information

$ lsnrctl status

Run this command as the oracle user.

8

Tablespace status information

> select tablespace_name, status from dba_tablespaces;

Run this command as the oracle user.

9

Free tablespace information

> select tablespace_name, bytes from dba_free_space;

Run this command as the oracle user.

10

Memory usage of the database server

# top>file2.txt

Run this command as the root user of the operating system, wait for 5 seconds, press Ctrl+C to stop, and submit the result to Huawei maintenance engineers.

11

Service data

$ exp system/password@sdp buffer=8092 full=y inctype=complete file=backup.dmp

Export data from the database and back up the data.

  • Run this command as the oracle user.
  • password: specifies the login password of the system user. Set this parameter based on the site requirements.
  • sdp: specifies the database instance name. Set this parameter based on the site requirements.

Collecting MySQL Database Information

The following table describes information to be collected and the commands for the MySQL database.

Table 6-2 Information to be collected and the commands for the MySQL database

No.

Information to Collect

Command

Description

1

Database log file

cd ${mysql_home}/log

Collect the package that contains the basic log information of the MySQL database. For example, the package name is mysql_log_20180425.tar.gz, in which 20180425 indicates the date when the log file is generated.

2

Initialization parameter file

/etc/my.cnf

The my.cnf file is the initialization parameter file of the MySQL database.

3

Current process information

mysql>show processlist;

Collect information about the service connection process.

4

Database version

mysql>select version();

View the version number of the current MySQL database.

5

Database status information

mysql>show databases;

mysql>use mysql;

mysql>show tables;

Query the database status.

  • The show databases; command is used to query the database in use.
  • The use mysql; command is used to select the mysql database. The database name mysql is an example.
  • The show tables; command is used to view the table information in the current MySQL database.

6

Memory usage of the database server

top>file2.txt

Run this command as the root user of the operating system, wait for 5 seconds, press Ctrl+C to stop, and submit the result to Huawei maintenance engineers.

7

Database file

mysqldump -umysql_admin -p mydb>/opt/mysql/mydb.sql

Export data from the database and back up the data.

  • Run this command as the mysql_admin user of the MySQL database.
  • After you run this command, enter the password of the mysql_admin user of the MySQL database as prompted.
  • mydb: specifies the database name. Set this parameter based on the site requirements.
  • mydb.sql: specifies the name of the file to be exported.
Translation
Download
Updated: 2019-04-01

Document ID: EDOC1100059082

Views: 6353

Downloads: 2

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