Sql tracking method and tool for oracle database

A tracking tool and database technology, applied in electrical digital data processing, instruments, hardware monitoring, etc., can solve problems such as difficulty in finding SQL, time-consuming, cumbersome reporting steps for AWR, etc., and achieve the effect of solving SQL tracking difficulties and saving time.

Pending Publication Date: 2020-11-24
INSPUR QILU SOFTWARE IND
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This is a relatively common method, but the disadvantage is that the steps to generate an awr report each time are cumbersome, especially when multiple captures and analysis are required, it takes a long time, and there are many other indicators in the report, it is very difficult to find sql

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Sql tracking method and tool for oracle database
  • Sql tracking method and tool for oracle database
  • Sql tracking method and tool for oracle database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] combined with figure 1 , the present embodiment proposes a sql tracking method of an oracle database, and the implementation process of the method includes:

[0039] 1) After logging in and connecting to the oracle database that needs to track sql, back up the current database v$sqlarea view through sql: create table trace_start as select* from v$sqlarea, back up the data contained in the current database v$sqlarea view to table A, table A It is the table trace_start; after the backup is completed, record the database time at this moment: select sysdate from dual, and assign the query time to the program variable T. Its specific implementation code is as follows:

[0040]

[0041] 2) Start the business operating system and perform business operations that need to track sql, such as performing voucher query or voucher storage in the financial management system.

[0042] 3) After completing the business operations that need to be tracked, back up the current database...

Embodiment 2

[0053] Reference attached figure 1 , 2 , the present embodiment proposes a sql tracking tool for an oracle database, which includes a login module 1 , a backup module 1 2 , a backup module 2 3 , and a comparison processing module 4 .

[0054] Login module 1 is used to assist users to log in and connect to the oracle database that needs to track sql.

[0055] The backup module 12 is used to back up the current v$sqlarea view to the table trace_start through sql, and record the current database time, and assign the query time to the program variable T.

[0056] Start the business operating system that needs to track sql, and perform a certain business operation, such as executing the voucher query or voucher storage business of the financial management system. After the execution is completed, the backup module 2 3 is used to back up the current database v$sqlarea view to the table trace_end.

[0057] The comparison processing module 4 is used to compare the corresponding fiel...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an sql tracking method for an oracle database, and relates to the technical field of data tracking. The method comprises the following steps of: (1) after logging in and connecting an oracle database needing sql tracking, backing up a current vSsqlaria view through the sql, and recording the database time at the moment; (2) starting a business operation system, and executing business operation needing sql tracking, such as certificate query or certificate storage business of a financial management system; (3) after executing the business operation needing tracking, backing up the current database vSsqlaria view again; and (4) comparing the corresponding fields of the vSsqlaria view in the step (3) and the vSsqlaria view in the step (1), and obtaining all sql and related indexes through the difference value of the corresponding fields in the two views. The invention further discloses an sql tracking tool for an oracle database. The four steps are achieved througha login module, a first backup module, a second backup module and a comparison processing module. According to the invention, the sql of an oracle database in a certain business scene can be quicklytracked, and the problem that the oracle database sql is difficult to track is solved.

Description

technical field [0001] The invention relates to the technical field of oracle databases, in particular to an oracle database SQL tracking method and tool. Background technique [0002] In the production environment of business software, various databases are used in the backend of many products, among which the oracle database accounts for a high proportion, especially in some large-scale projects. In the process of using the product, various performance problems may be encountered. To locate the problems encountered, it is necessary to analyze and research from various aspects. One of the more important items is database SQL tuning, that is, to analyze the execution time of SQL, CPU usage, disk read and write, etc., to see if there is room for optimization. [0003] Compared with other databases, such as Microsoft's sqlserver database has its own sql tracking and analysis tool sqlprofiler, etc., the official oracle database does not provide a convenient, easy-to-use and fa...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/30G06F11/34
CPCG06F11/302G06F11/3093G06F11/3423G06F11/3476G06F2201/80G06F2201/865
Inventor 陈静孙鹏
Owner INSPUR QILU SOFTWARE IND
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products