The invention relates to a
database inspection and maintenance method. The
database inspection and maintenance method comprises the following steps: step 1: establishing a
database version, obtaining the newest version
database structure, forming
database structure script
syntax, and storing
database structure information; step 2: defining a basic
list, obtaining the basic data of the newest version, forming basic data
syntax, and storing the basic data; step 3: obtaining a database structure and the basic data of a database to be compared or a database of the history version; and step 4: comparing the database structure with the basic data to form a difference report and produce
upgrade syntax. According to the database inspection and maintenance method, the changing situation of database environment can be inspected at any time, and corresponding version files can be formed. According to the database inspection and maintenance method, the automatic inspection on the user database and the rapid upgrading can be realized, and the automatic
upgrade of
software of a database
system can be used. The universal database inspection and maintenance method provided by the invention has the advantages that the applicability is wide, the
workload of the manual maintenance on the database and the possibility of making mistakes can be reduced, and also the
error ratio of the manual operation is reduced.