CN1784676B - Database data recovery system and method - Google Patents

Database data recovery system and method Download PDF

Info

Publication number
CN1784676B
CN1784676B CN200480001706.4A CN200480001706A CN1784676B CN 1784676 B CN1784676 B CN 1784676B CN 200480001706 A CN200480001706 A CN 200480001706A CN 1784676 B CN1784676 B CN 1784676B
Authority
CN
China
Prior art keywords
database
snapshot
data
page
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN200480001706.4A
Other languages
Chinese (zh)
Other versions
CN1784676A (en
Inventor
M·J·兹威林
G·A·史密斯
R·B·拉扬
J·库勒斯扎
P·拜恩
S·B·坎达尔瓦尔
M·S·威斯托姆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Microsoft Technology Licensing LLC
Original Assignee
Microsoft Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US10/833,541 external-priority patent/US8095511B2/en
Application filed by Microsoft Corp filed Critical Microsoft Corp
Publication of CN1784676A publication Critical patent/CN1784676A/en
Application granted granted Critical
Publication of CN1784676B publication Critical patent/CN1784676B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention relates to a system and method of data restoration, for instance, after the occurrence of a user error. In particular, snapshot database can be maintained that stores a copy of database data. The snapshot database does not have to store a complete copy of all data on a source database, but rather shares data that is common to both but not necessarily identical. If an error occurs on the primary database then the database can be reverted back to a point in time prior to the error by replacing source database files with snapshot files. Additionally, an undo component can be employed in conjunction with the snapshot to approach an error to a finer grained point in time. In brief, the present invention can restore a database much faster and simpler, while utilizing less space and resources than conventional data restoration technologies.

Description

Database data recovery system and method
The related application reference
The present invention requires the right of priority of following application: No. the 60/547th, 641, U.S. Provisional Application, and it is filed on February 25th, 2004, and title is DATABASE DATA RECOVERY SYSTEM AND METHOD (database data recovery system and method); No. the 10/833rd, 541, U.S.'s non-provisional application, it is filed on April 28th, 2004, and title is DATABASE DATA RECOVERY SYSTEM AND METHOD (database data recovery system and method), and these are applied for reference to being incorporated into this.In addition; The present invention is the part continuity of No. the 10/611st, 774, U. S. application, and the title of this application is TRANSACTION CONSISTENTCOPY-ON-WRITE DATABASE (consistent affairs is write coping database); It is filed on June 30th, 2003, also is incorporated into this as a reference.
Technical field
The present invention relates generally to database, relate in particular to the database recovery technology.
Background
In the world of today, database is quite popular.Database can store great deal of information through being convenient to inquiry rapidly and easy-to-use mode.For example, in the traditional relational database, information can be organized as object, like record, form and index.Database engine provides a kind of also mechanism of manipulation data of after the user has specified inquiry, from database table, retrieving.Inquiry is normally expressed with certain query language, like SQL (SQL).Inquiry can be specified one or more forms, and the row and column that wherein will be retrieved or handled.Through given query suitably, the database engine retrieve data, carry out the operation and the form that bears results of any appointment.Database is welcome and useful, and this is at least in part because it stores the ability of mass data, and such data can retrieve effectively and handle through given query simply.
Regrettably, user error is the FAQs in the Database Systems.Usually, such mistake changes or deleted data on database application or user error ground, and Database Systems are correctly followed order and promptly changed or take place during deleted data.This is called as fast finger deletion problem (quick fingerdelete problem) in the art.For example, the user possibly send the order of deletion form, but forgets appointment " WHERE " clause, and this just causes than the desired more multidata of having deleted.In addition, the user possibly install new application program, and this new application program is revised database with the unknown mode of user.This problem there are several kinds of traditional solutions.Generally speaking, prevailing solution is data to be returned to user error entirely time point before occurs.In case database is resumed, it possibly become presence, and all variations, comprises user error, has all lost.Yet it is time-intensive that full database is recovered, and sometimes spends a couple of days possibly to accomplish.
A kind of in addition method is, the data of not being in the mood for revising can be made up through relevant information being extracted from restore database and its merging being got back in the raw data base.A kind of variation of relevant this scheme is known as daily record and transports (log shipping).
Daily record is transported to relate to return to form and is kept the copy of the database on another secondary server, but a constant delay is arranged after original server.Log backup only is applied on the low priority data storehouse in delay (as 24 hours) afterwards.If user error appears in the raw data base, and the data base administrator notices this mistake in time delay, and then the data base administrator may revert back to secondary server, and this is because it has comprised the database of the time point before this mistake.Regrettably, it is complicated that daily record is transported, and it needs many additional resources and space.
Use traditional system and method restore database to need quite long delay, so its normally last option that adopts.In addition, daily record is transported needs additional firmware, and this has just increased the complexity of Database Systems.Reducing mistake is great and important problem in the Database Systems.Therefore, needing a kind of in this area is the quick new system and method for effective restore database again except that further feature.
General introduction
Simplification general introduction of the present invention is provided below, so that the basic understanding to each side of the present invention to be provided.This general introduction is not detailed scanning of the present invention.It does not really want to identify key of the present invention/decisive element, perhaps describes scope of the present invention.Its sole purpose is to propose some notion of the present invention with simple form, as the preamble that more specifies that provides later on.
The present invention relates to the establishment and the employing of database snapshot.The present invention has alleviated the problem that is associated with restore database, and restore database is with spended time and the normally last option that adopts; And transport the problem that is associated with daily record, daily record is transported needs additional firmware usually, thereby has increased the complexity of Database Systems.Revert to database snapshot and alleviated some such problem.According to an aspect of the present invention, database snapshot (DBSS) is the database that looks like read-only, a some copy of another (source) database.DBSS needs not to be the complete copy of source database; These two databases are shared both public data, and this just makes DBSS created and to make space effective apace.When source database was modified, raw data was copied in the space effective storage, was used for keeping the point in the time view of its source database for DBSS.If user error occurs on the source database, and DBSS had been created before mistake, and then the data base administrator has the option that entire database is reverted to DBSS, this time point place before user error.Institute to source database changes, and comprises user error, has all lost.And this reduction is generally much fast than normal recovery, and does not need daily record to transport needed repetition resource.
According to an aspect of the present invention, revert to that database snapshot can be included in coping database snapshot document page or leaf on source or the major database, brachymemma major database, the not submission transactional applications that will open is in database and use on database journal concentrates on such as incidents such as user errors.
According to one side of the present invention, user or data base administrator can create one or more database snapshots at different time point place.For example, if the user will carry out test, then he can create database snapshot, to enable to revert to previous database positioning or view.Yet according to another aspect of the present invention, a monitor assemblies can be used to keep watch on major database, and when particular event takes place, creates database snapshot automatically.For example, if monitor detects or can infer that new application program will be mounted, but the then establishment of its log-on data storehouse snapshot, to preserve the state of database before changing in new application program.
According to another aspect of the invention, mirror database can be by automatic renewal, the change of when reducing to be reflected in major database being made.Therefore, mirror database can be updated and synchronously, and the tediously long full recovery of not using it to use traditionally.
For realizing aforementioned with relevant purpose, description and accompanying drawing below combining have here been described some illustrative aspect of the present invention.But these aspects show the distinct methods of embodiment of the present invention, and all these methods all are intended to covered by the present invention.When combining accompanying drawing to consider, can from following detailed description of the present invention, know other advantage of the present invention and novel feature.
Brief description of drawings
From the concise and to the point accompanying drawing of describing of following detailed and hereinafter, of the present inventionly aforementionedly will become obvious with others.
Fig. 1 is the theory diagram according to the data recovery system of one aspect of the present invention.
Fig. 2 is the theory diagram according to the recovery component of one aspect of the present invention.
Fig. 3 shows a timeline sketch, so that each side of the present invention to be shown.
Fig. 4 is the theory diagram according to the database snapshot system of one aspect of the present invention.
Fig. 5 illustrates the diagram that exemplary database is recovered according to one aspect of the present invention.
Fig. 6 is the theory diagram according to the exemplary database mirror-image system of one aspect of the present invention.
Fig. 7 is the theory diagram according to the exemplary mirror-image system of one aspect of the present invention.
Fig. 8 is the theory diagram according to the major database of one aspect of the present invention.
Fig. 9 is the theory diagram according to the database snapshot system of one aspect of the present invention.
Figure 10 is the theory diagram according to the exemplary transaction daily record of one aspect of the present invention.
Figure 11 is a process flow diagram of describing the method for setting up snapshot database according to one aspect of the present invention.
Figure 12 is the process flow diagram that restoration methods is shown according to one aspect of the present invention.
Figure 13 is the process flow diagram according to the data reconstruction method of one aspect of the present invention.
Figure 14 is the theory diagram that suitable operating environment is shown according to one aspect of the present invention.
Figure 15 be can with the theory diagram of the mutual example calculations environment of the present invention.
Describe in detail
With reference now to accompanying drawing, describes the present invention, run through accompanying drawing, the element that identical numeral is identical.Yet, should be understood that accompanying drawing does not really want to limit the invention to the concrete form that disclosed with describing in detail.On the contrary, the present invention is intended to cover all modifications, equivalence and the alternative that falls in the spirit and scope of the present invention.
As employed in this application, term " assembly " and " system " are meant computer related entity, combination, software or the executory software of itself or hardware, hardware and software.For example, assembly can be, but be not limited to the process of on processor, moving, processor, object, executable code, execution thread, program and/or computing machine.As explanation, application program of on server, moving and server all can be assemblies.One or more assemblies can reside in process and/or the execution thread, and assembly can and/or be distributed in a computing machine between two or many computing machines.
In addition, the present invention may be implemented as method, device or makes article, and it uses standard program and/or engineering to produce software, firmware, hardware or any its arbitrary combination.Being intended to comprise can be from the computer program of any computer readable device, carrier wave or medium access for term used herein " manufacturing article " (or title " computer program ").For example, computer-readable medium can include, but are not limited to, magnetic storage apparatus (like hard disk, floppy disk, magnetic stripe ...), CD (like compact disk (CD), digital versatile disc (DVD) ...), smart card and flash memory device (like card, rod).Certainly, it will be understood by those skilled in the art that under the prerequisite that does not deviate from scope of the present invention and spirit, can make many modifications this configuration.
Recovery system
At first see Fig. 1, show data recovery system 100.Data recovery system 100 comprises source database 110, snapshot assembly 120, snapshot database 130 and recovery component 140.Source database 110 (below be also referred to as major database) comprises lot of data with the mode through tissue, so that inquiry and other purposes.Database 110 can be the database of any kind of, including, but not limited to, relationship type or multi-dimensional database.Snapshot assembly 120 is based in part on source database and generates snapshot database 130 (also database snapshot being called DBSS here).Snapshot database 130 allows the user to create the consistent affairs view of existing source database 110, and does not make its complete copy.When source database 110 from snapshot database 130 during bifurcated, snapshot assembly 120 guarantees that snapshot database 130 is included in its data trnascription before being modified, and for example, is unit with the page or leaf.In other words, if the source database page or leaf comprises letter " A ", and carry out and cause " A " to change into the affairs of " B ", then available its write corresponding snapshot database page or leaf, and thereby stores letter " A ".According to an aspect of the present invention, snapshot database 130 can be the read-only time point copy of source database 110.DBSS is unnecessary to be the complete copy of source database 110.These two databases can be shared both public data, and this just also makes DBSS and make space effective by quick establishment.When source database 110 was modified, raw data can be copied to the space effective storer, was used for keeping the point in the time view of its source database 110 for DBSS.In addition, should be appreciated that to have an above snapshot database 130 that is associated with the source, so that a plurality of restoration points to be provided.In addition, snapshot database 130 can be instantaneous or lasting.Instantaneous snapshot is the internal volatile copy, and it is deleted after collapse, fault or shutdown.Lasting snapshot is public copy, and it can more safely be kept in the memory device, uses for other application program.
Recovery component 140 utilizes snapshot database 130 that source database 110 is returned to the time point before incident.According to one side of the present invention, this incident can be corresponding to user error, and like fast finger deletion, promptly the user all of a sudden deletes data from the form of source.Perhaps, incident can be corresponding to system crash, deadlock or wherein loss of data or by in any other situation of handling.If incident occurs on the source database 110; And snapshot database 130 had been created before mistake, and then the data base administrator has the option that use recovery component 140 is recovered whole source database 110 snapshot database 130 at the incident of getting back to time point place before.Recovery component 140 data that reside in the snapshot database 130 capable of using return to incident previous time point place before with source database 110.For example, available snapshot data database data rewrites current source database value in the corresponding position.Perhaps, snapshot database 130 can be filled with shared data, and becomes new source database.Will be appreciated that this rejuvenation is much faster than traditional recovery technology usually, this is because only need sparse file (sparse file) be copied to source database rather than full recovery.In addition, owing to rejuvenation does not need to transport needed repetition resource like daily record, so it is more effective.
Fig. 2 has described recovery component 140 according to one side of the present invention.Especially, recovery component comprises reduction assembly 210 and cancels assembly 210.Reduction assembly 210 provides according to the major function in the recovery of the present invention, is convenient to fine-grained recovery and cancel assembly 220, and it concentrates on such as on the incidents such as mistake.If database snapshot has been given birth in incident and has been created before existing, the sparse file that then reduces in assembly 210 database snapshots capable of using returns to the time before the incident with source database.Reformed data file or page or leaf can copy to the state that source database turns back to snapshot time place through the old value that will be stored in the snapshot database after snapshot creation.This for example just causes comprising mistake from the loss of data up to restoring operation of time that snapshot is created.For example, if " A ", " B " and " C " when source database comprises snapshot database and is created, and " B " is changed and is " D " subsequently, and then snapshot database can comprise " B ", and source database can comprise " A ", " D ", " B ".The reduction assembly then can be through simply going up and database recovery arrived the value that the snapshot time locates " B " being copied to " D ".Yet, when database snapshot is created, possibly have the ongoing affairs of not submitting to as yet.These affairs are not caught by database snapshot.Therefore, after source database was restored to database snapshot, those affairs had been lost, and will not be performed as the operation (as inserting, upgrade, deleting) that transaction results occurs.
Cancel assembly 220 and can be used for compensating this inaccurate expression when reduction or the like.For example, cancel assembly 220 all affairs of opening can store snapshot database and create the time, this comprises that all began and in the affairs that stop thereafter before snapshot creation.These affairs that are stored can be used to involve in the major database that (roll forward) recovers subsequently, the affairs of opening with seizure, and concentrate on the recovery incident.In addition, cancel that assembly 220 is capable of using catches the traditional database daily record of database change with period or according to administrator command, closer concentrating on, thereby minimized losing of " well " affairs such as incidents such as mistakes.Therefore, the present invention has promoted database recovery at least, and less system resource capable of using but come to accomplish routinely with much fast speed.
Forward Fig. 3 to, show timeline 300, to be further provided with the clarity of closing database recovery operation according to one side of the present invention.Time from left to right advances on timeline 300.In other words, being positioned at far, the incident on the right occurs in after the incident that is positioned at the left side far away in time.At 310 places, create database snapshot (DBSS).A period of time is gone over (minute, hour, day ...) and incident occurs in 320 places.For example, incident can perhaps be revised page data corresponding to the complete form of the unexpected deletion of user.For example, can by data base administrator start recovery operation thereafter.Therefore, reduction assembly 210 of the present invention (Fig. 2) can be used to database recovery to the time point 310 of creating database snapshot.According to an aspect of the present invention, this can be through copying to the corresponding data the source database with the sparse file data from snapshot database, thereby place the consistent steady state (SS) of the incident effect that lacks 320 places to realize source database.Cancel assembly 220 (Fig. 2) and can be used to then source database is advanced to incident 320,, lose simultaneously or change the data that cause by incident to keep " well " data.This can realize in institute data recovered storehouse and/or database log file through being stored in the transactional applications of cancelling in the file of opening.
Fig. 4 illustrates database snapshot system 400 according to one side of the present invention.DBSS system 400 comprises snapshot assembly 120, source database 110, snapshot database 130, directory component 410 and monitor assemblies 420.Like above-mentioned source database 110 are master or major databases of seeking to recover.Snapshot assembly 120 uses source database 110 to generate database snapshot 130.Database snapshot (DBSS) 130 can be read-only time point database.It is a space effective, and this is because itself and source database 130 communal spaces.This communal space is all identical in two databases data pages.According to an exemplary realization, DBSS can create with following sentence structure:
CREATE?DATABASE?ss_database_name
ON<filespec>[,...n]
AS SNAPSHOT OF source_database_name creates another file that is used for DBSS 130 to each data file in the source database 110.These new files are sparse files.When page or leaf was changed in source database 110, they were at first copied in the sparse file.Directory component 410 can be used to generate daily record or journal file, is to share with source database 110 with the page or leaf of following the tracks of among the DBSS 130, and still page or leaf is copied in the sparse file.According to an aspect of the present invention, daily record is stored in the source database 110, so that to its easy visit.
Will be appreciated that, recover before it is readable, can on DBSS 130, move, so that it is brought back to consistent state.When the affairs of front opening by rollback (roll back), and some original page will be very possible owing to rollback is copied in the sparse file.According to an aspect of the present invention, DBSS does not have daily record.In case created DBSS 130, then DBSS can keep existing, and is abandoned (if its lasting words of preserving) by the data base administrator up to it, otherwise it can made mistakes or be dropped during system closedown.
A plurality of DBSS 130 can be present in the different time points place of single source database 110.According to an aspect of the present invention, all snapshots except that the snapshot that just is reduced or just is being resumed all can be destroyed.Perhaps, residing in snapshot all snapshots afterwards that are reduced on the time can be destroyed, and the snapshot that those times upward occur early can be preserved.The source database snapshot of after the snapshot that just is reduced or will be reduced, taking is not very valuable.In addition, for example, can, source database take new snapshot after having used the database snapshot recovery to this source database.It is much valuable that the snapshot of before the snapshot that is used to recover, taking is wanted, because still may revert back to the particular point in time place of being caught by previous snapshot.
DBSS 130 can create and abandon with periodic mode, and perhaps if the user hopes that the time point of single " safety " reduces to it with permission, available special mode is created and abandoned.For example, the user possibly want to install or test phase establishment snapshot in new application program.Order below capable of using and be issued to the reduction of DBSS 130:
RESTORE?DATABASE{database_name|database_name_var}FROM
DATABASE_SNAPSHOT=< snapshotname>monitor assemblies 420 also can be used by snapshot assembly 120, with the affairs of observation about source database, and the automatic generation of log-on data storehouse snapshot.For example, if monitor assemblies 420 detects or infers the installation that possibly significantly change the new application program of source database, then it can begin the establishment of database snapshot.For promoting such function, will be appreciated that the present invention can use artificial intelligence system and method, including, but not limited to, RBES, Bayes rule and neural network.
Be restore database, source database is closed, and its all connections are closed.Therefore, the source is not useable for affairs in this process.Database can be marked as " recovery ", to notify this database of external observer unavailable.Then, server can continue the page or leaf in the sparse file is copied to the original position (when DBSS is created) in the source database files.The velocity ratio of in most cases, duplicating the page or leaf of change is recovered to want much fast from backup.In case page or leaf is replicated, then the daily record of database can be rebuild.Now, source database turns back to its time point place when DBSS creates.All changes since being created from DBSS have been eliminated.Cancel file if create, then not fracture of log chain, and can use the data logging backup of picking up from source database, to involve in source database.
Be supported in to use and cancel the scheme that involves in after the file reduction and can be summarized as follows.When creating DBSS, can be saved as " image (pre-image) in advance " of cancelling separately in the file by the original value of DBSS each page that recovery contacted when creating.When reduction, the DBSS page or leaf is just as be copied in the source database saidly.Image can duplicate from independent cancelling the file in advance.In this, database is with just the same when creating DBSS.Thereafter, database journal can be used to the DBSS of reduction is involved in the just in time time point place before user error takes place, with the amount of minimize data loss.
Forward Fig. 5 to, the diagram that exemplary database recovery 500 is shown is provided according to one side of the present invention.Source database 110 comprises two data library files 510 and 520. Database file 510 and 520 all comprises 8 pages or leaves, and each page has different data.Generate the snapshot of source database.Thereby create database snapshot 130.Snapshot database can have two snapshot database sparse files 530 and 540, and it corresponds respectively to source file 510 and 520.In snapshot origin, these source files may simply be shell, because them and source file 510 and 520 shared all data.Certain some place after snapshot creation, the value in the source database can be changed.Here, reformed value resides in the page or leaf 3 and page or leaf 7 of file 510, and in the page or leaf 4 of file 2.Special, page or leaf 3 has changed to " Z " from " C ", and page or leaf 7 has changed to " Y " from " G ", and page or leaf 4 has changed to " Z " from " L ".Therefore, the original value before changing has been saved to sparse file 530 and 540 places, is " C ", " G " and " L " here.In case be resumed, the page or leaf in the sparse file, here for from file 530 3 to 7 and from page or leaf 3 pages of renewal that can be replicated in the source of getting back to or the major database 110 of file 540.
Duplicate page or leaf and comprise several situation; This comprises that simple copy returns the page or leaf of having revised; Perhaps such as interpolation or deleted file, with the general data library file increase or be contracted to sparse file size, interpolation or deletion page or leaf (promptly follow the tracks of the page or leaf that is added to major database, like this so that they can when recovery, be eliminated) or the like complicated situation more.File is added and deletion, can compare the listed files of source database and database snapshot and it is synchronous.Page or leaf is added, if the source is bigger than snapshot or duplicate, then the source can be cut or be punctured into the size of duplicate endways, this part is because according to an aspect of the present invention, and the page or leaf that is added is the end in the source of being added on.If duplicate is bigger, this means that then page or leaf deletes from main source.Therefore, the big I in source is increased, and all pages of this scope will will be replicated through normal replicate run in snapshot thus.
A kind of simple algorithm (
Figure A20048000170600131
algorithm) that duplicates back the page is with they duplicating one by one.Yet, according to an aspect of the present invention, can use the asynchronous replication operation to realize.For example, can use single thread and three formations one to read formation, write queue and empty buffer formation.Duplicate return in, if the page or leaf in the source (as, mean that it changes), perhaps it not in the source (as, mean that it is deleted), then it can be copied to the source simply.Yet if in the main source additional page is arranged, they possibly be added to the end of file, and this can remedy through the size that file is punctured into duplicate.At last, the source can be unlocked, and recovers to accomplish.
According to another aspect of the present invention, the Log backup that is associated with source database can be broken after recovering.Therefore, Log backup will lose efficacy on the database of reduction, up to making fully or file backup.The database of reduction can keep the identical recovery model that kept when being created with it.Therefore, system of the present invention can support (1) to start reduction; (2) manipulation data; (3) rebuild daily record; And database is restarted in (4).
According to a further aspect in the invention, new source database can be created from snapshot database through duplicating from the data in the original source data storehouse.Any mistake in database initialize stage possibly need data base administrator (DBA) in case for example server become available with regard to reboot operation.In case database is created, DBA is with regard to discardable source database, and the database of reduction is carried out rename.Such system for example can be used for data image.
Forward Fig. 6 now to, show example data mirror-image system 600 according to one side of the present invention.System 600 comprises two databases: source database 110 and mirror database 610, database snapshot 130 and recovery component 140.Source database 110 is major databases.Mirror database 610 is independent databases, and it almost comprises the bitwise copy article of source database 110.Like this, when source database 110 is made a change, for example can they be sent to mirror database 610 through network.The notion of mirror image is that then mirror database 610 becomes the new source database that is used for affairs, thereby passes through the high availability that redundance promotes data if main source database 110 for example lost efficacy owing to power fail or became unavailable.According to aforementioned one side of the present invention, source database 610 can have snapshot database snapshot 130 associated therewith, so that the time point reduction.Like this, data base administrator's active bank snapshot 130 reverts to previous time point with recovery component 140 with source database 110.If on source database 110, carry out reduction, then mirror database 610 also should reflect this variation.Routinely, need time loss backup to recover to upgrade and synchronous mirror database 610 again with complete.According to an aspect of the present invention, mirror database 610 can be updated automatically and be synchronous with the source.Because the change in source is reflected in the mirror database automatically, thus also can be after this reduction be accomplished on the source at reduction phase to the change in source, simultaneously or be delivered in the mirror image asynchronously.
Forward Fig. 7 to, show according to one side of the present invention and be used for example system 700 that the database with snapshot is established mirror image.As shown in the figure, system 700 comprises the basic or target database 610 of DB1_LS by name.Application program 620 seeks from database 610, to check data.Especially, application program 620 can be mutual with the snapshot 630 of DB1_001 by name, DB1_002 and DB1_003.The first snapshot DB1_001 can be created and with reference to DB1, for example:
CREATE?DATABASE?DB1_001?AS?SNAPSHOT?OF?DB1_LS
Subsequently, the second snapshot DB1_002 can be created ON (NAME=` datafile ', FILENAME=` DB1_001.SNP ').Still use the user of DB1_001 to continue to use it:
CREATE?DATABASE?DB1_002?AS?SNAPSHOT?OF?DB1_LS
Thereafter, the 3rd snapshot can be created ON (NAME=` datafile ', FILENAME=` DB1_002.SNP '), and makes the reference to DB1.Still use the user of DB1_001 or DB1_002 to continue to use them:
CREATE?DATABASE?DB1_003?AS?SNAPSHOT?OF?DB1_LS
ON(NAME=`datafile′,FILENAME=`F:\DB1_003.SNP′)
In addition, according to an aspect of the present invention, the active bank snapshot comes database is carried out checking consistency.For example, DBCC CHECKDB () order can be carried out on database.As a result, the inside snapshot that has a database of slack storage can be created in the alternating current of available data library file.Then, can read page or leaf, and system can read their (if they also are not modified) or from alternating current, read (if they are modified) from master database with the execution checking consistency.
What also will be appreciated that is that although do not illustrate, the present invention can use one or more graphic user interfaces (GUI).GUI can be used to support the snapshot management.For example, include but not limited to that a plurality of texts of text box, button, tab, drop-down menu and scroll bar and graphic assembly can be used to create snapshot and subsequently database reverted to this place.
In addition, on traditional meaning, database snapshot and the source database that is associated with it all can be backed up.For example, the keeper can back up individual files or the file group from snapshot.When backup was resumed, they were resumed the database into routine.When carrying out the backup operation in source, which snapshot the user can specify to be used for backup.When recovering, which snapshot the user also can specify to be resumed.
Database snapshot (be also referred to as to write and duplicate (Copy-On-Write) database)
Generally speaking, database comprises two types file: data file and journal file.Journal file comprises a series of log records.Log record can use log serial number (LSN) to identify.As described in Fig. 8, according to an aspect of the present invention, major database 800 comprises one group of data file 802 and journal file 810.Data file 802 can be divided into storage block or the unit that is known as page or leaf.
Being used for the wide area information server snapshot can be created, and it provides the consistent affairs view in the available data storehouse at previous time point place, and does not create the complete copy of this database.Comprise all required information of information of the Database Replica that produces previous moment with the database snapshot of database combination.Yet database snapshot itself does not comprise all information, and full of its comparable size is little thus.In addition, snapshot can (on the fly) creates database being made when revising hastily, and this allows cost (time and processing) to launch in time.If formerly constantly database snapshot is duplicated, then time and processing cost can be concentrated simultaneously.In addition, database snapshot has such advantage, and promptly they can be created when the renewal activity continues on database.Major database is to be used and database that its one or more database snapshots are created.
As above-mentioned, database snapshot comprises the information of all needs, and major database, and it confirms the content of previous moment major database.Database snapshot can comprise the secondary file (side file) corresponding to each file in the major database.Secondary file comprises the copy from all data of corresponding data file, and this data file has been changed since having created database snapshot.In one aspect of the invention, for avoiding the page or leaf of form from secondary file is mapped to necessity of the page or leaf in the master file, secondary file is stored in the evacuated space.In sparse file, only the actual part that is written into of file needs storage space.Other zone of all of this document can be unappropriated.Yet, should be noted that it is not essential to the invention in sparse file, storing secondary file, and can consider other storage system and method within the scope of the invention.
According to another aspect of the present invention, sparse file mechanism is with the standard area chores.Data as if in the zone are write in the sparse file, even then data are not filled up whole zone, the space that is used for whole zone also can be assigned with.Because this space is assigned with; And can therefrom read; So the scope of can be in this zone filling with valid data and should make differentiation between the scope in zone, the reason of its existence is that the granularity of sparse file needs the zone of specific size to be assigned with (if any storage in this zone is essential words).
Because database snapshot comprises the original value of all data that since database snapshot is created, changed in the major database, so the database data of database snapshot creation-time can read from this snapshot.For in response to the request of data from database snapshot, data can read (if secondary file comprises the data from this request) from the secondary file of database snapshot.Be read and the not change as yet since database snapshot is created of the data in secondary file, and can from major database, read.
According to another aspect of the present invention, secondary file comprises the data page from major database.When the data on arbitrary page or leaf of major database were changed, this data page just was stored in the secondary file.The present invention describes with reference to the page or leaf as data cell in the major database; Yet, can conceive and also can use other other data cell from major database.
For confirming that which data is write in the secondary file, and which data should be read in the major database, should confirm the existence of the valid data in the secondary file.In an example, it can directly be read to confirm whether valid data exist.According to another aspect of the present invention, the sub-page table can be created, and whether it stores the relevant page or leaf that provides and exist and active data.
As far as each page or leaf in the major database; The sub-page table can store the information whether relevant this page should read from major database; This shows that it does not change, and perhaps the sub-page table can store the information that whether should from secondary file, read about this page, and this shows that it has changed.The sub-page table allows to confirm fast whether the given page is present in the secondary file.
According to another aspect of the present invention, secondary file all uses identical page or leaf/area size with sparse file mechanism.That is, the page or leaf from major database, preserved of secondary file is identical size with the stored zone of sparse file when any storer is written in the sparse file.For example, if the sparse file zone is 8KB, and also be 8KB from the page or leaf that major database stores, then page or leaf size and area size equate.In this case, the page or leaf complete filling from main database will be read in any zone that is filled, and can not in this zone, store invalid data.
According to another aspect of the present invention, a plurality of secondary file areas can be definitely corresponding to each page or leaf.For example, if the sparse file zone is 8KB (kilobyte), and be 16KB from the page or leaf that major database stores, each page or leaf that then is stored in the secondary file will fill up two zones.And, in this case, the content complete filling of the page or leaf that any zone that is filled will be read since major database.And invalid data can not be comprised in this zone.
As far as these aspects of the present invention, the sub-page table comprises bitmap in the storer, and it holds a bit about each page info in the secondary file.As far as each page or leaf in the secondary file, corresponding bit shows that this page or leaf is whether in secondary file.
According to a further aspect in the invention, the granularity of secondary file area is greater than the granularity of the page or leaf that stores from major database.For example, if each zone of secondary file is 64KB, and this page size is 8KB, and the existence in zone needn't show that all information in the zone are the valid data from major database in the then secondary file.If only have a page or leaf to be copied in the secondary file, in this example, then only there is 8KB can comprise valid data among the 64KB in institute's assigned region.In another embodiment, some secondary file page scatters in the zone.
As far as these aspects, the sub-page table comprises bitmap in two storeies, and two bits that it is held about the information of each page in the secondary file are called bit 1 and bit 2.As far as each page or leaf in the secondary file, corresponding bit shows (bit 1) page or leaf whether really in secondary file, and whether (bit 2) page or leaf is potentially in secondary file.Bit 2 also can be considered to show and distributed wherein page or leaf should be stored in the zone in the secondary file.Yet, be described below, in one embodiment, this bit 2 only is set when the sub-page indumentum is constructed again.
Bitmap is maintained in the storer, possibly not be lasting therefore.If they are wiped free of, then from sparse file information, construct bitmap again.Consulting sparse file, and as far as each page or leaf, if secondary file be wherein location page or leaf region allocation the space, then bit 2 is set, to show page potentially in secondary file.As far as each page or leaf, bit 1 is set at first, to show that uncertain this page or leaf is in secondary file.
If the sub-page table is kept with the mode that it continues, then the zone possibly be insignificant with the granularity of page or leaf, and can use the sub-page table of a bit.Yet, in one embodiment,, use two bit page tables for after database server is restarted, supporting persistant data storehouse view.
According to one side of the present invention, be not secondary document creation page table.In this case, during page or leaf in being necessary to determine coping database snapshot whether, with regard to advisory data storehouse snapshot.Below with reference to one side of the present invention the present invention is described; The page table that wherein has a bit or two bits, yet, also can conceive the other embodiments of the invention that wherein do not have page table; And data base view must be examined the page or leaf that from major database, duplicates to determine it whether to comprise.
As shown in Figure 9, the database snapshot 920 of major database 800 is made up of secondary file 925.Each data file 802 in the major database 800 has secondary file 925 corresponding in the database snapshot 920.In addition, sub-page table data 930 are stored in the storer of database snapshot 920.According to an aspect of the present invention, sub-page table data 930 are sub-page tables, and it covers all secondary files 925.According to another aspect of the present invention, can there be independent sub-page table to each secondary file 925.
In database, transaction journal is the continuous recording of all affairs of since transaction journal is by last backup, database having been carried out.Transaction journal is used for database recovery to failpoint.According to an aspect of the present invention, transaction journal is modeled as round-robin queue.Can brachymemma transaction journal through the inertia part of deletion daily record.This inertia partly comprises the affairs of completion, and it need not be resumed, and this is because the variation of their reflections has been saved in data file lastingly at least.On the contrary, the movable part of transaction journal comprises completed affairs and is still moving and do not accomplishing affairs (active transaction).Can accomplish brachymemma, minimizing the inertia space in the transaction journal, rather than allow transaction journal to continue to increase and use more spaces.
Active transaction can cause the affairs inconsistency.As far as active transaction, some modification of data file possibly also not write in the data file from the impact damper high-speed cache, and possibly exist from some modification of not accomplishing affairs in the data file.Journal file 810 can be used to guarantee that the recovery of database is a consistent affairs.This can accomplish through the recovery of using ARIES (being used to recover and isolate and use semantic algorithm) style.Each modification of possibly also do not write in the data file that is recorded in the daily record involves in through database is carried out to revise.For guaranteeing the integrality of database, each that in transaction journal, find do not accomplished affairs through cancelling the modification of database and rollback.
For creating database snapshot, the entity structure of data base view (secondary file and page table) must be initialised.At first, each data file 802 in the major database 800 is created secondary file 925.As stated, secondary file can be a sparse file, perhaps is in another embodiment and the identical non-sparse file of data file 802 sizes.Secondary file 925c is associated with data file 802 in the major database 800.
Because affairs are to occur continuously, and data base view is consistent affairs, so transaction journal should be used between the database snapshot startup stage.For guaranteeing to be not dropped, Disable Logs brachymemma on major database 800 (if its existence) about the information of the affairs that should be used for data base view.
According to an aspect of the present invention, be database snapshot initializes slave page table 930.At first, sub-page table 930 is set up, and does not have page or leaf to show in the secondary file 925, and, under the situation of two bit sub-page tables, do not have the page potentially or confirm in secondary file 925.
When accomplishing initialization, database snapshot is ready to " reaching the standard grade ".Now, database snapshot will move along major database 800, and when execution is revised, the copy of the original value of the page or leaf of modification (promptly carrying out the content of renewal page or leaf before) will be stored in the database snapshot.The illustrative methods that is used for the consistent affairs snapshot of fulfillment database can comprise the fractionation point of confirming in the transaction journal.This fractionation will be corresponding to the time point of database snapshot representative.The terminal LSN of daily record can obtain when database snapshot is created on the major database 800; This LSN is that major database 800 will begin crotch " fractionation point " with database snapshot 820.Then, major database 800 can be labeled, like this so that need database snapshot to handle.Database snapshot support in the major database 800 is by the beginning that is described below.
For the database snapshot unanimity, must analyze the daily record that splits some major database 800 before, when splitting, be movable to confirm what affairs.Activity (from splitting the some beginning) affairs the oldest in the daily record are identified.Before the oldest active transaction, allow the daily record brachymemma.
The mode of the recovery through being similar to ARIES (be used to recover and isolate and use semantic algorithm) style is carried out in major database 800 daily records all from the operation that splits the oldest active transaction before the point to database snapshot.Figure 10 is the block diagram of exemplary transaction daily record-journal file 810 according to an aspect of the present invention.Journal entries in the journal file 810 comprises journal entries 1000,1010,1020,1030,1040,1050,1060,1080,1080,1090 and 1099.Confirm to split point 1075.Affairs continue to be write daily record, however the forbidding brachymemma.Audit log file 810, and secondary file 925 carried out any modification to database is as from the oldest active transaction to the result who splits the affairs of putting (the example of Figure 10, from journal entries n1000 to journal entries n+7).Modification result in each of these affairs is stored in the secondary file 925.Yet, check these affairs.By any active transaction in the daily record, write in the secondary file 925 of being modified in of journal file like journal entries n1000, journal entries n+21020 and journal entries n+6 and to cancel.
Yet some affairs possibly also not submitted to.Therefore, the active transaction of putting up to fractionation in the daily record should be positioned and cancelled.According to an aspect of the present invention, the value place of a certain position in not accomplishing affairs change database, the variation that has been added to above-mentioned secondary file is deleted from this pair file.Perhaps, affairs cancel can through modification database snapshot as described below, be provided with in the secondary file data with in the matching database from splitting the data of some beginning.
Like this, only there are not completion affairs to be reflected in the database snapshot from daily record.When the affairs in the daily record are reflected in the database snapshot, except that point out current movable in fractionation but the reversed affairs, in major database 800, allow the daily record brachymemma.Therefore because launched the database snapshot processing, so database snapshot will upgrade when major database 800 is made a change, and database snapshot can be used to confirm from splitting the content of the major database 800 that point begins constantly.
When database server is restarted after it is closed (perhaps normal or improper), database snapshot should be reinitialized.In order to do like this, the sub-page table that has been stored in the storer must be reinitialized.
Be initializes slave page table again; In two bit sub-page tables are realized; As far as each zone in the sub-page table that has been assigned with, the data in the zone that has been assigned with in the sub-page table of each page (bit 2) are set, and possibly write in the secondary file 925 to show this page or leaf.Data in the sub-page table of all other pages are set, and can not be write in the secondary file 925 to show page or leaf.Yet it is uncertain that page or leaf is write in the secondary file 925, and therefore, bit 1 initially is not provided with.
Perhaps, in two bit sub-page tables are realized, perhaps in a bit sub-page table is realized, can check secondary file 925, to confirm whether the page in the secondary file 925 is effective, as stated as far as each page or leaf.This page table is set up, and to show the page or leaf that each is existed really, page or leaf actually exists in the secondary file 925 really.All other pages or leaves are set up, and are not present in the secondary file 925 to show page or leaf.
In order to let database snapshot stored the information from major database 800, the establishment of major database 800 necessary supporting database snapshots before the overwrite in data.As far as each page or leaf that major database 800 is revised, must do whether confirming in database snapshot of page-out.If the page is present in the database snapshot, then it is the right version of page or leaf.For example, when the page or leaf in the major database 800 is made previous modification this situation may appear.If page or leaf is changed in major database 800 once more, the change not of the version in the data base view then.
When receiving information the reformed major database 800 from page or leaf, if page or leaf is then done nothing in secondary file 925.If page or leaf is not in secondary file 925, then page or leaf should be write in the secondary file 925, and should be in the sub-page table the correct bit of set.Exist under the situation of two bit page tables, three kinds of possibilities are being arranged for the bit 1 and the bit 2 of this page, as by shown in the following table 1:
Bit 1 shows that page or leaf is really in secondary file Bit 1 does not show that this page or leaf is really in secondary file
Bit 2 shows that this page or leaf maybe be in secondary file Situation 1: page or leaf is in secondary file Situation 2: page or leaf maybe be in secondary file
Bit 2 shows that this page or leaf is not really in secondary file Situation 1: page or leaf is in secondary file [perhaps: situation 4: invalid] Situation 3: page or leaf is not really in secondary file
Form 1: for the situation of two bit page tables
According to an aspect of the present invention, when bit 1 showed that page or leaf is really in secondary file 925, bit 2 was left in the basket; Like this, as shown in table 1, if bit 1 shows page or leaf really in secondary file 925, then page or leaf is assumed in the secondary file 925, and no matter bit 2 shows anything.In another embodiment, when bit 1 is set, when showing that page or leaf is really in secondary file 925; Bit 2 is set, showing that page or leaf maybe be in secondary file 925, and in this alternative embodiment; When bit 1 shows that page or leaf is really in secondary file 925; And bit 2 is when showing that this page or leaf is not really in secondary file 925, and this situation is invalid, and runs into mistake.
Just be changed when major database 800 shows page or leaf,, should list situation and the action taked is following preceding text then as far as two bit page tables:
Situation 1: do nothing.
Situation 2: confirm that page or leaf whether in secondary file 225, if do not have, then writes this page or leaf in the secondary file 225.
Situation 3: page or leaf is write in the secondary file 925.
In situation 1 or situation 2, when page or leaf was write in the secondary file 925, the early version of page or leaf in the major database 800 (version of just being revised by major database 800 now) was write in the secondary file 925.In addition, page table is set up, and to show in the secondary now file 925 of page or leaf, like this so that page or leaf any follow-up write according to circumstances 1 handling, and the correct page maintenance of data base view is stored in the secondary file 925.
In situation 2, for confirming page or leaf whether in secondary file 925, from secondary file 925, read corresponding to the data of this page.If data are effectively, then the previous release of page or leaf is in secondary file 925, and it should be by overwrite.In one embodiment, be set, to show this page or leaf really in secondary file 925, therefore in the future to handling in the situation that is written in 1 of this page corresponding to the page table bit 1 of this page.
The data ineffectivity can be represented also do not have valid data to be write in the zone to show by the data that are placed in the newly assigned zone.For example, if known not have database page to comprise complete zero, complete zero can be write in the newly assigned zone.If situation is like this, the existence of page or leaf is to be represented by the corresponding page or leaf in the secondary file 925 in the then secondary file 925, and this page is the part of assigned region and comprises some non-zero.
Situation about describing in detail in the form 1 is applicable to that also carrying out the data that are stored in the database snapshot reads.When the data in the page or leaf read from data base view, this page or leaf should read (if it is present in the secondary file 925) from secondary file 925.If it is not present in, then page or leaf should read from major database 800.In two bit page table systems, the action that should take three kinds of situation is following:
Situation 1: from secondary file 925, read page or leaf.
Situation 2: confirm that page or leaf is whether in secondary file 925, if it in secondary file 925, then reads page or leaf from secondary file 925, if it not in secondary file 925, then reads page or leaf from major database 800.
Situation 3: from major database 800, read page or leaf.
The database positioning at the time point place that the database snapshot representative is previous.The user can select to use database snapshot as database.For example, the user can select data storehouse snapshot is carried out action, to create this wide area information server snapshot, as its time point formerly database snapshot has been carried out action.In addition, at initial phase, like top detailed description, can on database snapshot, carry out and cancel affairs.
Be to revise database snapshot, modification should be based on the data in the database snapshot, and the page or leaf of gained should be stored in the database snapshot.If do not have the data about page or leaf in the database snapshot, then revising should be based on the data in the major database 800, and the page or leaf of gained should be stored in the database snapshot.
In two bit page table systems, it is following to tackle the action of taking in three kinds of situation:
Situation 1: from secondary file 925, read page or leaf, carry out modification, page or leaf is write secondary file 925.
Situation 2: confirm page or leaf whether in secondary file 925, if its, then carry out like situation 1, do not exist as if it, then carry out like situation 3.
Situation 3: from major database 800, read page or leaf, page or leaf write in the secondary file 925 and page table is set, to show that this page or leaf is in secondary file 925.Execution is to the modification of page or leaf, and the page or leaf that will revise is write in the secondary file 925 in due course.
In the view of above-mentioned one or more example system, with reference to the process flow diagram of figure 11-13, can recognize better can be according to the method for the present invention's realization.Though for explaining for simplicity; Illustrate and describing method with a series of square frames; Yet what be to be understood that and be realized is; The present invention does not receive the restriction of square frame order, because according to the present invention, some square frame possibly take place and/or take place simultaneously with other square frame of describing here and explain with different order.And, according to the present invention, not to need the square frame shown in all to realize this method.
In addition, what be further appreciated that is, below with run through method that this instructions discloses and can be stored in and make in the article so that method that will be such is transported and is delivered in the computing machine.Used term is made article and is intended to comprise the computer program that can visit from any computer readable device, carrier wave or medium.And unrestricted, the manufacturing article can be embodied as computer-readable instruction, data structure, pattern, program module or the like as explanation.
Figure 11 has described the method that is used to set up snapshot database 1100 according to one side of the present invention.Snapshot database keep relevant since the time point of its establishment the data to the change of source database.At 1100 places, receive the request of the data in change source or the major database.For example, can make a change or change the request of data page.At 1120 places, be copied to by the data trnascription in the source database of new data displacement corresponding in the snapshot data library file of the modification of source database and the page or leaf.At 1130 places, new data is duplicated by the old data in the source database or substitutes.At last, at 1130 places, renewable catalogue is to notify the change of database and the clauses and subclauses in the snapshot database.
Figure 12 shows data reconstruction method 1200 according to a method of the present invention.At 1210 places, but be stored in data on the correspondence position in each the data page overwrite major database in the snapshot database.In addition, will be appreciated that the master file in the database can be expanded under the situation of necessity, to launch the reception of snapshot data.At 1220 places, the big I of snapshot database or its file is identified, and with major database or wherein the size of respective file compare.If snapshot database or file wherein are less than major database or file wherein, it means that file should not be present in the data recovered storehouse, and then major database can be by brachymemma, with the data page of deletion interpolation.This can be corresponding to last data page in the deleted file when the new data of adding in aspect are added to the file end according to the present invention.At 1230 places, can from storer, retrieve the affairs of not submitting in snapshot creation fashion of opening, and the major database that is applied to just recovering.Next; Can be in the searching database daily record of 1240 places; And be applied to the data recovered storehouse, further database is advanced to the more approaching incident place that needs recovery, like this so that preservation still " well " as much as possible affairs before occur in incident up to the incident appearance.
Forward Figure 13 now to, come data of description restoration methods 1300 according to one side of the present invention.At 1310 places, database snapshot is created and is kept.Database snapshot can be created by the user at any time.In addition, can create an above snapshot, like this so that As time goes on a plurality of version points to be provided.Snapshot database also can be by automatic establishment.For example, monitor assemblies can be observed about the action of source or major database and done, and detects and/or infer the action that can significantly change database.For example, snapshot can be created when detecting new application program and install automatically.According to an aspect of the present invention, database snapshot can store the variation to source database.Therefore, keep database snapshot corresponding to the variation of duplicating to it.According to a further aspect in the invention, snapshot can comprise sparse file, thereby only stores the change for corresponding page or leaf, and shares all other data with major database.At 1320 places, database can revert to the previous time point by snapshot institute mark when occurring including, but not limited to user error incidents such as (like fast finger deletions).Especially; Reduction or recover and can comprise will copy to that page or leaf in the major database is gone up from the page or leaf in the snapshot database, brachymemma major database, the transactional applications of opening that in snapshot creation, will not submit to be applied to major database to concentrate on the incident in database and with database journal information.
The exemplary operations environment
For the environment about each side of the present invention is provided, Figure 14 and following discussion aim to provide the brief summary of the suitable computing environment that wherein can realize each side of the present invention and describe.Though the general context of the computer executable instructions through the computer program that on one and/or many computing machines, moves has been described the present invention above; But it will be understood by those skilled in the art that the present invention also can combine other program module to realize.Generally speaking, program module comprises routine, program, assembly, data structure etc., and it is carried out specific task and/or realizes specific abstract data type.In addition; Those skilled in the art will recognize that; The inventive method can be implemented with other computer system configurations; Comprise uniprocessor or multiprocessor computer system, small-sized computing equipment, large scale computer, and personal computer, hand-held computing equipment, based on microprocessor or programmable consumer electronics or the like.Each side shown in the present also can be implemented in DCE, and wherein task is carried out by the teleprocessing equipment through linked.Yet some (if not owning) aspect of the present invention can independently implemented on the computing machine.In DCE, program module can be arranged in local and remote memory storage device.
With reference to Figure 14, be used to realize that the exemplary environments 1410 of various aspects of the present invention comprises computing machine 1412.Computing machine 1412 comprises processing unit 1414, system storage 1416 and system bus 1418.System bus 1418 is connected to processing unit 1414 with system component (including, but not limited to system storage 1416).Processing unit 1414 can be any multiple available processors.Dual micro processor also can be used as processing unit 1414 with other multiprocessor architecture.
System bus 1418 can be any several types bus-structured one or more; Comprise memory bus or Memory Controller, peripheral bus or external bus and/or use any local bus of any multiple available bus architecture; This including, but not limited to; 11 buses, ISA(Industry Standard Architecture), MCA (MCA), expansion ISA (EISA), intelligent drives electronic equipment (IDE), VESA local bus (VLB), peripheral component interconnect (PCI), USB (USB), advanced graphics port (AGP), PC memory Card Internation Association's bus (PCMCIA), and small computer system interface (SCSI).
System storage 1416 comprises volatile memory 1420 and nonvolatile memory 1422.Basic input/output (BIOS) comprises basic routine, be used for as the unloading phase element in computing machine 1412 between transmission information, this basic input/output (BIOS) is stored in the nonvolatile memory 1422.And unrestricted, nonvolatile memory 1422 can comprise ROM (read-only memory) (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically-erasable ROM (EEROM) (EEPROM) or flash memory as explanation.Volatile memory 1420 comprises random-access memory (ram), and it is as the External Cache storer.As the explanation but unrestricted; RAM can be available in a variety of forms; Like synchronous random access memory (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), enhancement mode SDRAM (ESDRAM), synchronization link DRAM (SLDRAM), and direct memory bus RAM (DRRAM).
Removable/not removable, volatile/nonvolatile computer storage media that computing machine 1412 also comprises.Figure 14 illustrates for example disk storage 1412.Disk storage 1412 is including, but not limited to such as equipment such as disc driver, floppy disk, tape drive, Jaz driver, Zip drive, LS-100 driver, flash card or memory sticks.In addition; Disk storage 1424 can comprise storage medium separately or combine with other storage medium; Other storage medium includes but not limited to CD drive, can write down driver (CD-R driving), CD recordable drive (CD-RW driver) or digital versatile disc ROM driver (DVD-ROM) like CD ROM equipment (CD-ROM), CD.For promoting being connected of disk storage device 1424 and system bus 1418, use removable or not removable interface usually, like interface 1426.
Will be appreciated that Figure 14 has described the software of the intermediary between the basic computer resources of taking on the user and in suitable operating environment 1410, describing.Such software comprises operating system 1428.Operating system 1428 can be stored in the disk storage 1424, and it is used for controlling the also resource of Distribution Calculation machine system 1412.System application 1430 utilizes operating system 1428 through being stored in program module 1432 and the management of 1434 pairs of resources of routine data in system storage 1416 or the disk storage 1424.In addition, will be appreciated that the present invention can use the combination of various operating systems or operating system to realize.
The user will order through input equipment 1436 or information is input in the computing machine 1412.Input equipment 1436 comprises; But be not limited to positioning equipment (like mouse, tracking ball, contact pilotage, touch pads, touch-screen), keyboard, microphone, operating rod, game mat, satellite dish, scanner, TV tuner card, digital camera, digital video recorder, network camera or the like.These and other input equipment are connected to processing unit 1414 by interface port 1438 through system bus 1418.Interface port 1438 comprises like serial port, parallel port, game port and USB (USB).Output device 1440 uses the port of some and input equipment 1436 same types.Like this, for example, USB port can be used to input is offered computing machine 1412, and information is outputed to output device 1440 from computing machine 1412.O adapter 1442 is provided, is used for explanation and has some output device 1440, as monitor, loudspeaker and printer and other output device 1440, they need special adapter.O adapter 1442 comprise (as the explanation but unrestricted) video card and sound card, it provides the connection means between output device 1440 and the system bus 1418.Should be noted that like remote computer 1444 miscellaneous equipments such as grade and/or device systems input and fan-out capability are provided.
Computing machine 1412 can use one or more remote computer, works in the networked environment that connects like the logic of remote computer 1444.Remote computer 1444 can be personal computer, server, router, network PC, workstation, the device based on microprocessor, peer device or other common network node or the like, and it generally includes many or relative computing machine 1412 described elements above all.For the sake of simplicity, only show memory storage device 1446 with remote computer 1444.Remote computer 1444 links to each other with computing machine 1412 through network interface 1448 in logic, connects 1450 through communication then and physically connects.Network interface 1448 comprises the communication network as LAN (LAN) and wide area network (WAN).Lan technology comprises Fiber Distributed Data Interface (FDDI), Copper Distributed Data Interface (CDDI), Ethernet/IEEE 802.3, token ring/IEEE 802.5 or the like.The WAN technology includes, but not limited to point-to-point link, the circuit-switched network as Integrated Service Digital Network and variation thereof, packet switching network and Digital Subscriber Line (DSL).
Communication connects the hardware/software that 1450 fingers are used for network interface 1448 is connected to bus 1418.Though be the clarity of explanation, communication is shown connects 1450 in computing machine 1412 inside, they also can be in computing machine 1412 outsides.Be connected to network interface 1448 required hardware/softwares and comprise (only exemplary) inside and outside technology, (comprise routine call level modulator-demodular unit, cable modem, DSL modulator-demodular unit, power modulation detuner, ISDN adapter and Ethernet card like modulator-demodular unit.
Figure 15 be can with the theory diagram of the mutual example calculations environment 1500 of the present invention.System 1500 comprises one or more client computer 1510.Client computer 1510 can be hardware and/or software (like thread, process, computing equipment).System 1500 also comprises one or more servers 1530.Server 1530 also can be hardware and/or software (like thread, process, computing equipment).Server 1530 can hold thread, to carry out conversion like the application of the invention.It can be the form with the packet that is adapted at transmitting in two or more computer processes that between client computer 1510 and the server 1530 one possibly communicate by letter.System 1500 comprises communications framework 1550, and it can be used to promote the communication between client computer 1510 and the server 1530.Client computer 1510 can be operated to be connected to and is used to store the one or more client datas storages 1560 to the information of client computer 1510 this locality.Same, can be connected in server 1530 operations and can be used to store one or more server data stores 1540 information of server 1530 this locality.
That has described above comprises example of the present invention.Certainly, can not describe each combination that can expect of assembly or method for description the present invention, but those of ordinary skill in the art will appreciate that many other combinations of the present invention and arrangement also are possible.Therefore, the present invention is intended to comprise spirit and interior all such changes, modification and the variation of scope that falls into appended claims.In addition, describe in detail or claims on the meaning that uses a technical term " comprise or have ", it is comprising property that such term should be similar to that term " comprises ", that kind of as the transition speech in claims the time, being explained as " comprising ".

Claims (19)

1. data recovery system comprises:
One snapshot assembly is suitable for generating snapshot database according to source database, and wherein, said snapshot database holds sparse file, and said sparse file stores because the data that the modification of said source database is replaced;
One recovery component is suitable for through the snapshot database file copy is returned to incident before time point to utilize said snapshot database with said source database to relevant source database files; And
One directory component, whether the page or leaf that is suitable for following the tracks of in the said snapshot database is shared with source database, still has been copied to said snapshot database.
2. the system of claim 1 is characterized in that, said incident is corresponding to user error.
3. system as claimed in claim 2 is characterized in that, said recovery component comprises a reduction assembly, and it copies to said source database with said snapshot data database data.
4. system as claimed in claim 3 is characterized in that, said recovery component comprises cancels assembly, and it is stored in the affairs of opening between the startup stage of snapshot database, and adds it to recovered source database.
5. system as claimed in claim 4 is characterized in that, the said assembly of cancelling utilizes database log file to concentrate on said mistake.
6. the system of claim 1 is characterized in that, said snapshot assembly comprises a monitor assemblies, it observes said source database, and when having taken place maybe said source database be modified to the incident of specific degrees, starts snapshot creation.
7. the system of claim 1 is characterized in that, said recovery component is side by side upgraded and synchronous one or more mirror database automatically and with the recovery of said source database.
8. the system of claim 1 is characterized in that, the original value of the said source database files of sparse file representative before change of said snapshot database.
9. system as claimed in claim 8 is characterized in that, said snapshot database and said source database are shared the data that since said snapshot database is created, just do not had change.
10. data reconstruction method comprises:
Create the snapshot of the source database at a time point place;
The data that will be created office's displacement of submitting to after the said snapshot copy to the sparse file of snapshot database; And
When incident occurs; The state of said source database when creating said snapshot to revert to through copying to corresponding source database page or leaf from the page or leaf of sparse file; Wherein a directory component is used to confirm that which data is shared between source database and snapshot database, and which data is unique to said snapshot database.
11. method as claimed in claim 10 is characterized in that, said incident is a user error.
12. method as claimed in claim 11 is characterized in that, the state that reverts to said source database when creating said snapshot utilizes graphic user interface to start by the data base administrator.
13. method as claimed in claim 10 is characterized in that, also comprises the affairs that seizure is not submitted to when creating said snapshot.
14. method as claimed in claim 13 is characterized in that, also comprises the said transactional applications of not submitting in said source database.
15. method as claimed in claim 14; It is characterized in that, also comprise the searching database daily record, and said daily record is applied to said source database; So that involve in said source database, thereby be reflected in the variation that said source database before appears in said incident along the time.
16. method as claimed in claim 10 is characterized in that, also comprises automatically when said source database reduction, upgrades one or more mirror databases automatically.
17. method as claimed in claim 10 is characterized in that, said impinging upon soon when detecting the incident that possibly significantly change database created automatically.
18. method as claimed in claim 17 is characterized in that, the said installation that possibly significantly change the incident of database corresponding to new application program.
19. method as claimed in claim 10 is characterized in that, the structure of said source database when said sparse file representes to create said snapshot.
CN200480001706.4A 2004-02-25 2004-07-27 Database data recovery system and method Expired - Fee Related CN1784676B (en)

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
US54764104P 2004-02-25 2004-02-25
US60/547,641 2004-02-25
US10/833,541 2004-04-28
US10/833,541 US8095511B2 (en) 2003-06-30 2004-04-28 Database data recovery system and method
PCT/US2004/024048 WO2005086032A1 (en) 2004-02-25 2004-07-27 Database data recovery system and method

Publications (2)

Publication Number Publication Date
CN1784676A CN1784676A (en) 2006-06-07
CN1784676B true CN1784676B (en) 2012-05-30

Family

ID=36773857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200480001706.4A Expired - Fee Related CN1784676B (en) 2004-02-25 2004-07-27 Database data recovery system and method

Country Status (3)

Country Link
CN (1) CN1784676B (en)
AT (1) ATE463797T1 (en)
DE (1) DE602004026422D1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105027070A (en) * 2013-01-10 2015-11-04 净睿存储股份有限公司 Safety for volume operations

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8112664B2 (en) * 2008-03-26 2012-02-07 Symantec Operating Corporation Using volume snapshots to prevent file corruption in failed restore operations
US8412676B2 (en) * 2008-10-21 2013-04-02 Microsoft Corporation Forgetting items with knowledge based synchronization
CN102685733B (en) * 2012-04-27 2016-08-03 王兰睿 A kind of method and system for creating and safeguard mobile station information mirror database
CN103870478B (en) * 2012-12-12 2018-09-25 腾讯科技(深圳)有限公司 A kind of method and device for restoring synchrodata
CN103914359B (en) * 2012-12-31 2017-09-26 中国移动通信集团浙江有限公司 A kind of data reconstruction method and device
GB2509930A (en) * 2013-01-17 2014-07-23 Ibm Data backup recovery
US9501501B2 (en) 2013-03-15 2016-11-22 Amazon Technologies, Inc. Log record management
CN104156369B (en) * 2013-05-14 2019-04-02 上海盛大网络发展有限公司 A kind of database mirroring production method and a kind of database
US9098453B2 (en) * 2013-07-11 2015-08-04 International Business Machines Corporation Speculative recovery using storage snapshot in a clustered database
CN105677673B (en) * 2014-11-20 2019-01-04 阿里巴巴集团控股有限公司 Method for processing business, apparatus and system
CN104462342B (en) * 2014-12-04 2018-08-07 北京国双科技有限公司 database snapshot synchronization processing method and device
US9767024B2 (en) * 2014-12-18 2017-09-19 Intel Corporation Cache closure and persistent snapshot in dynamic code generating system software
US10884869B2 (en) * 2015-04-16 2021-01-05 Nuodb, Inc. Backup and restore in a distributed database utilizing consistent database snapshots
US10180954B2 (en) 2015-05-29 2019-01-15 Nuodb, Inc. Disconnected operation within distributed database systems
US10496672B2 (en) 2015-12-30 2019-12-03 EMC IP Holding Company LLC Creating replicas at user-defined points in time
CN107239365B (en) * 2016-03-29 2020-11-27 华为技术有限公司 Method and device for accessing storage equipment
CN106708662A (en) * 2016-12-13 2017-05-24 上海上讯信息技术股份有限公司 Method for restoring database and equipment
TWI735518B (en) * 2017-01-24 2021-08-11 香港商阿里巴巴集團服務有限公司 Service provision method and system of database
CN107203345B (en) * 2017-06-01 2019-10-01 深圳市云舒网络技术有限公司 A kind of more copies storage rapid verification coherence method and its device
CN111414370A (en) * 2019-01-07 2020-07-14 北京智融网络科技有限公司 Feature library updating method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6065018A (en) * 1998-03-04 2000-05-16 International Business Machines Corporation Synchronizing recovery log having time stamp to a remote site for disaster recovery of a primary database having related hierarchial and relational databases
US6438749B1 (en) * 1999-03-03 2002-08-20 Microsoft Corporation Method and system for restoring a computer to its original state after an unsuccessful patch installation attempt

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6065018A (en) * 1998-03-04 2000-05-16 International Business Machines Corporation Synchronizing recovery log having time stamp to a remote site for disaster recovery of a primary database having related hierarchial and relational databases
US6438749B1 (en) * 1999-03-03 2002-08-20 Microsoft Corporation Method and system for restoring a computer to its original state after an unsuccessful patch installation attempt

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105027070A (en) * 2013-01-10 2015-11-04 净睿存储股份有限公司 Safety for volume operations
CN105027070B (en) * 2013-01-10 2018-05-29 净睿存储股份有限公司 Roll up the security of operation

Also Published As

Publication number Publication date
ATE463797T1 (en) 2010-04-15
DE602004026422D1 (en) 2010-05-20
CN1784676A (en) 2006-06-07

Similar Documents

Publication Publication Date Title
CN1784676B (en) Database data recovery system and method
EP1602042B1 (en) Database data recovery system and method
US7383293B2 (en) Database backup system using data and user-defined routines replicators for maintaining a copy of database on a secondary server
US9262281B2 (en) Consolidating analytics metadata
EP3008599B1 (en) Live restore for a data intelligent storage system
US10102079B2 (en) Triggering discovery points based on change
CN1746893B (en) Transactional file system
CN100440155C (en) Method and apparatus for creating a virtual data copy
US7987158B2 (en) Method, system and article of manufacture for metadata replication and restoration
US7921080B2 (en) System and method for a backup parallel server data storage system
US9588847B1 (en) Recovering corrupt virtual machine disks
CN101243446B (en) Online page restore from a database mirror
US6934877B2 (en) Data backup/recovery system
CN101506766B (en) Database corruption recovery systems and methods
CN101460930B (en) Maintenance of link level consistency between database and file system
US7484051B2 (en) Apparatus, system and method for reliably updating a data group in a read-before-write data replication environment using a comparison file
US20060235905A1 (en) Method and system for preserving real-time access to a system in case of a disaster
US8375181B1 (en) System and method for performing replication based on change tracking information
WO2007053314A2 (en) Apparatus and method for creating a real time database replica
CN102117233A (en) System and method for high performance enterprise data protection
US20100017648A1 (en) Complete dual system and system control method
WO2017122060A1 (en) Parallel recovery for shared-disk databases
Choy et al. Disaster recovery techniques for database systems
Son Recovery in main memory database systems for engineering design applications
WO2017112737A1 (en) Triggering discovery points based on change

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
ASS Succession or assignment of patent right

Owner name: MICROSOFT TECHNOLOGY LICENSING LLC

Free format text: FORMER OWNER: MICROSOFT CORP.

Effective date: 20150429

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20150429

Address after: Washington State

Patentee after: Micro soft technique license Co., Ltd

Address before: Washington State

Patentee before: Microsoft Corp.

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

Granted publication date: 20120530

Termination date: 20200727

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