CN113626467A - Database object exporting method and system, electronic equipment and storage medium - Google Patents

Database object exporting method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN113626467A
CN113626467A CN202110922135.3A CN202110922135A CN113626467A CN 113626467 A CN113626467 A CN 113626467A CN 202110922135 A CN202110922135 A CN 202110922135A CN 113626467 A CN113626467 A CN 113626467A
Authority
CN
China
Prior art keywords
database
database object
connection
present disclosure
result set
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.)
Pending
Application number
CN202110922135.3A
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110922135.3A priority Critical patent/CN113626467A/en
Publication of CN113626467A publication Critical patent/CN113626467A/en
Pending legal-status Critical Current

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/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • 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
    • 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/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • 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/24Querying
    • G06F16/248Presentation of query results
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification

Landscapes

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

Abstract

The present disclosure provides a database object export method, which is applied to the field of financial technology or other fields, and comprises: determining basic information for establishing database connection; performing connection verification; connecting a database to execute a task to obtain a result set; the result set is transmitted locally. The method and the device can support convenient and fast acquisition of database reports and logs; the method simplifies the operation complexity of related personnel on data management, performance analysis, problem positioning and related problems, and fills the defects of the conventional connection software to a certain extent. The present disclosure also provides a database object export system, an electronic device, a computer-readable storage medium, and a program product.

Description

