CN102662694A - Batch processing upgrading method and upgrading device for database scripts - Google Patents
Batch processing upgrading method and upgrading device for database scripts Download PDFInfo
- Publication number
- CN102662694A CN102662694A CN2012100775881A CN201210077588A CN102662694A CN 102662694 A CN102662694 A CN 102662694A CN 2012100775881 A CN2012100775881 A CN 2012100775881A CN 201210077588 A CN201210077588 A CN 201210077588A CN 102662694 A CN102662694 A CN 102662694A
- Authority
- CN
- China
- Prior art keywords
- database
- script
- upgrading
- upgrade
- batch processing
- 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
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
The invention provides a batch processing upgrading method for database scripts. The method comprises the steps of encrypting a batch processing script program so as to protect the content of the scripts, and verifying a database access password input by a client; upgrading the database script files when password is correct, and giving a prompt for the client through an interface, directly writing the database script codes into batch processing scripts, outputting all database upgrading script files as database upgrading script temporary files; sequentially executing the database upgrading script temporary files according to the sequence of the upgrading requirement of the database, simultaneously outputting script execution journal files, and deleting when the execution of all the database upgrading script temporary files is finished; checking the journal files of the database scripts upgrading, confirming no errors, returning upgrading success and displaying a client interface; and confirming errors, returning upgrading failure, and displaying a client interface. The upgrading method for database scripts has the characteristics of being high-efficient, accurate, simple and convenient to operate, humanized and the like.
Description
[technical field]
The present invention relates to a kind of upgrade method and upgrading device of database script.
[background technology]
Prior art needs to connect earlier database to the upgrading of database, sets up to inquire about to carry out to import upgrade script, and script file need pursue each execution at most.
Above-mentioned upgrade method needs the professional and technical personnel, and upgrade step is loaded down with trivial details, and inconvenience needs script file execution upgrading in order on query analyzer one by one.Upgrade cost is high like this, wastes time and energy inefficiency.And manual work imports script file and upgrades, easy error or order execution error, and careless sometimes mistake has been struck keyboard, causes script error.
Also there is the application of using the batch processing shell script to carry out the database upgrade script in prior art; But the just upgrading of script order, the access password that is untreated does not have the upgrading interface of hommization; And the feedback of updating result, there is the risk of destroying database.The database upgrade script all is a plain code, does not have security, a confidentiality, exists arbitrarily to be altered.
If upgrade script file number is many, wayward and management.
[summary of the invention]
One of technical matters that the present invention will solve is to provide a kind of database script upgrade method of efficient, accurate, easy and simple to handle, hommization.
The present invention is achieved in that a kind of batch processing upgrade method of database script, comprises the steps:
Step 20, encryption batch processing shell script; And a cryptographic variable is set, and an interface for password input is provided, be used for client's input database access code; Then the password of user's input is tested; Password correctly then carries out next step, and the password mistake will be returned and re-enter password, and the prompt cipher error message;
Step 30, carry out the upgrading of database script file; And upgrade to client prompting through the interface; All database upgrade script files are exported, again as database upgrade script temporary file in write direct batch processing script the inside of database script code;
Step 40, in turn carry out said database upgrade script temporary file by the order of database upgrade requirement; Export script execution journal file simultaneously; Carry out end when all database upgrade script temporary files, delete all database upgrade script temporary files;
Inerrancy is confirmed in step 50, inspection database script upgrading daily record, returns and upgrades successfully, and show customer interface; Define mistake, return the upgrading failure, and show customer interface.
Further, also comprise before the said step 20: step 10, through friendly client's foregrounding interface, export one section upgrading and explain, be used to point out the customer upgrade points for attention.
Further, in the said step 40, said order by the database upgrade requirement is to use the OSQL order when in turn carrying out said database upgrade script temporary file.Be to use findstr order inspection database script upgrading daily record in the said step 50.
Two of the technical matters that the present invention will solve is to provide a kind of batch processing upgrading device that can realize that database script efficient, accurate, easy and simple to handle, hommization is upgraded.
The present invention is achieved in that a kind of batch processing upgrading device of database script, and it comprises:
Encrypting module: be used to encrypt the batch processing shell script;
Database password authentication module: be used to be provided with a cryptographic variable; And an interface for password input is provided; Be used for client's input database access code, then the password of user's input tested, password correctly then carries out next step; The password mistake will be returned and re-enter password, and the prompt cipher error message;
The generation module of database script file: carry out the upgrading of database script file; And upgrade to client prompting through the interface; The database script code writes direct inside the batch processing script; Export all database upgrade script files again, as database upgrade script temporary file;
The upgrading module of database upgrade script: in turn carry out said database upgrade script temporary file by the order of database upgrade requirement; Export script execution journal file simultaneously; Carry out end when all database upgrade script temporary files, delete all database upgrade script temporary files;
Daily record inspection module: inspection database script upgrading daily record, confirm inerrancy, return and upgrade successfully, and show customer interface; Define mistake, return the upgrading failure, and show customer interface.
Further, the upgrading module of said database upgrade script is to use the OSQL order in turn to carry out said database upgrade script temporary file by the order of database upgrade requirement.Said daily record inspection module is to use findstr order inspection database script upgrading daily record.
The present invention has following advantage: the present invention exports all database upgrade script files, as database upgrade script temporary file again with write direct batch processing script the inside of database script code; In turn carry out said database upgrade script temporary file by the order of database upgrade requirement then, realized that the database upgrade script file is converted into final batch program, upgrade step is simple and convenient, and efficient is high and be difficult for makeing mistakes; Utilization of the present invention is encrypted the batch processing shell script, and updating result is fed back, and security, confidentiality are higher.The present invention has the upgrading interface of hommization, and the professional requirement of carrying out the technology of upgrading personnel is greatly reduced.
[description of drawings]
Combine embodiment that the present invention is further described with reference to the accompanying drawings.
Fig. 1 is the flow performing block diagram of the batch processing upgrade method of database script of the present invention.
Fig. 2 is the execution FB(flow block) of the script of the inventive method.
[embodiment]
As depicted in figs. 1 and 2, the present invention provides a kind of batch processing upgrading device of database script, and the upgrading device comprises:
Encrypting module: be used to encrypt the batch processing shell script.
Database password authentication module: be used to be provided with a cryptographic variable; And an interface for password input is provided; Require client's input database access code, then the password of user's input is tested, password correctly then carries out next step; The password mistake will be returned and re-enter password, and the prompt cipher error message.
The generation module of database script file: carry out the upgrading of database script file; And upgrade to client prompting through the interface; The database script code writes direct inside the batch processing script; Export all database upgrade script files again, as database upgrade script temporary file.
The upgrading module of database upgrade script: in turn carry out said database upgrade script temporary file by the order of database upgrade requirement; Export script execution journal file simultaneously; Carry out end when all database upgrade script temporary files, delete all database upgrade script temporary files; The upgrading module of this database upgrade script can use the OSQL order in turn to carry out said database upgrade script temporary file by the order of database upgrade requirement.
Daily record inspection module: inspection database script upgrading daily record, confirm inerrancy, return and upgrade successfully, and show customer interface; Define mistake, return the upgrading failure, and show customer interface; Said daily record inspection module can be used findstr order inspection database script upgrading daily record.
Need to prove: batch processing upgrading device of the present invention is a batch processing shell script, and client's foregrounding interface of a close friend is arranged, and at first exports one section close friend's upgrading explanation, can get into password authentication module by any key after confirming; The batch processing shell script is placed on optional position on the database server that needs upgrading, carries out batch program.What show after the program run is a close friend's upgrading explanation interface.
Please again with reference to figure 1 and Fig. 2, the batch processing upgrade method of database script of the present invention can adopt above-mentioned batch processing upgrading device to upgrade, and comprises the steps:
Step 10, through friendly client's foregrounding interface, export one section upgrading and explains, be used to point out the customer upgrade points for attention.
Step 20, encrypt the batch processing shell script through encrypting module; Through the database password authentication module cryptographic variable is set again; An interface for password input is provided; Be used for client's input database access code, then the password of user's input tested, password correctly then carries out next step; The password mistake will be returned and re-enter password, and the prompt cipher error message.
Step 30, carry out the upgrading of database script file through the generation module of database script file; And upgrade to client prompting through the interface; The database script code writes direct inside the batch processing script; Export all database upgrade script files again, as database upgrade script temporary file; If a plurality of database upgrade script files are arranged, generate until last database upgrade script temporary file.
Step 40, in turn carry out said database upgrade script temporary file by the order of database upgrade requirement through the upgrading module of database upgrade script; Export script execution journal file simultaneously; Carry out end when all database upgrade script temporary files, delete all database upgrade script temporary files; When carrying out said database upgrade script temporary file successively, can use the OSQL order.
Inerrancy is confirmed in step 50, inspection database script upgrading daily record, returns and upgrades successfully, and show customer interface; Define mistake, return the upgrading failure, and show customer interface.Inspection database script upgrading daily record can be used the findstr order.
Need to prove: top said database upgrade script is to adopt the mode of the batch processing shell script that writes direct to carry out; As can realize through another batch processing shell script; This another batch processing shell script has encapsulated each module in the batch processing upgrading device of said database script simultaneously, and fulfillment database upgrade script file is converted into final batch program.
In sum, the present invention exports all database upgrade script files, as database upgrade script temporary file again with write direct batch processing script the inside of database script code; In turn carry out said database upgrade script temporary file by the order of database upgrade requirement then, realized that the database upgrade script file is converted into final batch program, upgrade step is simple and convenient, and efficient is high and be difficult for makeing mistakes; Utilization of the present invention is encrypted the batch processing shell script, and updating result is fed back, and security, confidentiality are higher.The present invention has the upgrading interface of hommization, and the professional requirement of carrying out the technology of upgrading personnel is greatly reduced.
Though more than described embodiment of the present invention; But the technician who is familiar with the present technique field is to be understood that; We described concrete embodiment is illustrative; Rather than being used for qualification to scope of the present invention, those of ordinary skill in the art are in the modification and the variation of the equivalence of doing according to spirit of the present invention, all should be encompassed in the scope that claim of the present invention protects.
Claims (7)
1. the batch processing upgrade method of a database script is characterized in that: comprise the steps:
Step 20, encryption batch processing shell script; And a cryptographic variable is set, and an interface for password input is provided, be used for client's input database access code; Then the password of user's input is tested; Password correctly then carries out next step, and the password mistake will be returned and re-enter password, and the prompt cipher error message;
Step 30, carry out the upgrading of database script file; And upgrade to client prompting through the interface; All database upgrade script files are exported, again as database upgrade script temporary file in write direct batch processing script the inside of database script code;
Step 40, in turn carry out said database upgrade script temporary file by the order of database upgrade requirement; Export script execution journal file simultaneously; Carry out end when all database upgrade script temporary files, delete all database upgrade script temporary files;
Inerrancy is confirmed in step 50, inspection database script upgrading daily record, returns and upgrades successfully, and show customer interface; Define mistake, return the upgrading failure, and show customer interface.
2. the batch processing upgrade method of database script according to claim 1 is characterized in that: before said step 20, also comprise:
Step 10, through friendly client's foregrounding interface, export one section upgrading and explains, be used to point out the customer upgrade points for attention.
3. the batch processing upgrade method of database script according to claim 1 is characterized in that: in the said step 40, said order by the database upgrade requirement is to use the OSQL order when in turn carrying out said database upgrade script temporary file.
4. the batch processing upgrade method of database script according to claim 1 is characterized in that: be to use findstr order inspection database script upgrading daily record in the said step 50.
5. the batch processing of database script upgrading device is characterized in that: comprise
Encrypting module: be used to encrypt the batch processing shell script;
Database password authentication module: be used to be provided with a cryptographic variable; And an interface for password input is provided; Be used for client's input database access code, then the password of user's input tested, password correctly then carries out next step; The password mistake will be returned and re-enter password, and the prompt cipher error message;
The generation module of database script file: carry out the upgrading of database script file; And upgrade to client prompting through the interface; The database script code writes direct inside the batch processing script; Export all database upgrade script files again, as database upgrade script temporary file;
The upgrading module of database upgrade script: in turn carry out said database upgrade script temporary file by the order of database upgrade requirement; Export script execution journal file simultaneously; Carry out end when all database upgrade script temporary files, delete all database upgrade script temporary files;
Daily record inspection module: inspection database script upgrading daily record, confirm inerrancy, return and upgrade successfully, and show customer interface; Define mistake, return the upgrading failure, and show customer interface.
6. the batch processing of database script according to claim 5 upgrading device, it is characterized in that: the upgrading module of said database upgrade script is to use the OSQL order in turn to carry out said database upgrade script temporary file by the order of database upgrade requirement.
7. the batch processing of database script according to claim 5 upgrading device, it is characterized in that: said daily record inspection module is to use findstr order inspection database script upgrading daily record.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210077588.1A CN102662694B (en) | 2012-03-22 | 2012-03-22 | The batch processing upgrade method of database script and upgrading device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210077588.1A CN102662694B (en) | 2012-03-22 | 2012-03-22 | The batch processing upgrade method of database script and upgrading device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102662694A true CN102662694A (en) | 2012-09-12 |
CN102662694B CN102662694B (en) | 2016-03-30 |
Family
ID=46772195
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210077588.1A Active CN102662694B (en) | 2012-03-22 | 2012-03-22 | The batch processing upgrade method of database script and upgrading device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102662694B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103530532A (en) * | 2013-09-17 | 2014-01-22 | 亚欧宝龙信息安全技术(湖南)有限公司 | File encryption method and system |
CN104899061A (en) * | 2015-05-27 | 2015-09-09 | 浪潮电子信息产业股份有限公司 | Method for automatically refreshing FRU information |
CN107301057A (en) * | 2017-07-28 | 2017-10-27 | 山东中创软件工程股份有限公司 | A kind of big data batch processing method and device |
CN110119599A (en) * | 2019-05-21 | 2019-08-13 | 国网福建省电力有限公司 | A kind of basic software platform automation safety encryption and system |
CN110825413A (en) * | 2019-11-04 | 2020-02-21 | 江苏金智教育信息股份有限公司 | Database upgrading method and device and application deployment upgrading method and device |
CN111708792A (en) * | 2020-06-16 | 2020-09-25 | 东莞中国科学院云计算产业技术创新与育成中心 | Cloud platform database upgrading method and device, computer equipment and storage medium |
CN112632159A (en) * | 2020-12-01 | 2021-04-09 | 腾讯科技(深圳)有限公司 | Database access control method and device, electronic equipment and storage medium |
CN113721948A (en) * | 2021-07-21 | 2021-11-30 | 北京中科江南信息技术股份有限公司 | Database upgrading method, system and storage medium |
CN116149712A (en) * | 2023-04-04 | 2023-05-23 | 湖南中青能科技有限公司 | Database version updating compatible matching method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1581165A (en) * | 2004-05-18 | 2005-02-16 | 中兴通讯股份有限公司 | Method for realizing relation-database automatic upgrading in communication apparatus |
CN102323945A (en) * | 2011-09-02 | 2012-01-18 | 南京中兴力维软件有限公司 | SQL (Structured Query Language)-based database management method and device |
-
2012
- 2012-03-22 CN CN201210077588.1A patent/CN102662694B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1581165A (en) * | 2004-05-18 | 2005-02-16 | 中兴通讯股份有限公司 | Method for realizing relation-database automatic upgrading in communication apparatus |
CN102323945A (en) * | 2011-09-02 | 2012-01-18 | 南京中兴力维软件有限公司 | SQL (Structured Query Language)-based database management method and device |
Non-Patent Citations (1)
Title |
---|
KENSHINCUI: "批量执行SQL文件", 《HTTP://WWW.CNBLOGS.COM/KENSHINCUI/ARCHIVE/2011/03/01/1967870.HTML》, 1 March 2011 (2011-03-01) * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103530532A (en) * | 2013-09-17 | 2014-01-22 | 亚欧宝龙信息安全技术(湖南)有限公司 | File encryption method and system |
CN104899061A (en) * | 2015-05-27 | 2015-09-09 | 浪潮电子信息产业股份有限公司 | Method for automatically refreshing FRU information |
CN107301057A (en) * | 2017-07-28 | 2017-10-27 | 山东中创软件工程股份有限公司 | A kind of big data batch processing method and device |
CN110119599A (en) * | 2019-05-21 | 2019-08-13 | 国网福建省电力有限公司 | A kind of basic software platform automation safety encryption and system |
CN110825413A (en) * | 2019-11-04 | 2020-02-21 | 江苏金智教育信息股份有限公司 | Database upgrading method and device and application deployment upgrading method and device |
CN111708792A (en) * | 2020-06-16 | 2020-09-25 | 东莞中国科学院云计算产业技术创新与育成中心 | Cloud platform database upgrading method and device, computer equipment and storage medium |
CN112632159A (en) * | 2020-12-01 | 2021-04-09 | 腾讯科技(深圳)有限公司 | Database access control method and device, electronic equipment and storage medium |
CN112632159B (en) * | 2020-12-01 | 2021-09-28 | 腾讯科技(深圳)有限公司 | Database access control method and device, electronic equipment and storage medium |
CN113721948A (en) * | 2021-07-21 | 2021-11-30 | 北京中科江南信息技术股份有限公司 | Database upgrading method, system and storage medium |
CN116149712A (en) * | 2023-04-04 | 2023-05-23 | 湖南中青能科技有限公司 | Database version updating compatible matching method |
CN116149712B (en) * | 2023-04-04 | 2023-06-27 | 湖南中青能科技有限公司 | Database version updating compatible matching method |
Also Published As
Publication number | Publication date |
---|---|
CN102662694B (en) | 2016-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102662694A (en) | Batch processing upgrading method and upgrading device for database scripts | |
CN110493007B (en) | Block chain based information verification method, device, equipment and storage medium | |
CN101436141B (en) | Firmware upgrading and encapsulating method and device based on digital signing | |
CN111433797B (en) | Block chain equipment control system and method based on composite key | |
CN110932859B (en) | User information processing method, device and equipment and readable storage medium | |
US9256210B2 (en) | Safe method for card issuing, card issuing device and system | |
CN112039826B (en) | Login method and device applied to applet end, electronic equipment and readable medium | |
CN104486343A (en) | Method and system for double-factor bidirectional authentication | |
CN102171652A (en) | Method for provisioning trusted software to an electronic device | |
CN102346831A (en) | Handheld device privacy encryption protection method of Android operating system | |
CN104915262B (en) | A kind of check system and its method based on EXCEL data structures | |
CN107994985B (en) | A kind of cipher card and the method to data processing | |
CN102289622A (en) | Trusted startup method based on authentication policy file and hardware information collection | |
CN104376431A (en) | Engineering project management method and system | |
CN109831301A (en) | The electric endorsement method of pdf document and the sign test method of the electronic signature | |
CN109067544A (en) | A kind of private key verification method, the apparatus and system of soft or hard combination | |
CN106920023B (en) | Chip production, distribution and management method and system | |
CN102821110B (en) | A kind of password method for retrieving for audio/video storage device | |
CN108965315A (en) | A kind of authentic authentication method of terminal device, device and terminal device | |
CN105913508B (en) | A kind of Work attendance method based on intelligent NFC label | |
CN101931530A (en) | Generation method, authentication method and device for dynamic password and network system | |
CN104301283A (en) | Method for client to log into server | |
CN102521546A (en) | Method for realizing mutual authentication of self-service terminal and pin pad | |
CN110659036A (en) | Method and system for automatically burning Google key in Windows system | |
CN102521533A (en) | Method for verifying remote control command code version |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |