[go: up one dir, main page]

CN111966687A - Method and device for partitioning database table of mainframe DB2 - Google Patents

Method and device for partitioning database table of mainframe DB2 Download PDF

Info

Publication number
CN111966687A
CN111966687A CN202010830612.9A CN202010830612A CN111966687A CN 111966687 A CN111966687 A CN 111966687A CN 202010830612 A CN202010830612 A CN 202010830612A CN 111966687 A CN111966687 A CN 111966687A
Authority
CN
China
Prior art keywords
partition
parameter file
database
file
partitioning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010830612.9A
Other languages
Chinese (zh)
Other versions
CN111966687B (en
Inventor
严安宁
朱政
赵天衢
安宏伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010830612.9A priority Critical patent/CN111966687B/en
Publication of CN111966687A publication Critical patent/CN111966687A/en
Application granted granted Critical
Publication of CN111966687B publication Critical patent/CN111966687B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for partitioning a database table of a mainframe DB2, wherein the method comprises the following steps: configuring a table partition parameter file and a batch job file according to the database table partition requirement of the DB 2; executing REXX script programs in batches by using batch job files, customizing tables under PDS in a DB2 database according to the table partitioning parameter files, and determining partitioning statements; the DB2 database tables are partitioned according to the partition statements. The method calls the REXX script program by utilizing the characteristic of flexible configuration of the REXX language, configures the table partition parameter file and the batch operation file according to the specific DB2 table partition requirement, and automatically generates the partition statements of the DB2 database table in batch.

Description

Method and device for partitioning database table of mainframe DB2
Technical Field
The invention relates to the technical field of computer data processing, in particular to a method and a device for partitioning a database table of a mainframe DB 2.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
In large-scale aviation, insurance and banking systems, due to the characteristics of stability requirements and extremely huge data volume, the adopted systems are mostly z/os operating systems of Mainframe Mainframe, and the database systems are mostly DB2, so as to ensure the relative isolation of data of the DB2 database tables and the access efficiency of data access, usually the DB2 database tables need to be partitioned. In overseas core banking system, DB2 database is used for data storage, and the data table is also required to be partitioned for storing mass data of a plurality of line numbers of a plurality of national clients,
under the TSO environment of the existing z/os operating system, partition statements of a DB2 database table can not be generated in batch according to specific table partition requirements only by manually writing the partition statements, and manual writing is time-consuming and labor-consuming, low in efficiency and prone to errors.
Therefore, how to provide a new solution, which can solve the above technical problems, is a technical problem to be solved in the art.
Disclosure of Invention
The embodiment of the invention provides a method for partitioning a DB2 database table of a mainframe, which realizes the partitioning of a DB2 database table by automatically generating partition statements in batches, and comprises the following steps:
configuring a table partition parameter file and a batch job file according to the database table partition requirement of the DB 2;
executing REXX script programs in batches by using batch job files, customizing tables under PDS in a DB2 database according to the table partitioning parameter files, and determining partitioning statements;
the DB2 database tables are partitioned according to the partition statements.
The embodiment of the present invention further provides a device for partitioning a database table of a mainframe DB2, including:
the parameter configuration module is used for configuring a table partition parameter file and a batch job file according to the database table partition requirement of the DB 2;
the partition statement determination module is used for executing REXX script programs in batches by using batch job files, customizing the tables under PDS in the DB2 database according to the table partition parameter files and determining partition statements;
and the partitioning module is used for partitioning the DB2 database table according to the partitioning statement.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the computer program to realize the mainframe DB2 database table partitioning method.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above method for partitioning a database table of the mainframe DB2 is stored in the computer-readable storage medium.
The embodiment of the invention provides a method and a device for partitioning a database table of a DB2 mainframe, which comprises the following steps of firstly, configuring a table partitioning parameter file and a batch job file according to the partitioning requirement of a DB2 database table; then, executing REXX script programs in batches by using batch job files, customizing the tables under PDS in the DB2 database according to the table partition parameter files, and determining partition statements; finally, the DB2 database tables are partitioned according to the partition statements. The method calls the REXX script program by utilizing the characteristic of flexible configuration of the REXX language, configures the table partition parameter file and the batch operation file according to the specific DB2 table partition requirement, and automatically generates the partition statements of the DB2 database table in batch.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic diagram of a method for partitioning a database table of a mainframe DB2 according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a calendar list parameter file of a method for partitioning a database table of the mainframe DB2 according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of an account number partition parameter file of a mainframe DB2 database table partition method according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a client number partition parameter file of a method for partitioning a database table of the mainframe DB2 according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a special table partitioning parameter file of a database table partitioning method of the mainframe DB2 according to an embodiment of the present invention.
Fig. 6 is an example of a batch job file program of a mainframe DB2 database table partitioning method according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of a partition statement of a method for partitioning a database table of the mainframe DB2 according to an embodiment of the present invention.
Fig. 8 is a schematic diagram of a computer device running a method for partitioning a database table of mainframe DB2 according to an embodiment of the present invention.
Fig. 9 is a schematic diagram of a database table partitioning apparatus of mainframe DB2 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 is a schematic diagram of a method for partitioning a database table of a mainframe DB2 according to an embodiment of the present invention, and as shown in fig. 1, an embodiment of the present invention provides a method for partitioning a database table of a mainframe DB2, which implements automated batch generation of partition statements to partition the database table of a DB2, and includes:
step 101: configuring a table partition parameter file and a batch job file according to the database table partition requirement of the DB 2;
step 102: executing REXX script programs in batches by using batch job files, customizing tables under PDS in a DB2 database according to the table partitioning parameter files, and determining partitioning statements;
step 103: the DB2 database tables are partitioned according to the partition statements.
The embodiment of the invention provides a method for partitioning a database table of a DB2 mainframe, which comprises the steps of firstly, configuring a table partitioning parameter file and a batch job file according to the partitioning requirement of a DB2 database table; then, executing REXX script programs in batches by using batch job files, customizing the tables under PDS in the DB2 database according to the table partition parameter files, and determining partition statements; finally, the DB2 database tables are partitioned according to the partition statements. The method calls the REXX script program by utilizing the characteristic of flexible configuration of the REXX language, configures the table partition parameter file and the batch operation file according to the specific DB2 table partition requirement, and automatically generates the partition statements of the DB2 database table in batch.
The REXX (Restructured Extended execution) script refers to a script implemented by a programming language developed by IBM in the 1980 s. Its interpreter or compiler is found primarily on IBM's Mainframe Computer (Mainframe Computer), and also on VSE, VM, OS/400, AIX, OS/2, and other IBM platforms. Under a z/os operating system of a mainframe, the REXX script is an interpretive language, can be directly operated in a command line without compiling or can be called and operated in JCL through a special member (script), and the variable of the REXX can be directly used without being defined in advance, so that the method is simple and convenient and has rich text character processing functions. The DB2 database tabletization script partition DDL statements have a specific format, and REXX can be used for realizing the batch generation of partition statements of tables according to specific requirements in a z/os operating system (TSO) environment.
DB2(DATABASE 2) is a set of relational DATABASE management systems developed by IBM corporation of America, whose main operating environments are UNIX (including IBM's own AIX), Linux, IBM i (formerly OS/400), z/OS, and Windows server versions. The DB2 is mainly applied to large application systems, has good scalability, can support environments from mainframes to single users, and is applied to all common server operating system platforms. DB2 provides a high level of data utilization, integrity, security, recoverability, and execution capabilities for small-to large-scale applications, with platform-independent basic functions and SQL commands. DB2 employs data staging techniques to facilitate the downloading of mainframe data to a LAN database server, to allow client/server users and LAN-based applications to access mainframe data, and to make database localization and remote connections transparent. DB2 is known to have a very complete query optimizer, whose external connections improve query performance and support multitask parallel queries. The DB2 has good network support capability, each subsystem can be connected with hundreds of thousands of distributed users, thousands of active threads can be activated simultaneously, and the method is particularly suitable for large-scale distributed application systems.
DB2 DDL: DDL-Data Definition Language, DB2DDL (DB2 database Data Definition Language) DB2 database, SQL statements for CREATE, ALTER, DROP, table spaces/tables.
A PDS (Partitioned Data Set) for partitioning Data sets in a database into sequentially organized members (members), each of which may have one or more members, each Member having a unique name, stored as part of the Data Set in an address directory. The partitioned data set can be understood as a "folder" in a PC, multiple members can be stored inside the partitioned data set, the members can store data or source codes, the members are also similar to "text files" on the PC, and the members can be script files in the embodiment of the present invention.
In order to realize automatic batch generation of partition statements for partitioning a database table of the DB2, an embodiment of the present invention provides a method for partitioning a database table of a mainframe DB2, which may include:
configuring a table partition parameter file and a batch job file according to the database table partition requirement of the DB 2;
executing REXX script programs in batches by using batch job files, customizing tables under PDS in a DB2 database according to the table partitioning parameter files, and determining partitioning statements;
the DB2 database tables are partitioned according to the partition statements.
In a specific implementation of the method for partitioning the database table of the mainframe DB2 according to the embodiment of the present invention, in an embodiment, the table partitioning parameter file includes: a daily schedule list parameter file DTABPART, a night schedule list parameter file NTABPART, an account number partition parameter file PARTACCT, a client number partition parameter file PARTCUST and a special schedule partition parameter file PARTPARM;
configuring a table partition parameter file according to the DB2 database table partition requirement, comprising: and configuring a daily table list parameter file, a night table list parameter file, an account number partition parameter file, a client number partition parameter file and a special table partition parameter file according to the database table partition requirements.
The REXX language is a very high-level scripting language with a particularly powerful tool for text processing tasks, which contains a richer set of built-in control structures and (text processing) functions. Specifically, as shown in table 1, the following units may be included:
TABLE 1
Figure BDA0002637818120000051
Figure BDA0002637818120000061
In an example of the embodiment of the present invention, the first partition dimension of the table is a bank number, and the second partition dimension is an account number or a customer number or other special fields. DTABPART, NTABPART, PARTACCT, PARTCUST and PARTPARM are table partition parameter files and are called in a batch job file JCHGDDL 2.
Fig. 2 is a schematic diagram of a schedule list parameter file of a method for partitioning a database table of a mainframe DB2 according to an embodiment of the present invention, as shown in fig. 2, there are 4 columns of data in total, and the schedule list parameter file DTABPART mainly includes:
column 1: a table name;
column 2: a table partition field;
column 3: the number of table partitions (the priority is PARTPARRM) of each bank is 1 for all rows, 2 for all rows and 1-2 for the number of partitions of each row, which is the number of partitions of the corresponding row set in PARTACCT/PARTCUST;
column 4: if the number of the table partitions of each bank is ACCT and CUST, the number and the mode of the table partitions of each bank are subject to the contents in parameter files PARTACCT and PARTCUST; if the table is MAXVALUE, the table partition mode of each bank is represented as ENDING AT ('Bank number', MAXVALUE); if PTID, and ACSP indicate that the table for each bank contains 10 partitions.
The schedule list parameter file NTABPART is generally specified as being partitioned according to the bank number only, and each bank number includes one partition (except TFIO and AFIO, each bank includes 10 partitions), and the schedule list parameter file DTABPART can be referred to in specific implementation.
Fig. 3 is a schematic diagram of an account partition parameter file of a method for partitioning a database table of a mainframe DB2 according to an embodiment of the present invention, where as shown in fig. 3, the account partition parameter file paratacct mainly includes:
column 1: a bank number;
column 2: the number of partitions;
column 3: the initial number of the account number;
column 4: an account number end number;
other columns: and (4) partitioning. The general account leaves 500 ten thousand segments for the first partition and the second partition to MAXVALUE (consistent with asia-pacific batches), as the case may be.
Fig. 4 is a schematic diagram of a client number partition parameter file of a method for partitioning a database table of a mainframe DB2 according to an embodiment of the present invention, as shown in fig. 4, the client number partition parameter file parcstart mainly includes:
column 1: a bank number;
column 2: the number of partitions;
column 3: a customer number start number;
column 4: a customer number end number;
other columns: and (4) partitioning. Typically, the first partition of the customer number leaves 300 ten thousand segments and the second partition to MAXVALUE (consistent with the asia-pacific lot), as the case may be.
Fig. 5 is a schematic diagram of a special table partition parameter file of a database table partitioning method of a mainframe DB2 according to an embodiment of the present invention, as shown in fig. 5, the special table partition parameter file PARTPARM mainly includes:
column 1: a bank number;
column 2: a table name;
column 3: the number of partitions;
column 4: equally dividing according to the subarea interval without filling; fill-in formats are exemplified, as 5: 1000000 or 5-9: 1000000, representing a step size of 1000000 per zone for the 5 th partition or the 5 th to 9 th partitions, respectively.
The special table partition parameter file PARTPARM specifies the partition mode of a specific bank and a table, and has the highest priority.
In a specific implementation of the method for partitioning the database table of the mainframe DB2 according to the embodiment of the present invention, in an embodiment, the foregoing executing an REXX script program in batch by using a batch job file, customizing the table under the PDS in the DB2 database according to a table partitioning parameter file, and determining the partitioning statement includes:
calling an REXX script program by using the batch operation file, and setting the batch operation times of the REXX script program;
reading the table partition parameter file, executing an REXX script program in batches according to the batch operation times, performing incremental customization or full customization on the table under the PDS in the DB2 database, and determining partition statements.
Fig. 6 is an example of a batch job file program of a method for partitioning a database table of a mainframe DB2 according to an embodiment of the present invention, where PRDOCS and PRD are prefixes of alias/alias of a target environment, F302359 is a time label of a standard version package (i.e., a second string of a PDS name extracted from the version package), and if full customization is performed on the target environment, a TFLAG parameter may be left blank. Fig. 7 is a schematic diagram of a partition statement of a method for partitioning a database table of a mainframe DB2 according to an embodiment of the present invention, as shown in fig. 7, a batch job file is used to execute an REXX script program in batch, a table under a PDS in a DB2 database is customized according to a table partition parameter file, and a partition statement is determined, which may include:
calling an REXX script program by using the batch operation file, and setting the batch operation times of the REXX script program; the batch operation can realize automatic batch generation of partition statements under the unattended condition, and can also be operated according to the set batch operation times in the monitoring mode.
Reading the table partition parameter file, executing an REXX script program in batches according to the batch operation times, performing incremental customization or full customization on the table under the PDS in the DB2 database, and determining partition statements.
According to the embodiment, the generation of the database partition statements can be realized in batch only by simply configuring the table partition parameter file and the batch job file and submitting one JCL job, so that the configuration is flexible and the operation is convenient. On the premise that the parameters are matched, the generation and replacement of the database partition statements can be automatically realized, so that the automatic partition of the DB2 database table is realized. "PARTITION BY (INST _, CUTONMER _ NO) (…)" in FIG. 7 is a partition statement customized and generated with one of DB2 tables CHAA.
In a specific implementation of the method for partitioning the database table of the mainframe DB2 according to the embodiment of the present invention, in an embodiment, the priority of the schedule list parameter file, the priority of the night list parameter file, the priority of the account partition parameter file, and the priority of the client partition parameter file are the same, and the priority of the special table partition parameter file is higher than that of the other four table partition parameter files;
the reading table partition parameter file comprises:
and scanning the table partition parameter file, if the special table partition parameter file exists, reading the special table partition parameter file, and then sequentially reading the other four table partition parameter files.
In the embodiment, the priority of the special table partition parameter file is the highest, when the special table partition parameter file exists, the special table partition parameter file needs to be read first, then the other four table partition parameter files need to be read sequentially, and when the special table partition parameter file does not exist, the daily table list parameter file, the night table list parameter file, the account partition parameter file and the client number partition parameter file in the table partition parameter file are read sequentially.
In an embodiment, the specific implementation of the REXX main program unit CHGDDL2 includes the following steps:
1) when executed, the method incrementally customizes all tables under PDS of prdocs.f302359.com.db2ddl.prm, or fully customizes all tables under PDS named prdocs.com.db2ddl.prm.
2) For each table, the partition type is confirmed in the day table parameter DTABPART, and the partition type is also confirmed in the night table NTABPART.
3) For the account number partition type, reading a PARTACCT parameter file for customization
4) For the client number partition type, reading PARTCUST parameter file for customization
5) Reading the PARTCUST parameter file, if the table exists in this file, its priority will be higher than 3)4), will be customized with the PARTCUST parameter.
6) In one table, all rows will be customized.
The embodiment of the invention can also comprise:
1) backup original library (increment) × prdocs.f 302359.com.db2ddl.prm/(full) × prdocs.com.db2ddl.prm
2) The submission job prdocs.sysa.maint.cntl.utl (JCHGDDL2) incrementally customizes PDS named prdocs.f302359.com.db2ddl.prm or fully customizes PDS named prdocs.com.db2ddl.prm.
Fig. 8 is a schematic diagram of a computer apparatus for executing a method for partitioning a database table of a mainframe DB2 according to an embodiment of the present invention, as shown in fig. 8, an embodiment of the present invention further provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for partitioning a database table of a mainframe DB2 when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for implementing the method for partitioning the database table of the mainframe DB2 is stored in the computer-readable storage medium.
The embodiment of the invention also provides a database table partitioning device of the mainframe DB2, which is described in the following embodiment. Because the principle of the device for solving the problems is similar to the method for partitioning the database table of the mainframe DB2, the implementation of the device can refer to the implementation of the method for partitioning the database table of the mainframe DB2, and repeated details are omitted.
Fig. 9 is a schematic diagram of a database table partitioning apparatus of a mainframe DB2 according to an embodiment of the present invention, and as shown in fig. 9, an embodiment of the present invention further provides a database table partitioning apparatus of a mainframe DB2, which may include:
the parameter configuration module 901 is used for configuring a table partition parameter file and a batch job file according to the database table partition requirement of the DB 2;
a partition statement determining module 902, configured to execute the REXX script program in batches by using the batch job file, and customize a table in the PDS in the DB2 database according to the table partition parameter file to determine a partition statement;
and the partitioning module 903 is used for partitioning the DB2 database table according to the partitioning statement.
In an embodiment of the present invention, when the apparatus for partitioning a database table of the mainframe DB2 provided in the embodiment of the present invention is implemented specifically, the table partitioning parameter file includes: a day table list parameter file, a night table list parameter file, an account number partition parameter file, a client number partition parameter file and a special table partition parameter file;
the parameter configuration module is specifically configured to: and configuring a daily table list parameter file, a night table list parameter file, an account number partition parameter file, a client number partition parameter file and a special table partition parameter file according to the database table partition requirements.
In an embodiment of the specific implementation of the apparatus for partitioning a database table of the mainframe DB2 according to the embodiment of the present invention, the partition statement determining module is specifically configured to:
calling an REXX script program by using the batch operation file, and setting the batch operation times of the REXX script program;
reading the table partition parameter file, executing an REXX script program in batches according to the batch operation times, performing incremental customization or full customization on the table under the PDS in the DB2 database, and determining partition statements.
In a specific implementation of the database table partitioning device of the mainframe DB2 according to the embodiment of the present invention, in an embodiment, the priority of the schedule list parameter file, the priority of the night list parameter file, the priority of the account partition parameter file, and the priority of the client partition parameter file are the same, and the priority of the special table partition parameter file is higher than that of the other four table partition parameter files;
the partition statement determination module is further configured to:
and scanning the table partition parameter file, if the special table partition parameter file exists, reading the special table partition parameter file, and then sequentially reading the other four table partition parameter files.
To sum up, according to the method and the device for partitioning the database table of the mainframe DB2 provided by the embodiments of the present invention, firstly, a table partitioning parameter file and a batch job file are configured according to the database table partitioning requirement of the DB 2; then, executing REXX script programs in batches by using batch job files, customizing the tables under PDS in the DB2 database according to the table partition parameter files, and determining partition statements; finally, the DB2 database tables are partitioned according to the partition statements. The method calls the REXX script program by utilizing the characteristic of flexible configuration of the REXX language, configures the table partition parameter file and the batch operation file according to the specific DB2 table partition requirement, and automatically generates the partition statements of the DB2 database table in batch. The actual user only needs to configure the parameter file simply according to the requirement, and only submits one JCL job to realize the generation of the database partition statements in batch. Under the premise that the parameters are matched, the generation and replacement operation of the database partition statements can be automatically realized.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A mainframe DB2 database table partitioning method, comprising:
configuring a table partition parameter file and a batch job file according to the database table partition requirement of the DB 2;
executing REXX script programs in batches by using batch job files, customizing tables under PDS in a DB2 database according to the table partitioning parameter files, and determining partitioning statements;
the DB2 database tables are partitioned according to the partition statements.
2. The method of claim 1, wherein the table partitions the parameter file, comprising: a day table list parameter file, a night table list parameter file, an account number partition parameter file, a client number partition parameter file and a special table partition parameter file;
configuring a table partition parameter file according to the DB2 database table partition requirement, comprising: and configuring a daily table list parameter file, a night table list parameter file, an account number partition parameter file, a client number partition parameter file and a special table partition parameter file according to the database table partition requirements.
3. The method of claim 2, wherein bulk executing the REXX script program using the bulk job file to customize the tables under PDS in the DB2 database according to the table partitioning parameter file, determining the partition statements, comprises:
calling an REXX script program by using the batch operation file, and setting the batch operation times of the REXX script program;
reading the table partition parameter file, executing an REXX script program in batches according to the batch operation times, performing incremental customization or full customization on the table under the PDS in the DB2 database, and determining partition statements.
4. The method of claim 3, wherein the priority of the daily schedule listing parameter file, the night schedule listing parameter file, the account number partition parameter file and the client number partition parameter file is the same, and the priority of the special table partition parameter file is higher than that of the other four table partition parameter files;
the reading table partition parameter file comprises:
and scanning the table partition parameter file, if the special table partition parameter file exists, reading the special table partition parameter file, and then sequentially reading the other four table partition parameter files.
5. A mainframe DB2 database table partitioning apparatus, comprising:
the parameter configuration module is used for configuring a table partition parameter file and a batch job file according to the database table partition requirement of the DB 2;
the partition statement determination module is used for executing REXX script programs in batches by using batch job files, customizing the tables under PDS in the DB2 database according to the table partition parameter files and determining partition statements;
and the partitioning module is used for partitioning the DB2 database table according to the partitioning statement.
6. The apparatus of claim 5, wherein the table partitions the parameter file, comprising: a day table list parameter file, a night table list parameter file, an account number partition parameter file, a client number partition parameter file and a special table partition parameter file;
a parameter configuration module specifically configured to: and configuring a daily table list parameter file, a night table list parameter file, an account number partition parameter file, a client number partition parameter file and a special table partition parameter file according to the database table partition requirements.
7. The apparatus of claim 6, wherein the partition statement determination module is specifically configured to:
calling an REXX script program by using the batch operation file, and setting the batch operation times of the REXX script program;
reading the table partition parameter file, executing an REXX script program in batches according to the batch operation times, performing incremental customization or full customization on the table under the PDS in the DB2 database, and determining partition statements.
8. The apparatus of claim 7, wherein the priority of the daily schedule listing parameter file, the night schedule listing parameter file, the account number partition parameter file, and the customer number partition parameter file is the same, and the priority of the special table partition parameter file is higher than the priority of the other four table partition parameter files;
a partition statement determination module further configured to:
and scanning the table partition parameter file, if the special table partition parameter file exists, reading the special table partition parameter file, and then sequentially reading the other four table partition parameter files.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing a method according to any one of claims 1 to 4.
CN202010830612.9A 2020-08-18 2020-08-18 Mainframe DB2 database table partitioning method and device Active CN111966687B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010830612.9A CN111966687B (en) 2020-08-18 2020-08-18 Mainframe DB2 database table partitioning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010830612.9A CN111966687B (en) 2020-08-18 2020-08-18 Mainframe DB2 database table partitioning method and device

Publications (2)

Publication Number Publication Date
CN111966687A true CN111966687A (en) 2020-11-20
CN111966687B CN111966687B (en) 2024-04-16

Family

ID=73387830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010830612.9A Active CN111966687B (en) 2020-08-18 2020-08-18 Mainframe DB2 database table partitioning method and device

Country Status (1)

Country Link
CN (1) CN111966687B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094185A (en) * 2021-04-13 2021-07-09 中国工商银行股份有限公司 Method and device for detecting parallel data processing abnormity of database batch program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100030793A1 (en) * 2008-07-31 2010-02-04 Yahoo! Inc. System and method for loading records into a partitioned database table
CN107943692A (en) * 2017-11-17 2018-04-20 中国银行股份有限公司 The automatic test approach and device that a kind of batch original table passes down
CN108897873A (en) * 2018-07-03 2018-11-27 中国银行股份有限公司 A kind of method, apparatus, storage medium and processor generating job file
CN109814852A (en) * 2019-01-12 2019-05-28 西北工业大学 A partition configuration method for a partitioned real-time operating system
CN109977157A (en) * 2019-02-27 2019-07-05 深圳点猫科技有限公司 A kind of method and electronic equipment importing data to target directory based on data platform
CN110515969A (en) * 2019-07-08 2019-11-29 中国平安人寿保险股份有限公司 Data query processing method, electronic device, computer equipment and storage medium
CN111125064A (en) * 2019-12-24 2020-05-08 中国建设银行股份有限公司 Method and device for generating database mode definition statement

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100030793A1 (en) * 2008-07-31 2010-02-04 Yahoo! Inc. System and method for loading records into a partitioned database table
CN107943692A (en) * 2017-11-17 2018-04-20 中国银行股份有限公司 The automatic test approach and device that a kind of batch original table passes down
CN108897873A (en) * 2018-07-03 2018-11-27 中国银行股份有限公司 A kind of method, apparatus, storage medium and processor generating job file
CN109814852A (en) * 2019-01-12 2019-05-28 西北工业大学 A partition configuration method for a partitioned real-time operating system
CN109977157A (en) * 2019-02-27 2019-07-05 深圳点猫科技有限公司 A kind of method and electronic equipment importing data to target directory based on data platform
CN110515969A (en) * 2019-07-08 2019-11-29 中国平安人寿保险股份有限公司 Data query processing method, electronic device, computer equipment and storage medium
CN111125064A (en) * 2019-12-24 2020-05-08 中国建设银行股份有限公司 Method and device for generating database mode definition statement

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴小欣;: "Oracle数据库的优化", 电子技术与软件工程, no. 12, 27 June 2018 (2018-06-27), pages 182 - 183 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094185A (en) * 2021-04-13 2021-07-09 中国工商银行股份有限公司 Method and device for detecting parallel data processing abnormity of database batch program

