MPP environment construction and problem solving

catalogue

1, Environment construction

1. System planning

2. Configure DM ini

3. Configure dmmal ini

4. Configure dmmpp ctl

5. Run MPP

2, Problem solving

1. After starting two instances, start/ disql error

 2. Common meter test

3. Temporary meter test

1, Environment construction

Build a two node MPP cluster in linux environment. The main steps are as follows:

1. System planning

This example configures a two node MPP. The instance names of the two nodes are DMSERVER and DMSERVER1 respectively. See the following table for the relevant IP and port planning.

Instance name

MAL_INST_HOST

MAL_INST_PORT

MAL_HOST

MAL port

MPP_SEQNO

DMSERVER

10.9.13.20

5236

10.9.13.20

61141

0

DMSERVER1

10.9.13.21

5236

10.9.13.21

61142

1

2. Configure DM ini

Create databases on the two servers and create instances. The initialization parameters of the instances should be consistent to avoid errors.

DM. For two instances respectively Ini.

Modify DM. Of DMSERVER Ini has the following parameters:

INSTANCE_NAME = DMSERVER

PORT_NUM = 5236

MAL_INI = 1

MPP_INI = 1

Modify DM. Of DMSERVER1 + Ini has the following parameters:

INSTANCE_NAME = DMSERVER1

PORT_NUM = 5237

MAL_INI = 1

MPP_INI = 1

3. Configure dmmal ini

Configure dmmal for two instances Ini is as follows, and the configuration is exactly the same, dmmal Ini and DM Ini in the same directory.

[MAL_INST1]
MAL_INST_NAME = DMSERVER
MAL_HOST = 10.9.13.20
MAL_PORT = 61141
MAL_INST_HOST = 10.9.13.20
MAL_INST_PORT = 5236


[MAL_INST2]
MAL_INST_NAME = DMSERVER1
MAL_HOST = 10.9.13.21
MAL_PORT = 61142
MAL_INST_HOST = 10.9.13.21
MAL_INST_PORT = 5237

4. Configure dmmpp ctl

dmmpp.ctl is a binary file. You cannot configure it directly. You need to configure dmmpp first ini.

Configure dmmpp Ini is as follows:

[SERVICE_NAME1]

MPP_SEQ_NO = 0

MPP_INST_NAME= DMSERVER

[SERVICE_NAME2]

MPP_SEQ_NO = 1

MPP_INST_NAME= DMSERVER1

Use the tool dmctlcvt provided by DM to dmmpp Ini to dmmpp CTL, dmctlcvt tool

In the "bin" subdirectory of the DM installation directory. Convert the generated dmmpp CTL needs to be placed with DM Ini is the same directory.

Execute the following statement:

./dmctlcvt TYPE=2 SRC=/home/dmdba/dm8/data/DAMENG/dmmpp.ini DEST=/home/dmdba/dm8/data
/DAMENG/dmmpp.ctl

The generated dmmpp CTL is copied to another server to ensure dmmpp of all instances in the MPP system CTL is exactly the same.

5. Run MPP

After the previous four steps, the DM MPP environment has been configured.

Start the DM database instances of DMSERVER and DMSERVER1 respectively (in no order), the DM MPP system can run normally, and the user can log in to any instance for database operation.

2, Problem solving

1. After starting two instances, start/ disql error

Reason: it is most likely that the firewall is not turned off;

Solution: execute the following command to turn off the firewall

systemctl status firewalld     #View firewall status
systemctl stop firewalld       #Turn off firewall
systemctl disable firewalld    #Execute boot disable firewall

 2. Common meter test

Node 1Node 2

Create table t1 and insert data (not submitted);

Execute commit

Conclusion: MPP supports common table and table data synchronization

3. Temporary meter test

Since the session level temporary table is only valid for the current session, only the transaction level temporary table is tested;

(1) Create a transaction level temporary table at node 1, insert data, and query data without committing:

SQL> create global temporary table tem1 (c1 int, c2 varchar(20))on commit delete rows;
Operation executed
 Elapsed time: 9.593(millisecond). Execution number:423.
SQL> insert into tem1 values(1,'a');
Number of affected rows 1

Elapsed time: 0.693(millisecond). Execution number:424278.
SQL> ^C
SQL> select * from tem1;

Line number     C1          C2
---------- ----------- --
1          1           a

Elapsed time: 2.772(millisecond). Execution number:424280.

(2) Query tem1 table at node 2:

SQL> select * from tem1;
No rows selected

Elapsed time: 2.389(millisecond). Execution number:181701.

(3) execute the submit operation on node 1 and query:

SQL> commit;
Operation executed
 Elapsed time: 1.094(millisecond). Execution number:424281.
SQL> select * from tem1;
No rows selected

Elapsed time: 2.125(millisecond). Execution number:424283.

(4) query at node 2:

SQL> select * from tem1;
No rows selected

Elapsed time: 2.013(millisecond). Execution number:181703.

Reason: after the temporary table tem1 is inserted and submitted, the temporary table is cleared, so node 2 will not find the temporary table data of node 1 all the time.

Conclusion: MPP cluster does not support temporary table data synchronization.

Welcome to the dream technology community for more questions! Home | Dameng cloud adaptation Center (dameng.com)

Keywords: Database SQL DBA

Added by unidox on Sun, 26 Dec 2021 02:37:13 +0200