CN104731780B - Proxy server, the acquisition system comprising its database execution information and acquisition methods - Google Patents

Proxy server, the acquisition system comprising its database execution information and acquisition methods Download PDF

Info

Publication number
CN104731780B
CN104731780B CN201310698219.9A CN201310698219A CN104731780B CN 104731780 B CN104731780 B CN 104731780B CN 201310698219 A CN201310698219 A CN 201310698219A CN 104731780 B CN104731780 B CN 104731780B
Authority
CN
China
Prior art keywords
data source
proxy
server
execution information
database
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.)
Expired - Fee Related
Application number
CN201310698219.9A
Other languages
Chinese (zh)
Other versions
CN104731780A (en
Inventor
纪婷琪
佘敏
吉惠
冷合礼
王旭政
张涛
王森
赵晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Air Conditioner Gen Corp Ltd
Haier Group Corp
Original Assignee
Qingdao Haier Air Conditioner Gen Corp Ltd
Haier Group Corp
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 Qingdao Haier Air Conditioner Gen Corp Ltd, Haier Group Corp filed Critical Qingdao Haier Air Conditioner Gen Corp Ltd
Priority to CN201310698219.9A priority Critical patent/CN104731780B/en
Publication of CN104731780A publication Critical patent/CN104731780A/en
Application granted granted Critical
Publication of CN104731780B publication Critical patent/CN104731780B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Acquisition system and acquisition methods the present invention relates to a kind of proxy server, comprising its database execution information.Wherein, the acquisition system of database execution information includes proxy server, at least a data source server and an at least application server.Proxy server receives the database execute instruction that application server is sent, and the chained address of database execute instruction configuration is data source server chained address;Proxy server creates proxy data source, and the configuration data source server chained address in proxy data source, is revised as the address in proxy data source by the chained address in database execute instruction and is sent to the data source server of data source chained address direction;Execution information of the proxy server also based on proxy data source record database execute instruction.Proxy server using the present invention, acquisition system and acquisition methods comprising its database execution information, can monitor the execution efficiency of SQL statement and perform parameter.

Description

Proxy server, the acquisition system comprising its database execution information and acquisition Method
Technical field
Performed the present invention relates to a kind of data base querying technology, particularly a kind of proxy server, comprising its database The acquisition system and acquisition methods of information.
Background technology
Operation system is required for interacting with database greatly, preserves data or query result, these operation bottoms are all Completed by structured query language (Structured Query Language, the SQL) sentence of database.
With the increase of the complexity and data volume of system business, the execution efficiency of SQL statement increasingly becomes systematicness Can bottleneck, how the SQL statement performed in alignment system execution efficiency and contextual information when execution (i.e. Parameter) become urgent problem to be solved.
Partial database provides the monitoring tools of server end to check these SQL, but does not have versatility, such as Offer instrument in oracle backstages can check, but to myql or other databases when then can not achieve and check.
The content of the invention
The brief overview on the present invention is given below, in order to provide the basic reason on certain aspects of the invention Solution.It should be appreciated that this general introduction is not the exhaustive general introduction on the present invention.It is not intended to determine the key of the present invention Or pith, nor is it intended to limit the scope of the present invention.Its purpose only provides some concepts in simplified form, with This is as the preamble in greater detail discussed later.
A primary object of the present invention is to provide a kind of proxy server, obtaining comprising its database execution information System and acquisition methods are taken, it can encapsulate the component for obtaining SQL and performing parameter information, and then encapsulate to the specific data of bottom The complexity that storehouse product and upper strata developer call is so as to monitor the execution efficiency of SQL statement and perform parameter.
According to an aspect of the present invention, a kind of acquisition system of database execution information, including proxy server, respectively with Proxy server communication connection an at least data source server and be connected respectively with proxy server communication at least one Platform application server;
The proxy server is used to receive the database execute instruction that the application server is sent, and the database is held The chained address of row instruction configuration is data source server chained address;
The proxy server is used to create proxy data source, and the data source service is configured in the proxy data source Device chained address, is revised as the address in the proxy data source by the chained address in the database execute instruction and sends The data source server being directed toward to the data source chained address;
The proxy server is additionally operable to perform letter based on database execute instruction described in the proxy data source record Breath.
According to the second aspect of the invention, a kind of proxy server, including:
Receiving module, for receiving the database execute instruction of application server transmission, the database execute instruction is matched somebody with somebody The chained address put is data source server chained address;
Creation module, for creating proxy data source, configures the data source server chain in the proxy data source Location is grounded, the address in the proxy data source is revised as in the chained address in the database execute instruction and is sent to institute State the data source server of data source chained address direction;
Logging modle, for the execution information based on database execute instruction described in the proxy data source record.
According to the third aspect of the invention we, a kind of acquisition methods of database execution information, including:
Proxy server receives the database execute instruction that application server is sent, the database execute instruction configuration Chained address is data source server chained address;
The proxy server creates proxy data source, and the data source server chain is configured in the proxy data source Location is grounded, the address in the proxy data source is revised as in the chained address in the database execute instruction and is sent to institute State the data source server of data source chained address direction;
Execution information of the proxy server based on database execute instruction described in the proxy data source record.
The acquisition system and acquisition methods of database execution information using the present invention, can monitor the execution of SQL statement Efficiency and execution parameter.
Brief description of the drawings
Below with reference to the accompanying drawings illustrate embodiments of the invention, the above of the invention and its can be more readily understood that Its objects, features and advantages.Component in attached drawing is intended merely to show the principle of the present invention.In the accompanying drawings, it is identical or similar Technical characteristic or component will be represented using same or similar reference numeral.
Fig. 1 is a kind of structure chart of embodiment of the acquisition system of the database execution information of the present invention;
Fig. 2 is a kind of structure chart of embodiment of proxy server of the present invention;
Fig. 3 is a kind of flow chart of embodiment of the acquisition methods of the database execution information of the present invention.
Embodiment
Illustrate the embodiment of the present invention with reference to the accompanying drawings.Retouched in the attached drawing of the present invention or a kind of embodiment The elements and features that the elements and features stated can be shown in one or more other attached drawings or embodiment is combined.Should When note that for purposes of clarity, being eliminated in attached drawing and explanation known to unrelated to the invention, those of ordinary skill in the art Component and processing expression and description.
It is shown in Figure 1, for a kind of structure chart of embodiment of the acquisition system of the database execution information of the present invention.
In the present embodiment, the acquisition system of data source statement execution information include proxy server 10, respectively with generation At least data source server 20 and be connected at least with proxy server communication respectively that reason server 10 communicates to connect One application server 30.
Proxy server 10 is used for the database execute instruction for receiving the transmission of application server 30, and database execute instruction is matched somebody with somebody The chained address put is 20 chained address of data source server.
Proxy server 10 is additionally operable to create proxy data source, and configuration data source server 20 links in proxy data source Address, is revised as the address in proxy data source by the chained address in database execute instruction and is sent to data source chain ground connection The data source server 20 that location is directed toward.Proxy data source can for example include database link object, SQL statement object and storage Procedure statement object etc..
Proxy server 10 is additionally operable to the execution information based on proxy data source record database execute instruction.
As a kind of embodiment, the acquisition system of data source statement execution information can also include and proxy server 10 The memory module 40 of communication connection.
Proxy server 10 preserves the execution information of data source query instruction and data source statement to memory module 40.
Execution information can for example include performing the execution time of data source query instruction, perform parameter, data source query Instruction in itself, the type of data source query instruction, the one or more for performing end time and exception information.
In order to improve storage efficiency, as a kind of embodiment, proxy server 10 can pass through independent asynchronous call Thread preserves the execution information of data source query instruction and data source statement to memory module 40.
As a kind of embodiment, proxy server 10 can receive every data source inquiry instruction and data source statement Execution information after, the execution information of data source query instruction and data source statement is preserved to memory module 40.
Alternatively,
Proxy server 10 can also perform letter receive the data source query instruction and data source statement of predetermined quantity After breath, disposably the execution information of the data source query instruction and data source statement of predetermined quantity is preserved to memory module 40.
For example, proxy server 10 receive application server 30 transmission data source query instruction after, application service All SQL statements link that device 30 is sent performs all to be performed by the proxy server 10.Proxy server 10 is also responsible for creating Other objects used related to SQL execution are built, such as database linked object Connection, SQL statement object Statement With PreparedStatement objects, storing process sentence CallableStatement objects etc..
When obtaining these objects by proxy server 10, the agent object of corresponding objects can be all created, at these When SQL statement is run in agent object, between recording at the beginning of execution, incoming parameter, performs the type of sentence (commonly SQL statement or pretreatment SQL statement) perform one kind or more in the exception information produced in end time and implementation procedure Kind.
It is shown in Figure 2, for a kind of structure chart of embodiment of the proxy server of the present invention.
In the present embodiment, proxy server 10 includes receiving module 11, creation module 12 and logging modle 13.
Receiving module 11 is used for the database execute instruction for receiving the transmission of application server 30, the configuration of database execute instruction Chained address be data source server chained address.
Creation module 12 is used to create proxy data source, the configuration data source server chained address in proxy data source, It is revised as the address in proxy data source by the chained address in database execute instruction and is sent to data source chained address to be directed toward Data source server 20.Proxy data source can for example include database link object, SQL statement object and storing process language Sentence pair as.
Logging modle 13 is used for the execution information based on proxy data source record database execute instruction.
Execution information can for example include the execution time of data source query instruction, perform parameter, the data source query Instruction in itself, the type of data source query instruction, the one or more for performing end time and exception information.
As a kind of embodiment, logging modle 13 is used for the execution information of data source query instruction and data source statement Preserve to exterior memory module 40.
As a kind of embodiment, logging modle 13 is referred to the data source query by independent asynchronous call thread The execution information of order and the data source statement is preserved to exterior memory module.
Logging modle 13 is additionally operable to after the execution information of every data source inquiry instruction and data source statement is received, by number Preserved according to the execution information of source inquiry instruction and data source statement to memory module 40;
Alternatively,
Logging modle 13 is used for after the execution information of data source query instruction and data source statement of predetermined quantity is received, Disposably the execution information of the data source query instruction and data source statement of predetermined quantity is preserved to memory module 40.
It is shown in Figure 3, for a kind of flow chart of embodiment of the acquisition methods of the database execution information of the present invention.
In this embodiment, the acquisition methods of database execution information include:
S10:Proxy server 10 receives the database execute instruction that application server 30 is sent, and database execute instruction is matched somebody with somebody The chained address put is data source server chained address.
S20:Proxy server establishment proxy data source, the configuration data source server chained address in proxy data source, It is revised as the address in proxy data source by the chained address in database execute instruction and is sent to data source chained address to be directed toward Data source server 20;Proxy data source can for example include database link object, SQL statement object and storing process language Sentence pair as.
S30:Execution information of the proxy server 10 based on proxy data source record database execute instruction.
Execution information can for example include performing the execution time of data source query instruction, perform parameter, the data source Inquiry instruction in itself, the type of data source query instruction, the one or more for performing end time and exception information.
As a kind of embodiment, step S30 can be specifically included:
Proxy server 10 preserves the execution information of data source query instruction and data source statement to memory module 40.
As a kind of embodiment, step S30 can also include:
Proxy server 10 passes through independent asynchronous call thread holding data source query instruction and data source statement Row information is preserved to memory module 40.
As a kind of embodiment, in step s 30,
Proxy server can be with 10 after the execution information of every data source inquiry instruction and data source statement is received, by number Preserved according to the execution information of source inquiry instruction and data source statement to memory module 40;
Alternatively,
Proxy server 10 can also perform letter receive the data source query instruction and data source statement of predetermined quantity After breath, disposably the execution information of the data source query instruction and data source statement of predetermined quantity is preserved to memory module 40.
Proxy server using the present invention, acquisition system and acquisition methods comprising its database execution information are right Developer is fully transparent.Technical staff totally can not feel the presence of proxy server and agent object, original business journey Sequence need not do any change.
In addition, the acquisition system and acquisition methods of data source statement execution information using the present invention can meet all numbers According to the monitoring of source SQL.No matter use c3p0, dbcp, the data source of weblogic or other, as long as these data sources are The DataSource interfaces of standard realize, can be seamless be linked on proxy server.
3rd, proxy server 10 of the invention is to data source inquiry instruction(That is SQL statement)Interception do not influence normally Business operation.
4th, third party's medium is stored data into by asynchronous system(Memory module)In, while support batch to store, Improve response speed.
5th, realize system bottom SQL and perform transparence.By the execution information for recording data source statement(SQL is performed Historical record), detailed can obtain the bottleneck of SQL execution and most time-consuming place reaches the effect targetedly optimized.
Some embodiments of the present invention are described in detail above.Such as those of ordinary skill in the art institute energy Understand, the whole either any steps or component of methods and apparatus of the present invention can be in any computing devices(Including place Manage device, storage medium etc.)Either realized in the network of computing device with hardware, firmware, software or combinations thereof, This is that those of ordinary skill in the art just can be real with their basic programming skill in the case where understanding present disclosure Existing, therefore be not required to illustrate herein.
In the apparatus and method of the present invention, it is clear that each component or each step are after can decomposing, combine and/or decomposing Reconfigure.These decompose and/or reconfigure the equivalents that should be regarded as the present invention.It may also be noted that on performing The step of stating series of processes can perform in chronological order according to the order of explanation naturally, but and need not necessarily according to when Between sequentially perform.Some steps can perform parallel or independently of one another.Meanwhile the specific embodiment of the invention is retouched above In stating, the feature for describing and/or showing for a kind of embodiment can be in a manner of same or similar one or more Used in other embodiment, it is combined with the feature in other embodiment, or substitute the feature in other embodiment.
It should be emphasized that term "comprises/comprising" refers to the presence of feature, key element, step or component when being used herein, but simultaneously It is not excluded for the presence or additional of one or more further features, key element, step or component.
Although the present invention and its advantage is described in detail it should be appreciated that without departing from by appended claim Various changes, replacement and conversion can be carried out in the case of the spirit and scope of the present invention limited.Moreover, the model of the present invention Enclose and be not limited only to the described process of specification, equipment, means, the specific embodiment of method and steps.In the art is common Technical staff will readily appreciate that from the disclosure, can use perform and corresponding reality described herein according to the present invention Apply the essentially identical function of example or obtain process essentially identical with it result, existing and that future is to be developed, equipment, Means, method or step.Therefore, appended claim includes such process, equipment, hand in the range of being directed at them Section, method or step.

Claims (12)

  1. A kind of 1. acquisition system of database execution information, it is characterised in that including proxy server, respectively with proxy server An at least data source server for communication connection and at least application service being connected respectively with proxy server communication Device;
    The proxy server is used to receive the database execute instruction that the application server is sent, and the database, which performs, to be referred to The chained address of order configuration is data source server chained address;
    The proxy server is used to create proxy data source, and the data source server chain is configured in the proxy data source Location is grounded, the address in the proxy data source is revised as in the chained address in the database execute instruction and is sent to institute State the data source server of data source server chained address direction;
    The proxy server is additionally operable to the execution information based on database execute instruction described in the proxy data source record;
    The acquisition system of the database execution information further includes the memory module being connected with the proxy server communication;
    The proxy server is by independent asynchronous call thread by the execution of data source query instruction and data source statement Information is preserved to memory module.
  2. 2. the acquisition system of database execution information according to claim 1, it is characterised in that:
    The proxy server, will after the execution information of every data source query instruction and the data source statement is received The execution information of the data source query instruction and the data source statement is preserved to the memory module;
    Alternatively,
    The proxy server is instructed in the data source query for receiving predetermined quantity and the data source statement performs letter After breath, disposably the execution information by the data source query instruction of predetermined quantity and the data source statement is preserved to described Memory module.
  3. 3. the acquisition system of database execution information according to claim 1 or 2, it is characterised in that:
    The execution information includes performing the execution time of the data source query instruction, performs parameter, the data source query Instruction in itself, the type of data source query instruction, the one or more for performing end time and exception information.
  4. 4. the acquisition system of database execution information according to claim 1 or 2, it is characterised in that:
    The proxy data source includes database link object, SQL statement object and storing process statement object.
  5. A kind of 5. proxy server, it is characterised in that including:
    Receiving module, for receiving the database execute instruction of application server transmission, the database execute instruction configuration Chained address is data source server chained address;
    Creation module, for creating proxy data source, configures the data source server chain ground connection in the proxy data source Location, is revised as the address in the proxy data source by the chained address in the database execute instruction and is sent to the number The data source server being directed toward according to source server chained address;
    Logging modle, for the execution information based on database execute instruction described in the proxy data source record;
    Data source query instruction and data source statement is performed letter by the logging modle by independent asynchronous call thread Breath is preserved to exterior memory module.
  6. 6. proxy server according to claim 5, it is characterised in that:
    The logging modle is used for after the execution information of every data source query instruction and the data source statement is received, The execution information of data source query instruction and the data source statement is preserved to the memory module;
    Alternatively,
    The logging modle is used to instruct in the data source query for receiving predetermined quantity and the execution of the data source statement After information, disposably by the execution information of the data source query instruction of predetermined quantity and the data source statement, preservation extremely The memory module.
  7. 7. the proxy server according to claim 5 or 6, it is characterised in that:
    The execution information includes performing the execution time of the data source query instruction, performs parameter, the data source query Instruction in itself, the type of data source query instruction, the one or more for performing end time and exception information.
  8. 8. proxy server according to claim 7, it is characterised in that:
    The proxy data source includes database link object, SQL statement object and storing process statement object.
  9. A kind of 9. acquisition methods of database execution information, it is characterised in that including:
    Proxy server receives the database execute instruction that application server is sent, the link of the database execute instruction configuration Address is data source server chained address;
    The proxy server creates proxy data source, and the data source server chain ground connection is configured in the proxy data source Location, is revised as the address in the proxy data source by the chained address in the database execute instruction and is sent to the number The data source server being directed toward according to source server chained address;
    Execution information of the proxy server based on database execute instruction described in the proxy data source record;
    " execution information of the proxy server based on database execute instruction described in the proxy data source record " has Body includes:
    Proxy server is instructed the data source query and the data source statement by independent asynchronous call thread Execution information is preserved to memory module.
  10. 10. the acquisition methods of database execution information according to claim 9, it is characterised in that:
    Proxy server is after the execution information of every data source query instruction and the data source statement is received, by described in Data source query instructs and the execution information of the data source statement, preservation to memory module;
    Alternatively,
    Proxy server receive predetermined quantity the data source query instruct and the data source statement execution information after, Disposably the execution information by the data source query instruction of predetermined quantity and the data source statement is preserved to memory module.
  11. 11. the acquisition methods of the database execution information according to claim 9 or 10, it is characterised in that:
    The execution information includes performing the execution time of the data source query instruction, performs parameter, the data source query Instruction in itself, the type of data source query instruction, the one or more for performing end time and exception information.
  12. 12. the acquisition methods of the database execution information according to claim 9 or 10, it is characterised in that:
    The proxy data source includes database link object, SQL statement object and storing process statement object.
CN201310698219.9A 2013-12-18 2013-12-18 Proxy server, the acquisition system comprising its database execution information and acquisition methods Expired - Fee Related CN104731780B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310698219.9A CN104731780B (en) 2013-12-18 2013-12-18 Proxy server, the acquisition system comprising its database execution information and acquisition methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310698219.9A CN104731780B (en) 2013-12-18 2013-12-18 Proxy server, the acquisition system comprising its database execution information and acquisition methods

Publications (2)

Publication Number Publication Date
CN104731780A CN104731780A (en) 2015-06-24
CN104731780B true CN104731780B (en) 2018-04-27

Family

ID=53455678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310698219.9A Expired - Fee Related CN104731780B (en) 2013-12-18 2013-12-18 Proxy server, the acquisition system comprising its database execution information and acquisition methods

Country Status (1)

Country Link
CN (1) CN104731780B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110516126A (en) * 2019-07-02 2019-11-29 邢台职业技术学院 A kind of data source query system based on cloud server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534319A (en) * 2008-11-11 2009-09-16 航旅信通(北京)信息技术有限公司 Method, system and proxy server for canceling inter-instruction dependency relationship
CN102033912A (en) * 2010-11-25 2011-04-27 北京北纬点易信息技术有限公司 Distributed-type database access method and system
CN102110162A (en) * 2011-02-24 2011-06-29 北京中电普华信息技术有限公司 Method and device for realizing monitoring on SQL (structured query language) database

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7801848B2 (en) * 2007-08-02 2010-09-21 International Business Machines Corporation Redistributing a distributed database

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534319A (en) * 2008-11-11 2009-09-16 航旅信通(北京)信息技术有限公司 Method, system and proxy server for canceling inter-instruction dependency relationship
CN102033912A (en) * 2010-11-25 2011-04-27 北京北纬点易信息技术有限公司 Distributed-type database access method and system
CN102110162A (en) * 2011-02-24 2011-06-29 北京中电普华信息技术有限公司 Method and device for realizing monitoring on SQL (structured query language) database

Also Published As

Publication number Publication date
CN104731780A (en) 2015-06-24

Similar Documents

Publication Publication Date Title
CN106095673B (en) Automated testing method and system based on WEB interface
CN102693183B (en) Method and system for realizing automatic software testing
CN104102701B (en) A kind of historical data based on hive is achieved and querying method
CN108037973A (en) A kind of data flow modeling interacted with data processing tools and processing system
CN106293664A (en) Code generating method and device
US11354311B2 (en) Database-agnostic parallel reads
CN101996132A (en) Method and device for automatically testing common object request broker architecture (CORBA) interfaces
CN107943945A (en) Isomery operator management method in a kind of big data analysis development platform
EP2597604A1 (en) Multi-client generic persistence for extension nodes
CN110134705A (en) A kind of data query method, cache server and terminal
CN108369591A (en) System and method for caching and parameterizing ir
CN109408493A (en) A kind of moving method and system of data source
CN103309904A (en) Method and device for generating data warehouse ETL (Extraction, Transformation and Loading) codes
CN112579625A (en) Multi-source heterogeneous data treatment method and device
CN104699748B (en) It is a kind of to show the method and its system for being not fixed row report
CN107784026A (en) A kind of ETL data processing methods and device
CN104331315B (en) A kind of parsing of arbitrary levels json objects and generation method and system
US20160154779A1 (en) Automatic modeling of column and pivot table layout tabular data
CN107688659A (en) A kind of data processing method and device
CN105302709B (en) Test data generating method and equipment
CN109241104A (en) The resolver and its implementation of AISQL in decision type distributed data base system
CN106919511A (en) The analogy method of application, simulation application and its operation method and simulation system
CN102779044A (en) Analysis processing system and analysis processing method of expression
CN104133891B (en) A kind of storage method of the massive structured data based on relevant database
CN110019315A (en) A kind of method and apparatus for the parsing of data blood relationship

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180427

Termination date: 20181218

CF01 Termination of patent right due to non-payment of annual fee