Solution to insufficient table space for training dry goods sharing table of Shanghai Tengke Education Dream Database

In the sharing last week, we mentioned how to view the current usage status of the table space through the Dameng management tool . So, when the use of the table space reaches the upper limit, how do we operate to make the table space continue to be used?

Here we provide three methods

 

1. Modify the file size of the data file

2. Open the automatic extension of the data file

3. Add data files in the tablespace

 

This article will show you one by one.

 

Note: The demonstration environment of this article: DM Database Server x64V7.1.6.46-Build(2018.02.08-89107)ENT

 

One. Modify the data file size

 

As we all know, the table space in Dameng database is composed of one or more data files. When the table space is insufficient, the most natural way to think of is of course to modify the size of the data file. Here we use management tools to demonstrate:

 

First, right-click the tablespace name and click Modify

 

 

 

Double-click the file size to modify and increase the size of the data file. The unit here is M

 

 

Change to 128M

 

 

In this way, the size of our data file becomes larger, and the data can be inserted into the current table space normally.

 

two. Automatic expansion of data files

 

Using the first method can certainly solve the problem, but if we manually modify the size each time, firstly it will reduce work efficiency, and secondly, we don't know how much the file size should be set each time. In order to deal with this situation, Dameng database provides a mechanism for automatic expansion of data files. When the usage of the table space approaches the upper limit, the size of the data file will automatically expand to deal with the lack of space. The specific operations are as follows:

 

First click on the modify window, and then in the pop-up option box, modify the automatic expansion settings to turn on automatic expansion

 

 

 

It should be noted here that the expansion size and expansion upper limit of the latter two tabs correspond to the size of each data file expansion and the upper limit of the data file expansion. 0 means no upper limit.

 

For example, we modify it like this

 

 

 

It means that each expansion will increase by 1M, and the upper limit of expansion is 1G. In this way, when the data in the table space reaches 128M, the data file will automatically expand, but it will not exceed 1G.

 

three. New data file

 

As mentioned earlier, in Dameng database, a table space can correspond to multiple data files on the disk. Therefore, when the space of the table space is used up, we can also increase the size of the current table space by adding data files in the table space. The specific demonstration is as follows

    

First, open the modification window by right-clicking the name, and then in the pop-up option box, click Add, and then set the path information of the new file, the initial size, whether to automatically expand and other information

 

 

 

In this way, the database will help us create a new data file at the specified location, and the perpetual size of the table space will also be expanded.

 

At the same time, this also means that in some cases, we can put multiple data files in a table space on different storage hard disks, so as to achieve the purpose of decentralizing I/O, thereby improving the overall system operating efficiency.

Guess you like

Origin blog.csdn.net/qq_42726883/article/details/108441487