The table of DB2 will hang after deleting the field and need to execute the reorg command

The DB2 table will hang after deleting the field. The reorg command needs to be executed. The

steps are as follows:

log in to the server where the 192.168.1.74 database is located through ssh

Tools :
After connecting with Xshell 5:
quote


Connecting to 192.168.1.74:22...
Connection established.



The db2 installation directory is in

/opt/ibm/db2/V11.1/ and

enter the bin
cd bin

command./db2
list db directory

quote


System Database Directory

Number of entries in the directory = 2

Database 1 entry:

Database alias                       = MPOS
Database name                        = MPOS
Local database directory             = /home/db2inst1
Database release level               = 14.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0
Alternate server hostname            =
Alternate server port number         =

Database 2 entry:

Database alias                       = IBBDKUSR
Database name                        = IBBDKUSR
Local database directory             = /home/db2inst1
Database release level               = 14.00
Comment                              =
Directory entry type                 = Indirect
Catalog database partition number    = 0
Alternate server hostname            =
Alternate server port number         =



Connect to db2 first:
./db2 connect to IBBDKUSR user mpos using JYCDB2

quote



   Database Connection Information

Database server        = DB2/LINUXX8664 11.1.1.1
SQL authorization ID   = MPOS
Local database alias   = IBBDKUSR




Then perform table
sorting./db2 reorg table withholding_test.merchant


quote


[mpos@localhost bin]$ ./db2 reorg table withholding_test.merchant;
DB20000I  The REORG command completed successfully.







Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326127121&siteId=291194637
Recommended