Database Configuration Information Collection Method, Device, Computer Equipment and Storage Medium

Through the automated processing of management scripts and information collection scripts, the problems of low and incomplete database configuration information collection efficiency are solved, and efficient database operation and maintenance support and multi-dimensional analysis and display are realized.

CN113094088BActive Publication Date: 2025-07-11CHINA CONSTRUCTION BANK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110405187.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-15
Publication Date
2025-07-11
Estimated Expiration
2041-04-15

AI Technical Summary

Technical Problem

In the prior art, database configuration information collection efficiency is low and incomplete, and it is impossible to efficiently support database operation and maintenance.

Method used

By running pre-set management scripts, obtain basic database information, configure the operating environment for the information collection script, analyze and pass the running parameters to the information collection script, call the information collection script to collect database configuration information, and support multi-dimensional analysis and display.

Benefits of technology

It improves the efficiency of database configuration information collection, avoids incomplete problems, realizes multi-dimensional and comprehensive analysis and display, and supports database operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113094088B_ABST
    Figure CN113094088B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, computer equipment and storage medium for collecting database configuration information, which supports the new version 19c of the oracle database. The basic information of the database obtained by running a pre-set management script is used to configure the operating environment for a pre-set information collection script; the running parameters of the database configuration information collection instruction are parsed and the parsed running parameters are passed to the information collection script, and the running parameters at least include a target configuration class in at least one pre-set configuration class; the information collection script is called to collect the configuration information of the database in the target configuration class. Based on the present invention, the efficiency of collecting database configuration information can be improved, and the situation that the collection of database configuration information is incomplete due to manual collection by staff and data support cannot be provided efficiently for database operation and maintenance can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database operation and maintenance, and particularly to a method, device, computer device and storage medium for collecting database configuration information. Background Art

[0002] In the field of database operation and maintenance, database configuration information is the underlying basic data for database operation and maintenance, and can provide data support for other operation and maintenance links. Therefore, the collection of database configuration information is a crucial link in the database operation and maintenance process.

[0003] In the prior art, database configuration information is usually collected manually by staff. This method of manually collecting database configuration information not only has low efficiency in collecting database configuration information, but also may result in incomplete collection of database configuration information and inability to provide data support for database operation and maintenance efficiently. Summary of the Invention

[0004] In view of this, the present application provides a method, device, computer device and storage medium for collecting database configuration information to improve the efficiency of collecting database configuration information and avoid the situation of incomplete collection of database configuration information and inability to provide data support for database operation and maintenance efficiently caused by manually collecting database configuration information by staff. The technical solutions are as follows:

[0005] The first aspect of the present invention discloses a method for collecting database configuration information, including:

[0006] Running a pre-set management script to obtain basic database information, and configuring a running environment for a pre-set information collection script according to the obtained basic database information;

[0007] Analyzing the running parameters of the database configuration information collection instruction and passing the analyzed running parameters to the information collection script, where the running parameters at least include a target configuration class in at least one pre-set configuration class;

[0008] Invoking the information collection script to collect the configuration information of the database in the target configuration class;

[0009] Among them, the management script is generated using the shell scripting language, and the information collection script is generated using the perl scripting language.

[0010] Optionally, running a pre-set management script to obtain basic database information, and configuring a running environment for a pre-set information collection script according to the obtained basic database information includes:

[0011] Running a pre-set management script to determine the database process;

[0012] Read the basic database information according to the database process, where the basic database information includes database username, database process ID, database process name, database script name, script path, database instance type, database home directory, database SID, and database perl version;

[0013] Configure the running environment for a pre-set information collection script using the basic database information.

[0014] Optionally, parsing the running parameters of the information collection script and passing the parsed running parameters to the information collection script includes:

[0015] Parse the database configuration information collection instruction to obtain the target configuration class that the database configuration information collection instruction needs to collect;

[0016] Pass the target configuration class to the information collection script.

[0017] Optionally, calling the information collection script to collect the configuration information of the database for the target configuration class includes:

[0018] Obtain a pre-set index identifier corresponding to the target configuration class, add it to the queue to be collected, and synchronously prepare the collection instruction corresponding to the target configuration class;

[0019] Sequentially obtain the index identifiers of the target configuration class from the queue to be collected, execute the collection instruction corresponding to the target configuration class according to the index identifier, and collect the configuration information of the database for the target configuration class. The target configuration class can be one or more or even all configuration classes, and the configuration information of the database for the target configuration class includes the configuration information of each configuration item of the database in the target configuration class.

[0020] Optionally, it further includes:

[0021] Store the configuration information of the database for the target configuration class in the target path indicated by the management script.

[0022] Optionally, it further includes:

[0023] Display a database configuration information query interface, where the database configuration information query interface includes three-dimensional information for the user to select;

[0024] Receive the user's selection operation on the target dimensional information among the three-dimensional information, and display a detailed information query interface related to the target dimensional information. The detailed information query interface consists of at least one parameter item;

[0025] In response to a user's operation of setting a parameter value for a target parameter item among at least one parameter item in the detailed information query interface, query and display target configuration information that matches the parameter value from the configuration information.

[0026] Optionally, the three-dimensional information includes host dimension information, configuration item dimension information, and statistical dimension information.

[0027] A second aspect of the present invention discloses a database configuration information collection device, including:

[0028] A configuration unit, configured to run a pre-set management script to obtain basic database information, and configure a running environment for a pre-set information collection script according to the obtained basic database information;

[0029] An analysis unit, configured to analyze the running parameters of a database configuration information collection instruction and pass the analyzed running parameters to the information collection script, where the running parameters at least include a target configuration class in at least one pre-set configuration class;

[0030] A collection unit, configured to call the information collection script to collect the configuration information of the database in the target configuration class;

[0031] Among them, the management script is generated using the shell script language, and the information collection script is generated using the perl script language.

[0032] A third aspect of the present invention discloses a computer device, including: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, and the program is used to implement the database configuration information collection method disclosed in any one of the first aspects of the present invention as described above.

[0033] A fourth aspect of the present invention discloses a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are used for the database configuration information collection method disclosed in any one of the first aspects of the present invention as described above.

[0034] The present invention provides a method, apparatus, computer device and storage medium for collecting database configuration information. The basic information of the database obtained by running a pre-set management script is used to configure the operating environment for a pre-set information collection script. The operating parameters of the database configuration information collection instruction sent by the user are parsed and the parsed operating parameters are passed to the information collection script, so as to call the information collection script to collect the configuration information of the database in the target configuration class. Different from the prior art where the database configuration information is collected manually by staff, it not only improves the efficiency of collecting database configuration information, avoids the situation that the collection of database configuration information is incomplete and cannot provide data support for database operation and maintenance efficiently caused by manual collection of database configuration information by staff, but also can perform multi-dimensional and all-round analysis and display of the collected configuration information. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.

[0036] Figure 1 It is a schematic flowchart of a method for collecting database configuration information provided by an embodiment of the present invention;

[0037] Figure 2 It is a schematic flowchart of a method for obtaining the basic information of data by running a pre-set management script and configuring the operating environment for a pre-set information collection script provided by an embodiment of the present invention;

[0038] Figure 3 It is a schematic flowchart of a method for displaying database configuration information provided by an embodiment of the present invention;

[0039] Figure 4 It is a design diagram of an information query interface provided by an embodiment of the present invention;

[0040] Figure 5 It is a schematic structural diagram of a device for collecting database configuration information provided by an embodiment of the present invention;

[0041] Figure 6 It is a schematic structural diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0043] In this application, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0044] Database configuration information refers to all the setting contents of database software.

[0045] The management and maintenance of database configuration information means: defining and controlling database configuration metrics, maintaining the history, plan and current status of the configuration metrics, and ensuring the integrity and stability of the database configuration information.

[0046] In the prior art, usually, staff manually query and obtain the configuration information of each configuration item in the database one by one, and then the staff analyze and display the obtained configuration information in sequence. However, the collection efficiency of this database configuration information is low, and it is possible that only part of the configuration information is collected; the function of the staff analyzing and displaying the obtained configuration information in sequence is single, and the obtained configuration information is not analyzed and displayed in multiple dimensions and comprehensively.

[0047] Therefore, the present invention provides a method, device, computer device and storage medium for collecting database configuration information, which can not only improve the collection efficiency of database configuration information, avoid the situation that the collection of database configuration information is incomplete due to manual collection of database configuration information by staff and cannot provide data support for database operation and maintenance efficiently, but also analyze and display the collected configuration information in multiple dimensions and comprehensively.

[0048] See Figure 1 , which shows a schematic flow chart of a method for collecting database configuration information provided by an embodiment of the present invention, supports the new version 19c of the oracle database. In addition, this method supports the collection of all instances of the database, such as multiple database instances and ASM instances. The method specifically includes the following steps:

[0049] S101: Run the pre - set management script to obtain the basic database information, and configure the running environment for the pre - set information collection script according to the obtained basic database information;

[0050] See Figure 2 , which shows a method for running a pre - set management script to obtain the basic data information and configure the running environment for the pre - set information collection script provided by an embodiment of the present invention. The method specifically includes the following steps:

[0051] S201: Run the pre - set management script to determine the database process;

[0052] In the embodiment of the present application, the management script can be generated by the shell scripting language, and then the database process can be determined by running the generated management script. Among them, the database process can be the database pmon process.

[0053] S202: Read the basic database information according to the database process;

[0054] In the embodiment of the present application, after running the pre - set management script to determine the database process, read the basic database information according to the determined database process; among them, the basic database information includes the database user name, database process number, database process name, database script name, script path, database instance type, database home directory, database SID, and database perl version.

[0055] In the embodiment of the present application, if the determined database process is the database pmon process, the read database process number is the database pmon process number, and the read database process name is the database pmon process name.

[0056] S203: Use the basic database information to configure the running environment for the pre - set information collection script.

[0057] In the embodiment of the present application, after reading the basic database information according to the database process, use the read basic database information to configure the running environment for the pre - set information collection script.

[0058] S102: Analyze the running parameters of the database configuration information collection instruction and pass the parsed running parameters to the information collection script. The running parameters at least include the target configuration class in at least one pre - set configuration class;

[0059] In an embodiment of the present application, after the user determines the configuration class to be collected, a database configuration information collection instruction is sent. The database configuration information collection instruction carries the configuration class that the user wants to collect (for the convenience of distinction, the configuration class carried in the database configuration information is called the target configuration class). After configuring the operating environment for the pre-set information collection script according to the obtained basic database information, the received database configuration information collection instruction sent by the user is parsed to obtain the target configuration class carried in the database configuration information, and then the target configuration class is passed to the information collection script.

[0060] In an embodiment of the present application, the target configuration class carried in the database configuration information collection instruction can be one or more or even all configuration classes, and the configuration information of the database in the target configuration class includes the configuration information of each configuration item in the target configuration class of the database. For example, if the target configuration class is a cluster, the configuration information of the target configuration class (cluster) includes the configuration information of each configuration item (cluster information, cluster status) in the target configuration class (cluster) of the database.

[0061] In an embodiment of the present application, through a comprehensive analysis of database operation and maintenance metrics, it is determined that the overall configuration collection scope of the database includes 14 configuration classes and 47 configuration items; these 47 configuration items cover all aspects of the database operation and maintenance link, achieving comprehensive management of configuration information and providing comprehensive configuration data support for other database operation and maintenance links. Among them, the specific information of the 14 configuration classes and 47 configuration items included in the overall configuration collection scope of the database is shown in Table 1.

[0062] Table 1

[0063]

[0064]

[0065]

[0066] S103: Call the information collection script to collect the configuration information of the database in the target configuration class.

[0067] In an embodiment of the present application, for each of at least one configuration class, an index identifier corresponding to the configuration class is pre-set. After passing the target configuration class to the information collection script, the information collection script is called to obtain the pre-set index identifier corresponding to the target configuration class, and the obtained index identifier is added to the queue to be collected and the collection instruction corresponding to the target configuration class is synchronized and prepared; the index identifier of the target configuration class is sequentially obtained from the queue to be collected, so as to execute the collection instruction corresponding to the target configuration class according to the index identifier, and then collect the configuration information of the database in the target configuration class.

[0068] In the embodiment of the present application, during the process of invoking the information collection script, by monitoring the execution status of the information collection script, repeated execution of the information collection script is avoided, and the pressure on the database is avoided.

[0069] Furthermore, in the embodiment of the present application, the configuration information of the database in the target configuration class can be stored in advance in the target path indicated by the management script, so as to facilitate the centralized storage and display of the subsequent configuration information.

[0070] The present invention provides a method for collecting database configuration information. The operating environment is configured for a preset information collection specimen according to the basic information of the database obtained by running a preset management script, the running parameters of the database configuration information collection instruction sent by the user are parsed, and the parsed running parameters are passed to the information collection script, so as to call the information collection script to collect the configuration information of the database in the target configuration class. Different from the prior art where the database configuration information is collected manually by staff, it not only improves the efficiency of collecting database configuration information, avoids the situation that the collection of database configuration information is incomplete and cannot provide data support for database operation and maintenance efficiently caused by manual collection of database configuration information by staff, but also can perform multi-dimensional and all-round analysis and display of the collected configuration information.

[0071] Furthermore, on the basis of the method for collecting database configuration information provided in the above embodiment of the present invention, as Figure 3 shown, the following steps are further included:

[0072] S301: Display the database configuration information query interface;

[0073] In the embodiment of the present application, the database configuration information query interface includes three-dimensional information for users to select. Among them, the three-dimensional information included in the database configuration information query interface includes host-dimensional information, configuration item-dimensional information, and statistical-dimensional information.

[0074] In the embodiment of the present application, the main points of concern for configuration information analysis mainly include the configuration information of a certain machine; the setting situation of a certain configuration item; and the statistics of information that meets certain machine conditions and configuration conditions. For the above points of concern, three-dimensional information is set in combination with the collected configuration information, namely host-dimensional information, configuration item-dimensional information, and statistical-dimensional information. Among them, the host-dimensional information displays the configuration information of a certain machine, and the full amount and partial configuration information of the machine can be seen from the host-dimensional information; the configuration item-dimensional information displays the specific configuration information of the host and instances, and the specified configuration class, configuration item, and configuration index can be viewed; the statistical-dimensional information displays the statistical results of configuration items that meet certain conditions, and the statistics are displayed for the statistical dimensions concerned by users (such as location, product, use), and the content to be displayed can be specified to streamline the statistical display of configuration information.

[0075] It should be noted that the place can be: the city where the data center is located, such as the data center in Guangzhou area; the product can be: the operating system platform on which the database runs, such as the Linux platform; the use can be: the actual use of the device, such as production equipment, disaster recovery equipment.

[0076] S302: Receive the user's selection operation on the target dimension information among the three dimension information, and display a detailed information query interface related to the target dimension information. The detailed information query interface is composed of at least one parameter item;

[0077] In the embodiment of the present application, by displaying a database configuration information query interface to the user, so that the user can select the dimension information they want to view according to the displayed database configuration information query interface; when receiving the user's selection operation on the target dimension information among the three dimension information in the database configuration information query interface, display a detailed information query interface related to the target dimension information.

[0078] For example, if the target dimension information selected by the user is the host dimension information, display a detailed information query interface related to the host dimension information. The design diagrams of the detailed information query interfaces for different dimensions are as Figure 4 shown.

[0079] S303: Respond to the user's setting operation on the parameter value of the target parameter item among at least one parameter item in the detailed information query interface, and query and display the target configuration information that matches the parameter value from the configuration information.

[0080] In the embodiment of the present application, by displaying a detailed information query interface related to the target dimension information selected by the user, the user can set the parameter value of the target parameter item among at least one parameter item in the detailed information query interface. When detecting the user's setting operation on the parameter value of the target parameter item among at least one parameter item in the detailed information query interface, respond to the operation, and query and display the target configuration information that matches the parameter value from the configuration information.

[0081] In the embodiment of the present application, by displaying a database configuration information query interface including multiple dimension information to the user, so that the user can select the dimension information they want to view from the displayed database configuration query interface, and display a detailed information query interface related to the target dimension information according to the target dimension information selected by the user, so that the user can query the desired parameter item through the displayed detailed information query interface.

[0082] Corresponding to the database configuration information acquisition method provided in the above embodiment of the present invention, the embodiment of the present invention also discloses a database configuration information acquisition device, as Figure 5 shown. The database configuration information acquisition device includes:

[0083] The configuration unit 51 is used to run a pre-set management script to obtain the basic database information, and configure the running environment for the pre-set information collection script according to the obtained basic database information;

[0084] The parsing unit 52 is used to parse the running parameters of the information collection script and pass the parsed running parameters to the information collection script. The running parameters at least include the target configuration class in at least one pre-set configuration class;

[0085] The collection unit 53 is used to call the information collection script to collect the configuration information of the database in the target configuration class;

[0086] Among them, the management script is generated using the shell script language, and the information collection script is generated using the perl script language.

[0087] For the specific principles and execution processes of each unit in the database configuration information collection device disclosed in the above embodiments of the present invention, they are the same as those of the database configuration information collection method disclosed in the above embodiments of the present invention. For the corresponding parts, reference can be made to the database configuration information collection method disclosed in the above embodiments of the present invention, and details will not be elaborated here.

[0088] The present invention provides a database configuration information collection device. By configuring the running environment for the pre-set information collection script according to the basic database information obtained by running the pre-set management script, parsing the running parameters of the information collection script and passing the parsed running parameters to the information collection script, so as to call the information collection script to collect the configuration information of the database in the target configuration class, unlike the prior art where the database configuration information is collected manually by staff, it not only improves the efficiency of database configuration information collection, avoids the situation that the database configuration information collection is incomplete and cannot provide data support for database operation and maintenance efficiently caused by manual collection of database configuration information by staff, but also can perform multi-dimensional and all-round analysis and display of the collected configuration information.

[0089] In the embodiments of the present application, preferably, the configuration unit includes:

[0090] The first determination unit is used to run a pre-set management script to determine the database process;

[0091] The reading unit is used to read the basic database information according to the database process. The basic database information includes the database user name, database process number, database process name, database script name, script path, database instance type, database home directory, database SID, and database perl version;

[0092] The configuration subunit is used to configure the running environment for the pre-set information collection script using the basic database information.

[0093] In an embodiment of the present application, preferably, the parsing unit includes:

[0094] A first obtaining unit, configured to parse a database configuration information collection instruction and obtain a target configuration class that the database configuration information collection instruction needs to collect;

[0095] A transmission unit, configured to transmit the target configuration class to an information collection script.

[0096] In an embodiment of the present application, preferably, the collection unit includes:

[0097] A second obtaining unit, configured to obtain a pre-set index identifier corresponding to the target configuration class, add it to a queue to be collected, and synchronously prepare a collection instruction corresponding to the target configuration class;

[0098] A collection subunit, configured to sequentially obtain index identifiers of the target configuration class from the queue to be collected, execute a collection instruction corresponding to the target configuration class according to the index identifier, and collect configuration information of the database in the target configuration class. The target configuration class is one or more or even all configuration classes, and the configuration information of the database in the target configuration class includes configuration information of each configuration item in the target configuration class.

[0099] Furthermore, the database configuration information collection device provided in an embodiment of the present application further includes:

[0100] A storage unit, configured to store the configuration information of the database in the target configuration class to a target path indicated by a management script.

[0101] Furthermore, the database configuration information collection device provided in an embodiment of the present application further includes:

[0102] A first display unit, configured to display a database configuration information query interface, and the database configuration information query interface includes three-dimensional information for the user to select;

[0103] A second display unit, configured to receive a selection operation of the user on the target dimensional information among the three-dimensional information, and display a detailed information query interface related to the target dimensional information. The detailed information query interface is composed of at least one parameter item;

[0104] A query unit, configured to respond to a setting operation of a parameter value of a target parameter item among at least one parameter item in the detailed information query interface by the user, and query and display target configuration information that matches the parameter value from the configuration information.

[0105] In an embodiment of the present application, preferably, the three-dimensional information includes host dimensional information, configuration item dimensional information, and statistical dimensional information.

[0106] Taking the application of the database configuration information collection method to a computer device as an example, the hardware structure of the computer device applicable to a database configuration information collection method provided by an embodiment of the present application will be described in detail.

[0107] A database configuration information collection method provided by an embodiment of the present application can be applied to a computer device, and the computer device can be a server.

[0108] Optionally, Figure 6 FIG. shows a hardware structure block diagram of a computer device applicable to a database configuration information collection method provided by an embodiment of the present application. Referring to Figure 6 , the hardware structure of the computer device may include: a processor 61, a memory 62, a communication interface 63, and a communication bus 64;

[0109] In an embodiment of the present invention, the number of the processor 61, the memory 62, the communication interface 63, and the communication bus 64 may all be at least one, and the processor 61, the memory 62, and the communication interface 63 complete mutual communication through the communication bus 64;

[0110] The processor 61 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement an embodiment of the present invention, etc.;

[0111] The memory 62 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0112] Wherein, the memory stores a program, and the processor can call the program stored in the memory. The program is used for:

[0113] Running a pre-set management script to obtain basic database information, and configuring a running environment for a pre-set information collection script according to the obtained basic database information;

[0114] Parsing the running parameters of the information collection script and passing the parsed running parameters to the information collection script. The running parameters at least include a target configuration class in at least one pre-set configuration class;

[0115] Calling the information collection script to collect the configuration information of the database in the target configuration class;

[0116] Wherein, the management script is generated using the shell scripting language, and the information collection script is generated using the perl scripting language.

[0117] For the functions of the relevant program, please refer to the detailed description of a method for collecting database configuration information provided in the embodiments of the present application above, and details will not be repeated here.

[0118] Furthermore, the embodiments of the present application also provide a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are used to execute the above-mentioned method for collecting database configuration information.

[0119] For the specific content of the computer-executable instructions, please refer to the detailed description of a method for collecting database configuration information provided in the embodiments of the present application above, and details will not be repeated here.

[0120] The above has introduced in detail a method, device, computer device and storage medium for collecting database configuration information provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

[0121] It should be noted that the embodiments in this specification are all described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0122] It should also be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements inherent to the process, method, article or device, but also other identical elements inherent to these process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or device including the said element.

[0123] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for collecting database configuration information, characterized in that, Including: Run a pre-set management script to obtain basic database information, and configure the running environment for the pre-set information collection script according to the obtained basic database information; Parse the running parameters of the database configuration information collection instruction sent by the user and pass the parsed running parameters to the information collection script. The running parameters at least include a target configuration class in at least one pre-set configuration class, and the database configuration information collection instruction carries the configuration class to be collected by the user; Call the information collection script to collect the configuration information of the database in the target configuration class; Among them, the management script is generated using the shell scripting language, and the information collection script is generated using the perl scripting language; It also includes: Display a database configuration information query interface, which includes three-dimensional information for the user to select; the three-dimensional information includes host dimension information, configuration item dimension information, and statistical dimension information. The host dimension information displays the configuration information of a certain machine, enabling the user to obtain the full and partial configuration information of the machine from the host dimension information; the configuration item dimension information displays the specific configuration information of the host and instances, enabling the user to obtain the specified configuration class, configuration item, and configuration indicator from the configuration item dimension information; the statistical dimension information displays the statistical results where the configuration items meet certain conditions, conducts statistical displays for the statistical dimensions concerned by the user, and displays the specified content; Receive the selection operation of the user on the target dimension information in the three-dimensional information, and display a detailed information query interface related to the target dimension information. The detailed information query interface consists of at least one parameter item; In response to the user's setting operation on the parameter value of the target parameter item in at least one parameter item in the detailed information query interface, query and display the target configuration information that matches the parameter value from the configuration information.

2. The method according to claim 1, wherein The step of running the pre-set management script to obtain basic database information and configuring the running environment for the pre-set information collection script according to the obtained basic database information includes: Run the pre-set management script to determine the database process; Read the basic database information according to the database process. The basic database information includes database user name, database process number, database process name, database script name, script path, database instance type, database home directory, database SID, and database perl version; Use the basic database information to configure the running environment for the pre-set information collection script.

3. The method according to claim 1, wherein The step of parsing the running parameters of the information collection script sent by the user and passing the parsed running parameters to the information collection script includes: Parse the database configuration information collection instruction to obtain the target configuration class that the database configuration information collection instruction needs to collect; Pass the target configuration class to the information collection script.

4. The method according to claim 1, wherein The step of calling the information collection script to collect the configuration information of the database in the target configuration class includes: Obtain the pre-set index identifier corresponding to the target configuration class, add it to the queue to be collected, and synchronously prepare the collection instruction corresponding to the target configuration class; Sequentially obtain the index identifier of the target configuration class from the to-be-collected queue, execute the collection instruction corresponding to the target configuration class according to the index identifier, and collect the configuration information of the database in the target configuration class. The target configuration class is one or more or even all configuration classes, and the configuration information of the database in the target configuration class includes the configuration information of each configuration item in the target configuration class of the database.

5. The method according to claim 1, wherein It further includes: Store the configuration information of the database in the target configuration class to the target path indicated by the management script.

6. A database configuration information collection device, characterized in that, It includes: A configuration unit for running a pre-set management script to obtain basic database information and configuring a running environment for a pre-set information collection script according to the obtained basic database information; A parsing unit for parsing the running parameters of the database configuration information collection instruction sent by the user and passing the parsed running parameters to the information collection script. The running parameters at least include the target configuration class in at least one pre-set configuration class; A collection unit for calling the information collection script to collect the configuration information of the database in the target configuration class; Among them, the management script is generated using the shell script language, and the information collection script is generated using the perl script language; The database configuration information collection device is further used for: Displaying a database configuration information query interface, which includes three-dimensional information for the user to select; the three-dimensional information includes host dimension information, configuration item dimension information, and statistical dimension information. The host dimension information displays the configuration information of a certain machine, enabling the user to obtain the full and partial configuration information of the machine from the host dimension information; the configuration item dimension information displays the specific configuration information of the host and instances, enabling the user to obtain the specified configuration class, configuration item, and configuration indicator from the configuration item dimension information; the statistical dimension information displays the statistical results where the configuration items meet certain conditions, conducts statistical displays for the statistical dimensions concerned by the user, and displays the specified content; Receiving the selection operation of the user on the target dimension information among the three-dimensional information, and displaying a detailed information query interface related to the target dimension information. The detailed information query interface consists of at least one parameter item; Responding to the setting operation of the parameter value of the target parameter item in at least one parameter item in the detailed information query interface by the user, querying and displaying the target configuration information matching the parameter value from the configuration information.

7. A computer device, characterized in that, It includes: At least one memory and at least one processor. The memory stores a program, and the processor calls the program stored in the memory. The program is used to implement the database configuration information collection method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to execute the database configuration information collection method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Database deployment method, user equipment, storage medium and device

    CN109977099A