Database object exporting method and system, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of financial technology, in particular to a database object export method, a database object export system, electronic equipment and a storage medium.
Background
In the daily operation and maintenance work of software, the operation and maintenance of a Database server often occupy a large part of the work, and a professional-Database Administrator (DBA) is also generated in the field. As a developer, there is no need to be concerned with the operation of the database, and the associated performance capabilities. The SQL writing for increasing, deleting, modifying and checking is common. So long as various related SQL can return the result set desired by the developer within the limited timeout. The others will not be noticed by the developer. A database manager does not care how SQL in a developer program is written, but focuses on supervising the operation condition of the whole database, completing the construction of the database and performing optimization.
In daily software development work, a back-end developer and a database developer basically do not directly connect with a database server, but use some common database connection software. For example, on Oracle, Toad, PLSQL _ developer are used. On MySQL, SQLyog Community, Navicat, etc. are used
In addition to the ability to run various SQL directly, these software also have some graphical management database objects (e.g., tables, indexes, views, etc.). But the export of the object list of the database cannot be supported, and developers generally need to export the object list by means of the database system view.
While system views of databases are typically complex, up to several hundred. And the number of columns presented is also tens of columns. The method is characterized in that a plurality of additional information is often required to be queried when a relevant system view of a query is derived, the field names of the information are usually expressed by simple words, and even for some database operation and maintenance related practitioners with abundant experience, the information cannot be completely understood. For other developers, the true statistical meaning of the fields on the system view may be less understandable.
Disclosure of Invention
Technical problem to be solved
In view of the above problems, the present disclosure provides a database object export method, system, electronic device, and storage medium, which are used to at least partially solve the technical problems of low efficiency, difficulty in understanding export result, and the like of the conventional object export method.
(II) technical scheme
One aspect of the present disclosure provides a database object export method, including: determining basic information for establishing database connection; performing connection verification; connecting a database to execute a task to obtain a result set; the result set is transmitted locally.
Further, determining the basic information for establishing the database connection includes: the database server IP, database port number, database service name, and username password are determined.
Further, performing connection verification includes: and checking the network, the connection string, the user name and the password.
Further, performing connection verification further comprises: and if the connection verification fails, returning error information.
Further, connecting the database to perform tasks includes: and classifying the tasks, including metadata generation and downloading, analysis report generation and downloading and log downloading.
Further, the metadata generation and download includes: sentence inquiry, connecting a database to execute tasks; and obtaining a result set, converting the field names in the result set, and outputting the converted field names to the EXCEL table.
Further, the statement query includes: and converting the query statement of the statement query according to the connected database.
Further, the generation and downloading of the analysis report includes: carrying out analysis report command conversion; and generating a report file and transmitting the report file to the local through the FTP.
Further, the analysis report includes AWR, ASH, ADDM, AWRINFO.
Further, the downloading of the log includes: performing directory parameter query; and obtaining a target path and a log file name, and transmitting the target path and the log file name to the local through the FTP.
In another aspect, the present disclosure provides a database object export system, including: the determining module is used for determining basic information for establishing database connection; the connection checking module is used for carrying out connection checking; the task execution module is used for connecting the database to execute tasks to obtain a result set; and the transmission module is used for transmitting the result set to the local.
Yet another aspect of the present disclosure provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor causing the processor to perform the database object derivation method as described above when executing the computer program.
A further aspect of the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a database object export method as described above.
A further aspect of the disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements a database object export method as described above.
(III) advantageous effects
According to the database object export method, the database object export system, the electronic equipment and the storage medium, the database is connected to execute tasks, a result set is obtained, the result set is transmitted to the local, the database report and the log are conveniently and rapidly acquired, the operation complexity of relevant personnel on data management, performance analysis, problem positioning and relevant problems is simplified, and the defects of current common connection software are overcome to a certain extent.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
fig. 1 schematically shows an application scenario diagram of a database object export method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a database object export method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow diagram of a method of metadata generation and download according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a method of analysis report generation and download according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart of a method of downloading a log according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a full flow diagram of a database object derivation method in accordance with a particular embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a database object export system according to an embodiment of the present disclosure;
fig. 8 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, 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, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon for use by or in connection with an instruction execution system.
The purpose of the disclosure is to provide a tool, which can simplify the work complexity of development and operation and maintenance personnel, facilitate the metadata statistics of database developers, perform the daily database operation analysis and problem location of professional operation and maintenance personnel, reduce the operation steps, and improve the work efficiency.
Fig. 1 schematically illustrates an exemplary system architecture 100 that may be applied to a database object export method according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include a terminal device 101, a network 102, and a server 103. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal device 101 to interact with server 103 over network 102 to receive or send messages and the like.
The terminal device 101 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 103 may be a server that provides various services, such as a background management server (for example only) that provides support for websites browsed by users using the terminal devices 101. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the database object export method provided by the embodiment of the present disclosure may be generally executed by the server 103. Accordingly, the system for the database object export method provided by the embodiment of the present disclosure may be generally disposed in the server 103. The database object export method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 103 and is capable of communicating with the terminal device 101 and/or the server 103. Correspondingly, the system for the database object export method provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 103 and capable of communicating with the terminal device 101 and/or the server 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The method and the system make up for the defects of the problems to a certain extent, can automatically query the related objects of the database required by the user, and support downloading. In the daily operation and maintenance aspect of the database, the method and the system also support self-service query and downloading of the related reports, the alert log and other logs of the database, and efficiency and capability of developers and system operation and maintenance personnel in daily metadata management, environment operation and maintenance and problem location are improved.
Fig. 2 schematically shows a flow chart of a database object export method according to an embodiment of the present disclosure.
As shown in fig. 2, the database object export method includes:
determining basic information for establishing a database connection in operation S1;
the various databases do not realize complete intercommunication, and different databases have different methods for realizing data import and export. For example, in the Oracle database, data is imported and exported using an exp/imp command, while in the informax and Sybase, data is imported and exported using a load/unload command and a bcp command, respectively. Specifically, Sybase implements import and export of data using a bcp command. Different databases support different types of data. Different names may also be possible in different databases for the same data type. The time type is represented by datetime in Sybase and by date in Oracle. Only two examples are listed above, and in practice the various databases differ far more than this. The difference brings huge influence to the application which is constructed on the database, and the development and maintenance cost of the application is greatly increased.
The database object export method adapts corresponding processing methods for different databases, so that basic information of the databases to be connected is firstly established.
In operation S2, a connection check is performed.
After the basic information of the database is determined, firstly, integrity verification is carried out on the input basic information, if the input information is incomplete, supplement is prompted, and an initial page is returned; if the content of the input information is complete and meets the requirements, connection verification is carried out; and if the connection verification fails, directly returning error information, and if the connection verification passes, performing the next step.
In operation S3, the linking database performs a task, resulting in a result set.
And determining a task to be done according to the input information, and connecting a corresponding database to execute the task after the connection verification is successful to obtain a result corresponding to the task.
In operation S4, the result set is transmitted to the local.
And after the result is correspondingly processed, the result is directly transmitted to the local through a corresponding transmission protocol for downloading, and the result can also be directly displayed in a window form.
On the basis of the above embodiment, determining the basic information for establishing the database connection includes: the database server IP, database port number, database service name, and username password are determined.
The database object export method is written by using JAVA language, for example, firstly, a visual window is written, and an input box comprises database connection URL and information input such as used user name, user password and connection port, so as to determine basic information for establishing database connection.
On the basis of the above embodiment, performing connection verification includes: and checking the network, the connection string, the user name and the password.
And performing network verification, performing verification of a connection character string of a set database for interface parameter configuration, verifying an input user name and a user password, and performing the next step after all the verifications are passed.
On the basis of the above embodiment, performing connection verification further includes: and if the connection verification fails, returning error information.
And if the verification fails, error information is directly returned, the original page is returned, and the user can input the basic information again until the verification succeeds.
On the basis of the above embodiment, connecting the database to perform tasks includes: and classifying the tasks, including metadata generation and downloading, analysis report generation and downloading and log downloading.
After all the checks are passed, the specific process of executing the task is started, and the processing processes of different tasks are different, so the tasks are classified and decomposed firstly, for example, the generation and the downloading of metadata, the generation and the downloading of an analysis report, and the downloading of a log can be divided.
Fig. 3 schematically shows a flow chart of a method of metadata generation and download according to an embodiment of the present disclosure.
As shown in fig. 3, the method of metadata generation and download includes:
in operation S31, query a sentence, connect a database to perform a task;
firstly, the selected metadata view is converted into a database view query statement, and different databases (oracle and mysql) need to be adapted for a user to select different connection modes. The selection column comprises a table analysis view, a field view, an index view, a user view, a storage process view, a function view and the like at the system view level.
In operation S32, a result set is obtained, and field names in the result set are converted and output to the EXCEL table.
English field names of different database system levels are converted into Chinese characters in more detail, so that personnel on different working posts can read and understand the English field names. And open source software jxl-jar is introduced. As an auxiliary tool for generating excel tables, the query results after the Hannization are used as a header and are transmitted into xls. The query result set serves as a List. And outputting the data to an excel table.
On the basis of the above embodiment, the statement query includes: and converting the query statement of the statement query according to the connected database.
The adaptation is because different databases, specific syntax and function are different, and when the same query is made, the DQL statements of mysql and oracle may be different, and here the connected databases need to be correspondingly transformed.
FIG. 4 schematically illustrates a flow chart of a method of analysis report generation and download according to an embodiment of the present disclosure.
As shown in fig. 4, the method for generating and downloading an analysis report includes:
in operation S41, an analysis report command conversion is performed;
the command conversion of the report comprises converting the report type (single instance/cluster/contrast) of the user, the report format (html/txt format) and the start and end time parameter into a command to be run on the database server.
In operation S42, a report file is generated and transmitted to the local via FTP.
And after the database generates a report file and the report file is stored in a database server, the report file is automatically transmitted to the local by a program in an ftp mode.
On the basis of the above-described embodiments, the analysis report includes AWR, ASH, ADDM, AWRINFO.
The analysis report includes AWR, ASH, ADDM, AWRINFO, etc., and is automatically generated and downloaded after completion of start and end time selection (to the nearest minute). The most important differences between AWR and ASH are: the AWR is planar and comprehensive, the ASH is stereoscopic, the event tracking of the session is more emphasized, the AWR can not be monitored probably because the event wait of the database with large traffic is immense, and the ASH can track the event of the session in order to make up for the deficiency. ASH differs from ADDM in that: ADDM is occasionally focused on providing instructive opinions about existing problems based on analysis of the current state of the database, so to speak ASH, ADDM is a complement to AWR that collects the state of the database comprehensively, but ASH/ADDM is focused on analyzing the collected data and providing some helpful suggestions.
Fig. 5 schematically shows a flow chart of a method of downloading a log according to an embodiment of the present disclosure.
As shown in fig. 5, the method for downloading the log includes:
in operation S51, a directory parameter query is made.
After the user selects the database log category, because the current high-version database log storage catalog supports configuration and is not fixed, the program firstly queries the catalog parameter in the target library.
In step S52, the target path and the log file name are obtained and transmitted to the local via FTP.
And after the corresponding log directory is obtained, invoking ftp to transmit the file to the local according to the path and the specified log file name.
The method can support development and operation and maintenance personnel, obtain the metadata view by one key, and paraphrase the corresponding index; and one-key acquisition of database reports and logs is supported, so that the operation complexity of related personnel on related problems such as data management, performance analysis, problem positioning and the like is simplified, and the defects of the conventional connection software are filled to a certain extent.
The steps of the database object export method of the present disclosure are further described in a specific embodiment.
Referring to fig. 6, the present disclosure is written in JAVA language, and first a visual window 601 is written, and an input box includes a database connection URL, and information input such as a user name, a user password, and a connection port to be used. The selection column comprises a table analysis view, a field view, an index view, a user view, a storage process view, a function view and the like at the system view level. The analysis report includes AWR, ASH, ADDM, AWRINFO, etc., and is automatically generated and downloaded after completion of start and end time selection (to the nearest minute).
After determining the basic information of the database, firstly, integrity check 602 is performed on the input basic information, if the input information is incomplete, supplement is prompted, and an initial page is returned; if the content of the input information is complete and meets the requirements, connection checking is carried out 603; and if the connection verification fails, directly returning error information, and if the connection verification passes, performing the next step.
After all the checks are passed, the specific process of task execution is started, and the processing processes of different tasks are different, so the tasks are firstly classified and decomposed 604, for example, metadata generation and downloading, analysis report generation and downloading, and log downloading can be performed.
The metadata is generated and downloaded, firstly, a metadata view selected by a user is converted into a database view query statement and converted into a DQL statement 605, different databases (oracle and mysql) need to be adapted for the user to select different connection modes and different statements, and in the process, English field names of different database system levels are Hannized into more detailed Chinese definitions, so that personnel on different work posts can read and understand the English field names. And open source software jxl-jar is introduced. As an auxiliary tool for generating excel tables, the query results after the Hannization are used as a header and are transmitted into xls. The query result set is output as a List 606 to an excel table 607.
And generating and downloading a relevant database analysis report. The command containing the report is converted 608, the report type (single instance/cluster/contrast) and the report format (html/txt format) of the user. And the starting and ending time parameter is converted into a command and is operated on the database server. When the database generates a report file 609, the report file is stored on the database server and then automatically transmitted to the local 610 by the program through ftp.
After the user selects the database log type, the database log is downloaded, because the current high-version database log storage directory supports configuration, the database log is not fixed. So the program first performs the directory parameter query in the target library. And after the corresponding log directory is obtained, transferring ftp to transmit the file to the local 610 according to the path and the specified log file name, ending the process 612, and returning to the initial page after the process is ended.
FIG. 7 schematically illustrates a block diagram of a database object export system according to an embodiment of the present disclosure.
As shown in fig. 7, the database object export system 700 includes: a determination module 710, a connection checking module 720, an execution task module 730, and a transmission module 740.
A determining module 710, configured to determine basic information for establishing a database connection; according to an embodiment of the present disclosure, the determining module 710 may be configured to perform the step S1 described above with reference to fig. 2, for example, and is not described herein again.
A connection checking module 720, configured to perform connection checking; according to an embodiment of the present disclosure, the connection checking module 720 may be configured to perform the step S2 described above with reference to fig. 2, for example, and is not described herein again.
The task execution module 730 is used for connecting the database to execute tasks to obtain a result set; according to an embodiment of the present disclosure, the task execution module 730 may be configured to execute the step S3 described above with reference to fig. 2, for example, and is not described herein again.
A transmission module 740, configured to transmit the result set to the local; according to an embodiment of the present disclosure, the transmission module 740 may be configured to perform the step S4 described above with reference to fig. 2, for example, and is not described herein again.
It should be noted that any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any of the determination module 710, the connection checking module 720, the task execution module 730, and the transmission module 740 may be combined and implemented in one module, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the determining module 710, the connection checking module 720, the task executing module 730, and the transmitting module 740 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware by any other reasonable manner of integrating or packaging a circuit, or may be implemented in any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the determining module 710, the connection checking module 720, the performing task module 730, the transmitting module 740 may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
The system and the method for exporting the database object can be used in the fields of financial science and technology and the like, particularly the operation and maintenance field of a database server, can automatically query the related objects of the database required by a user, and support downloading; in the daily operation and maintenance aspect of the database, the method and the system also support self-service query and downloading of the related reports, the alert log and other logs of the database, and improve the efficiency and the capability of developers and system operation and maintenance personnel in daily metadata management, environment operation and maintenance and problem location.
Fig. 8 schematically shows a block diagram of an electronic device adapted to implement the above described method according to an embodiment of the present disclosure. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, the electronic device 800 described in this embodiment includes: a processor 801 which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 803, various programs and data necessary for the operation of the system 800 are stored. The processor 801, the ROM802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM802 and/or RAM 803. Note that the programs may also be stored in one or more memories other than the ROM802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 800 may also include input/output (I/O) interface 805, input/output (I/O) interface 805 also connected to bus 804, according to an embodiment of the present disclosure. The system 800 may also include one or more of the following components connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The embodiments of the present disclosure also provide a computer-readable storage medium, which may be included in the device/apparatus/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The above-mentioned computer-readable storage medium carries one or more programs which, when executed, implement a database object derivation method according to an embodiment of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM802 and/or RAM 803 described above and/or one or more memories other than the ROM802 and RAM 803.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the database object export method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 801. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via communication section 809, and/or installed from removable media 811. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that each functional module in each embodiment of the present disclosure may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of software products, in part or in whole, which substantially contributes to the prior art.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
While the disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.

Claims (14)

1. A database object derivation method, comprising:
determining basic information for establishing database connection;
performing connection verification;
connecting the database to execute tasks to obtain a result set;
and transmitting the result set to the local.
2. The database object derivation method according to claim 1, wherein the determining the basic information for establishing the database connection comprises:
the database server IP, database port number, database service name, and username password are determined.
3. The database object derivation method according to claim 2, wherein the performing a connection check comprises:
and checking the network, the connection string, the user name and the password.
4. The database object derivation method of claim 3, wherein the performing connection verification further comprises:
and if the connection verification fails, returning error information.
5. The database object derivation method of claim 3, wherein the connecting the database to perform tasks comprises:
and classifying the tasks, including metadata generation and downloading, analysis report generation and downloading and log downloading.
6. The database object derivation method of claim 5, wherein the metadata generation and download comprises:
statement query, connecting the database to execute tasks;
and obtaining a result set, converting the field names in the result set, and outputting the converted field names to an EXCEL table.
7. The database object derivation method of claim 6, wherein the statement query comprises:
and converting the query statement queried by the statement according to the connected database.
8. The database object derivation method of claim 5, wherein the generation and downloading of the analysis report comprises:
carrying out analysis report command conversion;
and generating a report file and transmitting the report file to the local through the FTP.
9. The database object derivation method of claim 8, wherein the analysis report comprises AWR, ASH, ADDM, aprinfo.
10. The database object derivation method of claim 5, wherein the downloading of the log comprises:
performing directory parameter query;
and obtaining a target path and a log file name, and transmitting the target path and the log file name to the local through the FTP.
11. A database object export system, comprising:
the determining module is used for determining basic information for establishing database connection;
the connection checking module is used for carrying out connection checking;
the task execution module is used for connecting the database to execute tasks to obtain a result set;
and the transmission module is used for transmitting the result set to the local.
12. An electronic device, comprising:
a processor;
a memory storing a computer executable program which, when executed by the processor, causes the processor to perform the database object export method of any one of claims 1 to 10.
13. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a database object export method according to any one of claims 1 to 10.
14. A computer program product comprising a computer program which, when executed by a processor, implements a database object export method according to any one of claims 1 to 10.
CN202110922135.3A 2021-08-11 2021-08-11 Database object exporting method and system, electronic equipment and storage medium Pending CN113626467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110922135.3A CN113626467A (en) 2021-08-11 2021-08-11 Database object exporting method and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110922135.3A CN113626467A (en) 2021-08-11 2021-08-11 Database object exporting method and system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113626467A true CN113626467A (en) 2021-11-09

Family

ID=78384709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110922135.3A Pending CN113626467A (en) 2021-08-11 2021-08-11 Database object exporting method and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113626467A (en)

Similar Documents

Publication Publication Date Title
US8601438B2 (en) Data transformation based on a technical design document
US9119056B2 (en) Context-driven application information access and knowledge sharing
US20100100872A1 (en) Methods and systems for implementing a test automation framework for testing software applications on unix/linux based machines
US20080215389A1 (en) Model oriented business process monitoring
US20110066741A1 (en) Client-side api framework for uniform resource identifier (uri) manipulations
US11561972B2 (en) Query conversion for querying disparate data sources
CN110825767A (en) Data query method, platform, equipment and storage medium
US11977546B1 (en) System and method for integrating disparate information sources
US20230305907A1 (en) A rest interface specification encapsulation system based on network sniffing
JP2012113706A (en) Computer-implemented method, computer program, and data processing system for optimizing database query
CN110704476A (en) Data processing method, device, equipment and storage medium
US11816479B2 (en) System and method for implementing a code audit tool
US20220309105A1 (en) Apparatuses, methods, and computer program products for generating interaction vectors within a multi-component system
US20190138433A1 (en) Evaluation of library test suites using mutation testing
Zaccarelli et al. Stream2segment: An open‐source tool for downloading, processing, and visualizing massive event‐based seismic waveform datasets
CN112949269A (en) Method, system, equipment and storage medium for generating visual data analysis report
KR20040088367A (en) Exposing a report as schematized queryable data source
CN113010395A (en) Data acquisition method, apparatus, device, medium, and program product
CN115599386A (en) Code generation method, device, equipment and storage medium
CN116578585B (en) Data query method, device, electronic equipment and storage medium
US10942732B1 (en) Integration test framework
CN117271584A (en) Data processing method and device, computer readable storage medium and electronic equipment
US20170262507A1 (en) Feedback mechanism for query execution
CN116414855A (en) Information processing method and device, electronic equipment and computer readable storage medium
CN113626467A (en) Database object exporting method and system, electronic equipment and storage medium

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