Also Published As

Publication number Publication date
CN111966687B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
US11599337B2 (en) Dataflow graph configuration
US8484638B2 (en) Infrastructure for the automation of the assembly of schema maintenance scripts
US5678044A (en) System and method for improved rehosting of software systems
US20070245332A1 (en) Method and apparatus to perform an application software migration
US10726040B2 (en) Lossless conversion of database tables between formats
US20170242667A1 (en) Software development tool using a workflow pattern that describes software applications
US8244780B1 (en) Parameter oriented automated database command
CN112699055B (en) Software automatic test method and system with lower maintenance cost
CN114780641B (en) Multi-library multi-table synchronization method, device, computer equipment and storage medium
CN111897794A (en) Database maintenance method, device, electronic device and storage medium
CN111367894A (en) Data comparison method and device based on database migration
CN111966687A (en) Method and device for partitioning database table of mainframe DB2
US7464095B2 (en) Adaptive data architecture for information management systems
US7797334B2 (en) Automated downloading from mainframe to local area network
CN115809070A (en) Method for mixed application of object storage in private cloud and big data cluster
US8296336B2 (en) Techniques for efficient dataloads into partitioned tables using swap tables
US20090177705A1 (en) System and method for using generic utilities to perform database utilities on mainframe operated DB2 databases
RU2683690C1 (en) Method and system for automatic generation of a program code for an enterprise data warehouse
CN116578650A (en) Data synchronization method, device, computer equipment and storage medium
CN118151964A (en) Centralized management product upgrading method and system and electronic equipment
CN115840741A (en) Visual traceable mass data interaction system and method in security core trading system based on distributed database
Creech et al. Using SAS/CONNECT and SAS/ACCESS Software to Access Data in a Distributed Environment
Mehine Large Scale Data Analysis Using Apache Pig
Xue SQL Engines for Big Data Analytics
Leonard et al. Loading a PDW Region in APS

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant