CN105574195A - Method and device for judging whether to perform offline recycling on database or not - Google Patents
Method and device for judging whether to perform offline recycling on database or not Download PDFInfo
- Publication number
- CN105574195A CN105574195A CN201510997513.9A CN201510997513A CN105574195A CN 105574195 A CN105574195 A CN 105574195A CN 201510997513 A CN201510997513 A CN 201510997513A CN 105574195 A CN105574195 A CN 105574195A
- Authority
- CN
- China
- Prior art keywords
- database
- described database
- production line
- judge
- running state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method and a device for judging whether to perform offline recycling on a database or not. The method comprises the steps of obtaining the type of the database serving as a judgment object; judging whether the type of the database is a relationship type or not; if yes, obtaining running state information of the database; and based on the running state information, judging whether the database meets an offline recycling condition or not according to a corresponding predetermined policy. According to the technical scheme provided by the invention, the running state information of each relationship type database can be automatically obtained and whether one relationship type database needs to be recycled offline or not is automatically judged, so that a user can recycle resources in time without the need for performing any manual operation and the resource utilization rate is greatly increased.
Description
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of judge database whether should roll off the production line reclaim method and device.
Background technology
In the present computer technology, the application of database is a very important technology, in current Internet age, the application of database all the more extensive especially, no matter be various website, platform or various application software all needs to arrange various database.
Broad sense, database can be divided into relevant database and non-relational database.The resource of database is limited, need the use it being carried out to repetitive cycling, at present judge whether will to some databases roll off the production line reclaim time, all need manually to carry out, can cause resource reclaim not in time like this, manual recovery also can bring very large workload to user simultaneously.
Summary of the invention
The present invention proposes a kind of judge database whether should roll off the production line reclaim method and device to overcome the problems referred to above or to solve the problem at least in part.
According to an aspect of the present invention, provide a kind of judge database whether should roll off the production line reclaim method, comprising:
Obtain the type as the database judging object;
Whether the type judging described database is relationship type;
If so, the running state information of described database is then obtained;
Based on described running state information, judge whether described database meets the recovering condition that rolls off the production line according to the predetermined policy of correspondence.
Alternatively, described running state information comprise following one of at least:
The running state of a process of described database;
The connected state of the example of described database;
The start-up time of the example of described database;
Whether there is business library in the example of described database, in described business library, whether there is traffic table;
The final data modification time of traffic table in the example of described database;
Whether carry is under Linux virtual server for the proxy server that described database uses.
Alternatively, according to the predetermined policy of correspondence judge described database whether meet the recovering condition that rolls off the production line comprise following one of at least:
Judge whether described database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then judge that described database meets the recovering condition that rolls off the production line;
Judge whether the process of described database is in running status, if not, then judge that described database meets the recovering condition that rolls off the production line;
Whether carry is under Linux virtual server to judge proxy server that described database uses, if not, then judges that described database meets the recovering condition that rolls off the production line;
Judge whether described database starts and exceed very first time threshold value, but do not set up business library or traffic table, if so, then judge that described database meets the recovering condition that rolls off the production line;
Judge whether described database starts to exceed described very first time threshold value, establish business library and traffic table and the final data modification time of described traffic table has exceeded the second time threshold, if, then judge whether described database has statement to access in scheduled duration, if not, then judge that described database meets the recovering condition that rolls off the production line.
Alternatively, the running state information of the described database of described acquisition comprises:
Timing performs the script of running state information for obtaining described database, obtains and preserves the running state information of described database.
Alternatively, if judge, described database meets the recovering condition that rolls off the production line, and describedly also comprises:
Foundation presets liaison method, and the keeper to described database sends to roll off the production line and reclaims prompting, and wherein said recovery prompting of rolling off the production line comprises the mark of described database and meets the running state information of the recovering condition that rolls off the production line.
Alternatively, described relevant database comprises: MySQL database.
According to another aspect of the present invention, additionally provide a kind of judge database whether should roll off the production line reclaim device, comprising:
Type acquisition module, for obtaining the type as the database judging object;
Type judging module, for judging whether the type of described database is relationship type;
Data obtaining module, for when the judged result of described type judging module is for being, obtains the running state information of described database;
Reclaim judge module, for based on described running state information, judge whether described database meets the recovering condition that rolls off the production line according to the predetermined policy of correspondence.
Alternatively, described running state information comprise following one of at least:
The running state of a process of described database;
The connected state of the example of described database;
The start-up time of the example of described database;
Whether there is business library in the example of described database, in described business library, whether there is traffic table;
The final data modification time of traffic table in the example of described database;
Whether carry is under Linux virtual server for the proxy server that described database uses.
Alternatively, described recovery judge module comprises:
, for judging whether described database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then judging that described database meets the recovering condition that rolls off the production line in the first judging unit;
Second judging unit, for judging whether the process of described database is in running status, if not, then judges that described database meets the recovering condition that rolls off the production line;
3rd judging unit, for judging proxy server that described database uses, whether carry is under Linux virtual server, if not, then judges that described database meets the recovering condition that rolls off the production line;
4th judging unit, exceedes very first time threshold value for judging whether described database starts, but does not set up business library or traffic table, if so, then judge that described database meets the recovering condition that rolls off the production line; And/or
5th judging unit, exceed described very first time threshold value for judging whether described database starts, establish business library and traffic table and the final data modification time of described traffic table has exceeded the second time threshold, if, then judge whether described database has statement to access in scheduled duration, if not, then judge that described database meets the recovering condition that rolls off the production line.
Alternatively, described data obtaining module comprises:
Timing acquisition unit, performing the script for obtaining described database running state information for timing, obtaining and preserving described database running state information.
Alternatively, said apparatus also comprises:
Reclaim reminding module, for judge at described recovery judge module described database meet roll off the production line recovering condition time, according to presetting liaison method, keeper to described database sends to roll off the production line and reclaims prompting, and wherein said recovery prompting of rolling off the production line comprises the mark of described database and meets the running state information of the recovering condition that rolls off the production line.
Alternatively, described relevant database comprises: MySQL database.
The running state information of each relevant database of technical scheme meeting automatic acquisition provided by the invention, and automatic decision relevant database is the need of recovery of rolling off the production line, thus do not need user to carry out any manual operation, just can Resource recovery in time, substantially increase the utilization factor of resource.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
According to hereafter by reference to the accompanying drawings to the detailed description of the specific embodiment of the invention, those skilled in the art will understand above-mentioned and other objects, advantage and feature of the present invention more.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 judges whether database should roll off the production line the schematic flow sheet of method reclaimed according to an embodiment of the invention;
Fig. 2 judges whether database should roll off the production line the schematic flow sheet of method reclaimed in accordance with another embodiment of the present invention;
Whether Fig. 3 should rolls off the production line the schematic flow sheet of method reclaimed according to the database that judges of another embodiment of the present invention
Fig. 4 judges whether database should roll off the production line the structured flowchart of device reclaimed according to an embodiment of the invention;
Fig. 5 judges whether database should roll off the production line the structured flowchart of device reclaimed in accordance with another embodiment of the present invention.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.It should be noted that, under the prerequisite of not conflicting, the technical characteristic in the embodiment of the present invention and embodiment can be combined with each other.
Fig. 1 judges whether database should roll off the production line the schematic flow sheet of method reclaimed according to an embodiment of the invention.As shown in Figure 1, said method can comprise:
Step S102, obtains the type as the database judging object;
Step S104, judges whether the type of database is relationship type;
Step S106, if so, then obtains the running state information of database;
According to the predetermined policy of correspondence, step S108, based on running state information, judges whether database meets the recovering condition that rolls off the production line.
The running state information of each relevant database of method meeting automatic acquisition that the present embodiment provides, and automatic decision relevant database is the need of recovery of rolling off the production line, thus do not need user to carry out any manual operation, and just can Resource recovery in time, substantially increase the utilization factor of resource.
In the method that the present embodiment provides, reclaimed to judge whether a relevant database can roll off the production line more efficiently and accurately, need reasonably to arrange need obtain data which running state information and according to these running state information judge database whether can roll off the production line recovery strategy.In one embodiment of the invention, above-mentioned running state information can comprise:
The running state of a process of database;
The connected state of the example of database;
The start-up time of the example of database;
Whether there is business library in the example of database, in business library, whether there is traffic table;
The final data modification time of traffic table in the example of database;
Whether carry is under Linux virtual server for the proxy server that database uses.
List in the present embodiment and severally the most typically can be used to judge whether a relevant database can roll off the production line the running state information reclaimed, substantially can cover all typical needs based on these running state information and to roll off the production line the running status of the relevant database reclaimed.Certainly, in the specific implementation, can select to obtain one or more running state information according to different needs, or add new running state information, the present invention is not specifically limited.
In one embodiment of the invention, corresponding to above-mentioned running state information, above-mentioned steps S108 can comprise:
1, judge whether database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then judge that database meets the recovering condition that rolls off the production line;
2, judge whether the process of database is in running status, if not, then judge that database meets the recovering condition that rolls off the production line;
3, whether carry is under Linux virtual server to judge proxy server that database uses, if not, then judges that database meets the recovering condition that rolls off the production line;
4, judge whether database starts and exceed very first time threshold value, but do not set up business library or traffic table, if so, then judge that database meets the recovering condition that rolls off the production line;
5, judge whether database starts to exceed very first time threshold value, establish business library and traffic table and the final data modification time of traffic table has exceeded the second time threshold, if, then judge whether database has statement to access in scheduled duration, if not, then judge that database meets the recovering condition that rolls off the production line.
In the present embodiment, database can not find out record on business cloud platform, but has data directory or example to start in server this locality, shows that database is not actually used, and needs to delete, recovery of namely rolling off the production line; The process of database be not in running status illustrated example need not, but leave over file, therefore need to delete; If database employs proxy server (proxy, also agency, network agent can be called), but there is no carry under Linux virtual server (LinuxVirtualServer, referred to as lvs), illustrate and do not provide online service, need to delete; Such as, if database starts exceed very first time threshold value, 60 days, but still there is no business library/table, belong to and exceed the time limit not used, need deletion; If database start exceed very first time threshold value (60 days), have business library/table and final data modification time more than the second time threshold, such as 60 days (adjustable), whether so need to capture it currently has statement to access, in certain hour section, whether there is statement to access in other words, if, do not show that its utility ratio is very low, can consider to delete, in this case, in order to ensure mistake to reclaim, can also and business personnel's secondary-confirmation, if need not confirm, then can delete.Above-mentioned strategy corresponds to above-mentioned running state information, can judge whether a relevant database can reclaim efficiently and accurately based on these strategies.
For relational data, when obtaining its running state information, a lot of means can be adopted, in the present invention, preferably adopting the mode performing special script.In one embodiment of the invention, above-mentioned steps S104 can comprise: timing performs the script of running state information for obtaining database, obtains and preserves the running state information of database.
Adopt special script acquisition number according to the running state information in storehouse, realize simple, the resource taken is less, and the efficiency of execution is also higher, is a kind of preferred scheme.
In one embodiment of the invention, as shown in Figure 2, judge database meet roll off the production line recovering condition time, said method can also comprise:
Step S110, according to default liaison method, the keeper to database sends to roll off the production line and reclaims prompting, and wherein rolling off the production line to reclaim to point out comprises the mark of database and meet the running state information of the recovering condition that rolls off the production line.
Based on the scheme that the present embodiment provides, right to know completely can be provided for data base administrator, make keeper can understand in real time database automatically roll off the production line reclaim implementation status.Simultaneously, also keeper is made can to carry out manual intervention in time, because in reality, occur that certain database meets the recovering condition that rolls off the production line possibly, but keeper is for some special considerations, still not to its situation about reclaiming that rolls off the production line, the scheme that the present embodiment provides is very large autonomous power for keeper provides.
MySQL is a kind of typical Relational DBMS, is developed, belong to company under Oracle at present by MySQLAB company of Sweden.The most popular Relational DBMS of MySQL, in WEB application, MySQL is one of best RDBMS (RelationalDatabaseManagementSystem, relational database management system) application software.MySQL is a kind of associated data base management system, and linked database saves the data in different tables, instead of all data is placed in a large warehouse, which adds speed and improves dirigibility.The sql like language that MySQL uses is the most frequently used standardized language for accessing database.MySQL software have employed two authorization policy, and it is divided into Community Edition and commercial version, and because its volume is little, speed is fast, the total cost of ownership is low, especially this feature of open source code, the exploitation of general middle-size and small-size website all selects MySQL as site databases.
MySQL database uses SQL (StructuredQueryLanguage, Structured Query Language (SQL)), it is a kind of programming language of specific purposes, is a kind of data base querying and programming language, for access data and inquiry, renewal and administrative relationships Database Systems; Also be the extension name of database script file simultaneously.
Structured Query Language (SQL) is senior deproceduring programming language, allows user to work in high level data structure.It does not require that user specifies the deposit method to data, user is not needed to understand concrete deposit data mode yet, so have the disparate databases system of complete different fabric, identical Structured Query Language (SQL) can be used as the interface of data input with management.Structured Query Language (SQL) statement can be nested, and this makes it have great dirigibility and powerful function.
The technical scheme that the various embodiments described above of the present invention provide can be applied to MySQL database very well, and the statement that the various embodiments described above relate to mainly comprises SQL statement.
Be described such scheme below by a specific embodiment, whether Fig. 3 should rolls off the production line the schematic flow sheet of method reclaimed according to the database that judges of another embodiment of the present invention, and as shown in Figure 3, the method can comprise:
Step S302, determines the MySQL database as judging object, and obtain the type of MySQL database, it is relevant database;
Step S304, judge whether the type as the MySQL database judging object is relationship type, judged result is yes;
Step S306, timing performs the script of running state information for obtaining MySQL database, obtains and preserves the running state information of described database, comprising: the running state of a process of MySQL database; The connected state of the example of MySQL database; The start-up time of the example of MySQL database; Whether there is business library in the example of MySQL database, in business library, whether there is traffic table; The final data modification time of traffic table in the example of MySQL database; Whether carry is under Linux virtual server for the proxy server that MySQL database uses;
Step S308, judges whether MySQL database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then performs step S318, if not, then performs step S310;
Step S310, judges whether the process of MySQL database is in running status, if not, then performs step S318, if so, then performs step S312;
Step S312, whether carry is under lvs to judge the proxy of MySQL database, if not, then performs step S318, if so, then performs step S314;
Step S314, judges whether MySQL database started more than 60 days, but does not set up business library or traffic table, if so, then performs step S318, if otherwise perform step S316;
Step S316, judge whether MySQL database starts more than 60 days, establish business library and traffic table and the final data modification time of traffic table has exceeded 60 days, if, then judge whether MySQL database has SQL statement to access in scheduled duration further, if not, then perform step S318, if so, then return step S302;
Step S318, determines that MySQL database meets the recovering condition that rolls off the production line;
Step S320, by note, mail or other similar modes, the keeper to MySQL database sends to roll off the production line and reclaims prompting, and wherein rolling off the production line to reclaim to point out comprises the mark of MySQL database and meet the running state information of the recovering condition that rolls off the production line;
Step S322, do not assign the prerequisite of the order not allowing to reclaim keeper under, roll off the production line recovery MySQL database.
When the scheme that concrete enforcement the present embodiment provides, server regularly can perform script in this locality on every Sundays the morning, carries out automatic analysis, analysis result is recorded to local file to database examples of ports all in the machine.Supervisor regularly can perform script on every Sundays afternoon, analysis results are obtained, then typing certain database to all database instance polls access that data base administrator's (DatabaseAdministrator is called for short DBA) manages.DBA is by logging in particular webpage, and backstage can automatically perform specific SQL and carry out analysis result displaying, and whole analytic process is without the need to artificial access.
Corresponding to the method that the various embodiments described above provide, the embodiment of the present invention additionally provide a kind of correspondence judge database whether should roll off the production line reclaim device.Fig. 4 judges whether database should roll off the production line the structured flowchart of device reclaimed according to an embodiment of the invention.As shown in Figure 4, this device can comprise:
Type acquisition module 10, for obtaining the type as the database judging object;
Type judging module 20, for judging whether the type of database is relationship type;
Data obtaining module 30, for when the judged result of type judging module 20 is for being, obtains the running state information of database;
Reclaim judge module 40, for based on running state information, judge whether database meets the recovering condition that rolls off the production line according to the predetermined policy of correspondence.
The running state information of each relevant database of device meeting automatic acquisition that the present embodiment provides, and automatic decision relevant database is the need of recovery of rolling off the production line, thus do not need user to carry out any manual operation, and just can Resource recovery in time, substantially increase the utilization factor of resource.
In one embodiment of the invention, running state information can comprise following one of at least:
The running state of a process of database;
The connected state of the example of database;
The start-up time of the example of database;
Whether there is business library in the example of database, in business library, whether there is traffic table;
The final data modification time of traffic table in the example of database;
Whether carry is under Linux virtual server for the proxy server that database uses.
List in the present embodiment and severally the most typically can be used to judge whether a relevant database can roll off the production line the running state information reclaimed, substantially can cover all typical needs based on these running state information and to roll off the production line the running status of the relevant database reclaimed.Certainly, in the specific implementation, can select to obtain one or more running state information according to different needs, or add new running state information, the present invention is not specifically limited.
In one embodiment of the invention, as shown in Figure 5, reclaim judge module 40 can comprise:
, for judging whether database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then judging that database meets the recovering condition that rolls off the production line in the first judging unit 41;
Second judging unit 42, for judging whether the process of database is in running status, if not, then judges that database meets the recovering condition that rolls off the production line;
3rd judging unit 43, for judging proxy server that database uses, whether carry is under Linux virtual server, if not, then judges that database meets the recovering condition that rolls off the production line;
4th judging unit 44, exceedes very first time threshold value for judging whether database starts, but does not set up business library or traffic table, if so, then judge that database meets the recovering condition that rolls off the production line; And/or
5th judging unit 45, exceed very first time threshold value for judging whether database starts, establish business library and traffic table and the final data modification time of traffic table has exceeded the second time threshold, if, then judge whether database has statement to access in scheduled duration, if not, then judge that database meets the recovering condition that rolls off the production line.
Corresponding to above-mentioned typical running state information, the unit of the recovery judge module 40 provided based on the present embodiment can judge whether a relevant database can reclaim efficiently and accurately.
In one embodiment of the invention, as shown in Figure 5, data obtaining module 30 can comprise:
Timing acquisition unit 31, performing the script for obtaining database running state information for timing, obtaining and preserving database running state information.
In the scheme that the present embodiment provides, the timing acquisition unit 31 belonging to data obtaining module 30 adopts special script acquisition number according to the running state information in storehouse, and realize simple, the resource taken is less, and the efficiency of execution is also higher.
In one embodiment of the invention, as shown in Figure 5, said apparatus can also comprise:
Reclaim reminding module 50, for reclaim judge module 40 judge database meet roll off the production line recovering condition time, according to presetting liaison method, keeper to database sends to roll off the production line and reclaims prompting, wherein rolls off the production line to reclaim to point out comprise the mark of database and meet the running state information of the recovering condition that rolls off the production line.
In the scheme that the present embodiment provides, reclaim reminding module 50 provide right to know completely for data base administrator, make keeper can understand in real time database automatically roll off the production line recovery implementation status.Simultaneously, also keeper is made can to carry out manual intervention in time, because in reality, occur that certain database meets the recovering condition that rolls off the production line possibly, but keeper is for some special considerations, still not to its situation about reclaiming that rolls off the production line, the scheme that the present embodiment provides is that keeper provides very large autonomous power.
Preferably, in each embodiment above-mentioned, the relevant database of design can be MySQL database, and the statement related to can be SQL statement.
The running state information of each relevant database of scheme meeting automatic acquisition that the embodiment of the present invention provides, and automatic decision relevant database is the need of recovery of rolling off the production line, simultaneously, the result judged can send to data base administrator in time by the mode of subscribing, thus do not need user to carry out any manual operation, just can Resource recovery in time, substantially increase the utilization factor of resource.In a special case, data base administrator also can stop the reclaimer operation that rolls off the production line to certain specific database, for keeper provides very large autonomous power.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in detail in the claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions of some or all parts whether database should roll off the production line in the device that reclaims that judge that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.
So far, those skilled in the art will recognize that, although multiple exemplary embodiment of the present invention is illustrate and described herein detailed, but, without departing from the spirit and scope of the present invention, still can directly determine or derive other modification many or amendment of meeting the principle of the invention according to content disclosed by the invention.Therefore, scope of the present invention should be understood and regard as and cover all these other modification or amendments.
According to an aspect of the present invention, provide A1. mono-kind judge database whether should roll off the production line reclaim method, comprising:
Obtain the type as the database judging object;
Whether the type judging described database is relationship type;
If so, the running state information of described database is then obtained;
Based on described running state information, judge whether described database meets the recovering condition that rolls off the production line according to the predetermined policy of correspondence.
A2. the method according to A1, wherein, described running state information comprise following one of at least:
The running state of a process of described database;
The connected state of the example of described database;
The start-up time of the example of described database;
Whether there is business library in the example of described database, in described business library, whether there is traffic table;
The final data modification time of traffic table in the example of described database;
Whether carry is under Linux virtual server for the proxy server that described database uses.
A3. the method according to A2, wherein, described based on described running state information, according to the predetermined policy of correspondence judge described database whether meet the recovering condition that rolls off the production line comprise following one of at least:
Judge whether described database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then judge that described database meets the recovering condition that rolls off the production line;
Judge whether the process of described database is in running status, if not, then judge that described database meets the recovering condition that rolls off the production line;
Whether carry is under Linux virtual server to judge proxy server that described database uses, if not, then judges that described database meets the recovering condition that rolls off the production line;
Judge whether described database starts and exceed very first time threshold value, but do not set up business library or traffic table, if so, then judge that described database meets the recovering condition that rolls off the production line;
Judge whether described database starts to exceed described very first time threshold value, establish business library and traffic table and the final data modification time of described traffic table has exceeded the second time threshold, if, then judge whether described database has statement to access in scheduled duration, if not, then judge that described database meets the recovering condition that rolls off the production line.
A4. the method according to A1, wherein, the running state information of the described database of described acquisition comprises:
Timing performs the script of running state information for obtaining described database, obtains and preserves the running state information of described database.
A5. the method according to any one of A1-A4, wherein, if judge, described database meets the recovering condition that rolls off the production line, and described method also comprises:
Foundation presets liaison method, and the keeper to described database sends to roll off the production line and reclaims prompting, and wherein said recovery prompting of rolling off the production line comprises the mark of described database and meets the running state information of the recovering condition that rolls off the production line.
A6. the method according to any one of A1-A4, wherein, described relevant database comprises: MySQL database.
According to another aspect of the present invention, additionally provide B7. mono-kind judge database whether should roll off the production line reclaim device, comprising:
Type acquisition module, for obtaining the type as the database judging object;
Type judging module, for judging whether the type of described database is relationship type;
Data obtaining module, for when the judged result of described type judging module is for being, obtains the running state information of described database;
Reclaim judge module, for based on described running state information, judge whether described database meets the recovering condition that rolls off the production line according to the predetermined policy of correspondence.
B8. the device according to B7, wherein, described running state information comprise following one of at least:
The running state of a process of described database;
The connected state of the example of described database;
The start-up time of the example of described database;
Whether there is business library in the example of described database, in described business library, whether there is traffic table;
The final data modification time of traffic table in the example of described database;
Whether carry is under Linux virtual server for the proxy server that described database uses.
B9. the device according to B8, wherein, described recovery judge module comprises:
, for judging whether described database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then judging that described database meets the recovering condition that rolls off the production line in the first judging unit;
Second judging unit, for judging whether the process of described database is in running status, if not, then judges that described database meets the recovering condition that rolls off the production line;
3rd judging unit, for judging proxy server that described database uses, whether carry is under Linux virtual server, if not, then judges that described database meets the recovering condition that rolls off the production line;
4th judging unit, exceedes very first time threshold value for judging whether described database starts, but does not set up business library or traffic table, if so, then judge that described database meets the recovering condition that rolls off the production line; And/or
5th judging unit, exceed described very first time threshold value for judging whether described database starts, establish business library and traffic table and the final data modification time of described traffic table has exceeded the second time threshold, if, then judge whether described database has statement to access in scheduled duration, if not, then judge that described database meets the recovering condition that rolls off the production line.
B10. the device according to B7, wherein, described data obtaining module comprises:
Timing acquisition unit, performing the script for obtaining described database running state information for timing, obtaining and preserving described database running state information.
B11. the device according to any one of B7-B10, wherein, also comprises:
Reclaim reminding module, for judge at described recovery judge module described database meet roll off the production line recovering condition time, according to presetting liaison method, keeper to described database sends to roll off the production line and reclaims prompting, and wherein said recovery prompting of rolling off the production line comprises the mark of described database and meets the running state information of the recovering condition that rolls off the production line.
B12. the device according to any one of B7-B10, wherein, described relevant database comprises: MySQL database.
Claims (10)
1. judge database whether should roll off the production line reclaim a method, comprising:
Obtain the type as the database judging object;
Whether the type judging described database is relationship type;
If so, the running state information of described database is then obtained;
Based on described running state information, judge whether described database meets the recovering condition that rolls off the production line according to the predetermined policy of correspondence.
2. method according to claim 1, wherein, described running state information comprise following one of at least:
The running state of a process of described database;
The connected state of the example of described database;
The start-up time of the example of described database;
Whether there is business library in the example of described database, in described business library, whether there is traffic table;
The final data modification time of traffic table in the example of described database;
Whether carry is under Linux virtual server for the proxy server that described database uses.
3. method according to claim 2, wherein, described based on described running state information, according to the predetermined policy of correspondence judge described database whether meet the recovering condition that rolls off the production line comprise following one of at least:
Judge whether described database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then judge that described database meets the recovering condition that rolls off the production line;
Judge whether the process of described database is in running status, if not, then judge that described database meets the recovering condition that rolls off the production line;
Whether carry is under Linux virtual server to judge proxy server that described database uses, if not, then judges that described database meets the recovering condition that rolls off the production line;
Judge whether described database starts and exceed very first time threshold value, but do not set up business library or traffic table, if so, then judge that described database meets the recovering condition that rolls off the production line;
Judge whether described database starts to exceed described very first time threshold value, establish business library and traffic table and the final data modification time of described traffic table has exceeded the second time threshold, if, then judge whether described database has statement to access in scheduled duration, if not, then judge that described database meets the recovering condition that rolls off the production line.
4. method according to claim 1, wherein, the running state information of the described database of described acquisition comprises:
Timing performs the script of running state information for obtaining described database, obtains and preserves the running state information of described database.
5. the method according to any one of claim 1-4, wherein, if judge, described database meets the recovering condition that rolls off the production line, and described method also comprises:
Foundation presets liaison method, and the keeper to described database sends to roll off the production line and reclaims prompting, and wherein said recovery prompting of rolling off the production line comprises the mark of described database and meets the running state information of the recovering condition that rolls off the production line.
6. the method according to any one of claim 1-4, wherein, described relevant database comprises: MySQL database.
7. judge database whether should roll off the production line reclaim a device, comprising:
Type acquisition module, for obtaining the type as the database judging object;
Type judging module, for judging whether the type of described database is relationship type;
Data obtaining module, for when the judged result of described type judging module is for being, obtains the running state information of described database;
Reclaim judge module, for based on described running state information, judge whether described database meets the recovering condition that rolls off the production line according to the predetermined policy of correspondence.
8. device according to claim 7, wherein, described running state information comprise following one of at least:
The running state of a process of described database;
The connected state of the example of described database;
The start-up time of the example of described database;
Whether there is business library in the example of described database, in described business library, whether there is traffic table;
The final data modification time of traffic table in the example of described database;
Whether carry is under Linux virtual server for the proxy server that described database uses.
9. device according to claim 8, wherein, described recovery judge module comprises:
, for judging whether described database does not exist record on business cloud platform, but there is data directory in server this locality or the example starts, if so, then judging that described database meets the recovering condition that rolls off the production line in the first judging unit;
Second judging unit, for judging whether the process of described database is in running status, if not, then judges that described database meets the recovering condition that rolls off the production line;
3rd judging unit, for judging proxy server that described database uses, whether carry is under Linux virtual server, if not, then judges that described database meets the recovering condition that rolls off the production line;
4th judging unit, exceedes very first time threshold value for judging whether described database starts, but does not set up business library or traffic table, if so, then judge that described database meets the recovering condition that rolls off the production line; And/or
5th judging unit, exceed described very first time threshold value for judging whether described database starts, establish business library and traffic table and the final data modification time of described traffic table has exceeded the second time threshold, if, then judge whether described database has statement to access in scheduled duration, if not, then judge that described database meets the recovering condition that rolls off the production line.
10. device according to claim 7, wherein, described data obtaining module comprises:
Timing acquisition unit, performing the script for obtaining described database running state information for timing, obtaining and preserving described database running state information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510997513.9A CN105574195B (en) | 2015-12-25 | 2015-12-25 | Judge whether database answers the method and device of offline recycling |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510997513.9A CN105574195B (en) | 2015-12-25 | 2015-12-25 | Judge whether database answers the method and device of offline recycling |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105574195A true CN105574195A (en) | 2016-05-11 |
CN105574195B CN105574195B (en) | 2019-07-23 |
Family
ID=55884326
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510997513.9A Active CN105574195B (en) | 2015-12-25 | 2015-12-25 | Judge whether database answers the method and device of offline recycling |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105574195B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108460160A (en) * | 2018-03-29 | 2018-08-28 | 武汉斗鱼网络科技有限公司 | Inserting method, device, terminal and the storage medium of database instance |
CN111752695A (en) * | 2020-06-28 | 2020-10-09 | 北京百度网讯科技有限公司 | Offline method, device, equipment and storage medium |
CN118708595A (en) * | 2024-08-29 | 2024-09-27 | 智者四海(北京)技术有限公司 | Retrospective database table recovery management method apparatus, device and medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6209062B1 (en) * | 1997-11-24 | 2001-03-27 | Intel Corporation | Method for holding cache pages that are not invalidated within normal time duration for a second access or that are likely to be accessed again soon |
US20060074956A1 (en) * | 2004-10-05 | 2006-04-06 | Oracle International Corporation | Method and system for time-based reclamation of objects from a recycle bin in a database |
CN101539878A (en) * | 2008-03-18 | 2009-09-23 | 环达电脑(上海)有限公司 | Method for accelerating oracle process to monitor recycled resources under operating system |
CN102567531A (en) * | 2011-12-30 | 2012-07-11 | 互动在线(北京)科技有限公司 | General method for monitoring status of light database |
CN103365929A (en) * | 2012-04-10 | 2013-10-23 | 阿里巴巴集团控股有限公司 | Management method and management system of database connection |
CN104486155A (en) * | 2014-12-15 | 2015-04-01 | 北京趣拿软件科技有限公司 | Database cluster monitoring method and system |
CN104809247A (en) * | 2015-05-18 | 2015-07-29 | 北京京东尚科信息技术有限公司 | Allocation and recovery method of database connections |
-
2015
- 2015-12-25 CN CN201510997513.9A patent/CN105574195B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6209062B1 (en) * | 1997-11-24 | 2001-03-27 | Intel Corporation | Method for holding cache pages that are not invalidated within normal time duration for a second access or that are likely to be accessed again soon |
US20060074956A1 (en) * | 2004-10-05 | 2006-04-06 | Oracle International Corporation | Method and system for time-based reclamation of objects from a recycle bin in a database |
CN101539878A (en) * | 2008-03-18 | 2009-09-23 | 环达电脑(上海)有限公司 | Method for accelerating oracle process to monitor recycled resources under operating system |
CN102567531A (en) * | 2011-12-30 | 2012-07-11 | 互动在线(北京)科技有限公司 | General method for monitoring status of light database |
CN103365929A (en) * | 2012-04-10 | 2013-10-23 | 阿里巴巴集团控股有限公司 | Management method and management system of database connection |
CN104486155A (en) * | 2014-12-15 | 2015-04-01 | 北京趣拿软件科技有限公司 | Database cluster monitoring method and system |
CN104809247A (en) * | 2015-05-18 | 2015-07-29 | 北京京东尚科信息技术有限公司 | Allocation and recovery method of database connections |
Non-Patent Citations (1)
Title |
---|
FEI LIU: "A Method of Design and Optimization of Database Connection Pool", 《2012 4TH INTERNATIONAL CONFERENCE ON INTELLIGENT HUMAN-MACHINE SYSTEMS AND CYBERNETICS》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108460160A (en) * | 2018-03-29 | 2018-08-28 | 武汉斗鱼网络科技有限公司 | Inserting method, device, terminal and the storage medium of database instance |
CN108460160B (en) * | 2018-03-29 | 2021-03-12 | 武汉斗鱼网络科技有限公司 | Off-line method, device, terminal and storage medium of database instance |
CN111752695A (en) * | 2020-06-28 | 2020-10-09 | 北京百度网讯科技有限公司 | Offline method, device, equipment and storage medium |
CN118708595A (en) * | 2024-08-29 | 2024-09-27 | 智者四海(北京)技术有限公司 | Retrospective database table recovery management method apparatus, device and medium |
Also Published As
Publication number | Publication date |
---|---|
CN105574195B (en) | 2019-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102541529B (en) | A kind of query page generating device and method | |
CN106778253A (en) | Threat context aware information security Initiative Defense model based on big data | |
CN1728149A (en) | Method, system, and apparatus for discovering and connecting to data sources | |
CN103678494A (en) | Method and device for client side and server side data synchronization | |
CN105653607A (en) | SQL (Structured Query Language) log collection and analysis method and device | |
CN106371984A (en) | Data monitoring method, equipment and system | |
CN101937474A (en) | Mass data query method and device | |
CN105426544A (en) | Method and device for monitoring state of database | |
CN101673374B (en) | Bill processing method and device | |
CN106503274A (en) | A kind of Data Integration and searching method and server | |
CN105183768A (en) | File management method, apparatus and terminal device | |
CN105528454A (en) | Log treatment method and distributed cluster computing device | |
CN1717686A (en) | Automatic data consolidation | |
CN113010484A (en) | Log file management method and device | |
CN105574195A (en) | Method and device for judging whether to perform offline recycling on database or not | |
CN108549659B (en) | Data warehouse management system and management method | |
CN111858486B (en) | File classification method and device | |
US20200220928A1 (en) | Managing shared content directory structure metadata | |
CN108377228B (en) | Authority management method and device and server | |
CN101866356B (en) | Structural management method for disk directory information | |
CN111611276A (en) | Data query method, device and storage medium | |
CN106844497A (en) | The check device and method of a kind of database code | |
CN114020893A (en) | Log retrieval method and device based on distributed storage and storage medium | |
CN104462967A (en) | Method, device and system for file recovery | |
CN116303628B (en) | Alarm data query method, system and equipment based on elastic search |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220718 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |