CN1784676A - Database data recovery system and method - Google Patents

Database data recovery system and method Download PDF

Info

Publication number
CN1784676A
CN1784676A CN200480001706.4A CN200480001706A CN1784676A CN 1784676 A CN1784676 A CN 1784676A CN 200480001706 A CN200480001706 A CN 200480001706A CN 1784676 A CN1784676 A CN 1784676A
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.)
Granted
Application number
CN200480001706.4A
Other languages
Chinese (zh)
Other versions
CN1784676B (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

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

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 by reference thereto.
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 a large amount of information by being convenient to inquiry rapidly and easy-to-use mode.For example, in the traditional relational database, information can be organized as object, as record, form and index.Database engine provides a kind of also mechanism of manipulation data of retrieving from database table after the user has specified inquiry.Inquiry is normally expressed with certain query language, as Structured Query Language (SQL) (SQL).Inquiry can be specified one or more forms, and the row and column that wherein will be retrieved or be handled.By 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 be retrieved effectively and handle by 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 may 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 may install new application program, and this new application program is revised database in the mode of user's the unknown.This problem there are several 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 may 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 finish.
Another method is, is not in the mood for the data revised and can makes up by 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 afterwards in delay (as 24 hours).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
Provide simplification general introduction of the present invention 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 is described in more detail 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 be created apace and makes the space effective.When source database was modified, raw data was copied to the space effectively in the 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 generally recovers faster than normal, 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 an aspect of of the present present invention, user or data base administrator can create one or more database snapshots at different time point places.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 monitor major database, and creates database snapshot automatically when particular event takes place.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 upgraded automatically, 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,, some illustrative aspect of the present invention has been described here in conjunction with following description and accompanying drawing.These aspects show can implement distinct methods of the present invention, and all these methods all are intended to be covered by the present invention.When considered in conjunction with the accompanying drawings, can from following detailed description of the present invention, know other advantage of the present invention and novel feature.
Brief description of drawings
From following detailed and the hereinafter concise and to the point accompanying drawing of describing, aforementioned and others of the present invention will become apparent.
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 and describe in detail does not really want to limit the invention to the concrete form that disclosed.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 moving, processor, object, executable code, execution thread, program and/or computing machine on processor.As an illustration, application program of moving on server 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 (as hard disk, floppy disk, magnetic stripe ...), CD (as compact disk (CD), digital versatile disc (DVD) ...), smart card and flash memory device (as card, rod).Certainly, it will be understood by those skilled in the art that under the prerequisite that does not deviate from scope and spirit of the present invention, 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 in 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 can be created DBSS fast and makes the space effective.When source database 110 was modified, raw data can be copied to the space efficient memory, 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 time point before incident.According to an aspect of of the present present invention, this incident can be corresponding to user error, and as fast finger deletion, promptly the user unexpectedly 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 can utilize the data that reside in the snapshot database 130 that source database 110 is returned to incident previous time point place before.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 more faster than traditional recovery technology usually, this is because only need sparse file (sparse file) is copied to source database rather than full recovery.In addition, owing to rejuvenation does not need to transport needed repetition resource as daily record, so it is more effective.
Fig. 2 has described recovery component 140 according to an aspect of of the present 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 was created before incident is given birth to now, the assembly 210 that then reduces can utilize the sparse file in the database snapshot that source database is returned to the incident time before.Reformed data file or page or leaf can copy to the state that source database turns back to snapshot time place by 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 by simply copying to " B " value that " D " upward arrives database recovery snapshot time place.Yet, when database snapshot is created, may 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 begins and in the affairs of termination 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 assembly 220 and can utilize with all period interval or according to administrator command and catch the traditional database daily record of database change, 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 can utilize less system resource but finish routinely with faster speed.
Forward Fig. 3 to, show timeline 300, to be further provided with the clarity of closing database recovery operation according to an aspect of of the present 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 be corresponding to the unexpected deletion of user complete form or modification page data.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 by copying to 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 by being stored in the transactional applications of cancelling in the file of opening.
Fig. 4 illustrates database snapshot system 400 according to an aspect of of the present present invention.DBSS system 400 comprises snapshot assembly 120, source database 110, snapshot database 130, directory component 410 and monitor assemblies 420.Source database 110 is master or major databases of seeking to recover as previously mentioned.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 that the space is 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 saved.The source database snapshot of taking after the snapshot that just is reduced or will be reduced is not very valuable.In addition, for example, can after having used the database snapshot recovery, source database take new snapshot to this source database.It is much valuable that the snapshot of taking before the snapshot that is used to recover 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 in periodic mode, and perhaps if the time point that the user wishes single " safety " is allowing its reduction, available special mode is created and abandoned.For example, the user may want to install or test phase establishment snapshot in new application program.Can utilize following order 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, observing affairs 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 may 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 original position (when DBSS is created) in the source database files.In most cases, the velocity ratio of duplicating the page or leaf of change recovers faster from backup.In case page or leaf is replicated, then the daily record of database can be rebuilt.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 to cancelling " the pre-image (pre-image) " in the file separately by the original value of DBSS each page that recovery contacted when creating.When reduction, the DBSS page or leaf just is copied in the source database as described.Pre-image can duplicate from independent cancelling the file.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 minimum data loss.
Forward Fig. 5 to, the diagram that exemplary database recovery 500 is shown is provided according to an aspect of of the present 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.Especially, 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 file 540 the page or leaf 3 pages of renewal that can be replicated in the source of getting back to or the major database 110.
Duplicate page or leaf and comprise several situations, 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 by normal replicate run in snapshot thus.
A kind of simple algorithm that duplicates back the page ( Algorithm) be 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 may be added to the end of file, and this can remedy by the size that file is punctured into duplicate.At last, the source can be unlocked, to finish recovery.
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 (4) restart database.
According to a further aspect in the invention, new source database can be created from snapshot database by duplicating from the data in the original source data storehouse.Any mistake in database initialize stage may 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 an aspect of of the present 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 product of source database 110.Like this, when source database 110 is made a change, for example can they be sent to mirror database 610 by 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 an aspect of of the present 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 and recovery component 140 revert to previous time point with source database 110.If carry out reduction on source database 110, then mirror database 610 also should reflect this variation.Routinely, need time loss backup and recover to upgrade and synchronous mirror database 610 again entirely.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 finished on the source at reduction phase to the change in source, while or be delivered in the mirror image asynchronously.
Forward Fig. 7 to, show according to an aspect of of the present 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 to check data from database 610.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=` F: 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=` F: 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 with 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 read (if they are modified) from alternating current 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 identify with log serial number (LSN).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 of the existing database 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 determines 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 storing secondary file in sparse 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.Be written in the sparse file as if the data in the zone, 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 changed in the major database since database snapshot is created, 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 determining which data is written 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 determine 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.
For 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 read about this page from secondary file, and this shows that it has changed.The sub-page table allows to determine 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 preserved from major database 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 store invalid data in this zone.
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.
For 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.For 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.
For 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.For 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 page or leaf wherein should be stored in zone in the secondary file.Yet as described below, in one embodiment, this bit 2 only is set when the sub-page table is re-constructed.
Bitmap is maintained in the storer, may not be lasting therefore.If they are wiped free of, then from sparse file information, re-construct bitmap.Consulting sparse file, and for 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.For 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 in the mode that it continues, then the granularity of zone and page or leaf may be insignificant, 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 an aspect of of the present 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 an aspect of of the present 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 duplicates to determine it whether to comprise from major database.
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 database having been carried out since transaction journal is by last backup.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 by the inertia part of deletion daily record.This inertia partly comprises the affairs of finishing, and it does not need to 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 finishing affairs (active transaction).Can finish 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.For active transaction, some modification of data file may also not write in the data file from the impact damper high-speed cache, and may exist from some modification of not finishing affairs in the data file.Journal file 810 can be used to guarantee that the recovery of database is a consistent affairs.This can finish by the recovery of using ARIES (being used to recover and isolate and use semantic algorithm) style.Each modification that may also not be written in the data file that is recorded in the daily record involves in by database is carried out to revise.For guaranteeing the integrality of database, each that find in transaction journal do not finished affairs by 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 mentioned above, 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 initialization sub-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 determine in secondary file 925.
When finishing 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 determining in the transaction journal.This fractionation will be corresponding to the time point of database snapshot representative.The LSN of daily record end can obtain when database snapshot is created on the major database 800; This LSN is that major database 800 and database snapshot 820 will begin crotch " fractionation point ".Then, major database 800 can be labeled, like this so that need database snapshot to handle.Database snapshot support in the major database 800 begins as described below.
For the database snapshot unanimity, must analyze the daily record that splits some major database 800 before, when splitting, be movable to determine what affairs.Activity (from splitting point) affairs the oldest in the daily record are identified.Before the oldest active transaction, allow the daily record brachymemma.
The mode of the recovery by 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.Determine to split point 1075.Affairs continue to be written to daily record, however the forbidding brachymemma.Audit log file 810, and secondary file 925 carried out any modification to database is as the result from the oldest active transaction to the affairs that split point (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 as journal entries n1000, journal entries n+21020 and journal entries n+6 and to cancel.
Yet some affairs may also not submitted to.Therefore, the active transaction of putting up to fractionation in the daily record should be positioned and be cancelled.According to an aspect of the present invention, the value place of a certain position in not finishing affairs change database, the variation that has been added to above-mentioned secondary file is deleted from this pair file.Perhaps, affairs cancel can by 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 the affairs of not finishing 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 enabled the database snapshot processing, so database snapshot will upgrade when major database 800 is made a change, and database snapshot can be used to determine 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.
For reinitializing the sub-page table, in two bit sub-page tables are realized, for 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 may be written 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 written in the secondary file 925 to show page or leaf.Yet it is uncertain that page or leaf is written 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 determine whether the page in the secondary file 925 is effective, as mentioned above for 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 allow database snapshot before data are by overwrite, store information from major database 800, the establishment that major database 800 must the supporting database snapshots.For each page or leaf that major database 800 is revised, must do whether determining 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 written 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 may be in secondary file Situation 1: page or leaf is in secondary file Situation 2: page or leaf may 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, to show that page or leaf is really in secondary file 925 time, bit 2 is set, showing that page or leaf may 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, then for two bit page tables, the action that should take above listing situation is as follows:
Situation 1: do nothing.
Situation 2: determine 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 written 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 written 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 any follow-up the writing of page or leaf will according to circumstances 1 be handled, and the correct page maintenance of data base view is stored in the secondary file 925.
In situation 2, for determining 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 Ye previous release 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 written 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 written in the newly assigned zone.If situation is like this, the existence of page or leaf is to represent that by the corresponding page or leaf in the secondary file 925 this page is the part of assigned region and comprises some non-zero in the then secondary file 925.
Situation about describing in detail in the form 1 also is applicable to carries out the data read that is stored in the database snapshot.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 situations is as follows:
Situation 1: from secondary file 925, read page or leaf.
Situation 2: determine 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,, describe in detail, can on database snapshot, carry out and cancel affairs as top at initial phase.
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 there are not 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 as follows to tackle the action of taking in three kinds of situations:
Situation 1: from secondary file 925, read page or leaf, carry out modification, page or leaf is write secondary file 925.
Situation 2: determine page or leaf whether in secondary file 925, if its, then carry out as situation 1, do not exist as if it, then carry out as situation 3.
Situation 3: from major database 800, read page or leaf, write page or leaf 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 is not subjected to the restriction of square frame order, because according to the present invention, some square frame may take place and/or take place simultaneously with other square frame of describing here and illustrate 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 and 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 an illustration.
Figure 11 has described the method that is used to set up snapshot database 1100 according to an aspect of of the present 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 in the snapshot data library file and page or leaf corresponding to the modification of source database.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 data page overwrite major database in the snapshot database.In addition, will be appreciated that the master file in the database can be expanded in the case of necessary, to enable the reception of snapshot data.At 1220 places, snapshot database or wherein the big I of file 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 incident occurs occur up to incident.
Forward Figure 13 now to, come data of description restoration methods 1300 according to an aspect of of the present present invention.At 1310 places, database snapshot is created and is kept.Database snapshot can be created at any time by the user.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 created automatically.For example, monitor assemblies can be observed about the action of source or major database and be done, and detects and/or infer the action that can significantly change database.For example, snapshot can be created when new application program is installed automatically detecting.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 (as 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 will not submit to be applied to major database to concentrate on the incident in database and with database journal information in snapshot creation.
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 by the computer program that moves on one and/or many computing machines has been described the present invention above, but it will be understood by those skilled in the art that the present invention also can realize in conjunction with other program module.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 distributed computing environment, and wherein task is by carrying out by the teleprocessing equipment of communication network link.Yet some (if not owning) aspect of the present invention can independently implemented on the computing machine.In distributed computing environment, 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 and other multiprocessor architecture also can be used as processing unit 1414.
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 (universal serial bus) (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 an illustration.Volatile memory 1420 comprises random-access memory (ram), and it is as the External Cache storer.As an illustration but unrestricted, RAM can be available in a variety of forms, as 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) as 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, as 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 describing in suitable operating environment 1410.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 by being stored in the program module 1432 in system storage 1416 or the disk storage 1424 and the management of 1434 pairs of resources of routine data.In addition, will be appreciated that the present invention can realize with the combination of various operating systems or operating system.
The user will order by input equipment 1436 or information is input in the computing machine 1412.Input equipment 1436 comprises, but be not limited to positioning equipment (as 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 is connected to processing unit 1414 by interface port 1438 by system bus 1418.Interface port 1438 comprises as serial port, parallel port, game port and USB (universal serial bus) (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 comprises (as an illustration but unrestricted) video card and sound card, and it provides the connection means between output device 1440 and the system bus 1418.Should be noted that as 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 as 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 by network interface 1448 in logic, physically connects by communicating to connect 1450 then.Network interface 1448 comprises the communication network as local network (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).
Communicate to connect the hardware/software that 1450 fingers are used for network interface 1448 is connected to bus 1418.Though the clarity for explanation illustrates and communicates to connect 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 as 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 (as thread, process, computing equipment).System 1500 also comprises one or more servers 1530.Server 1530 also can be hardware and/or software (as thread, process, computing equipment).Server 1530 can hold thread, to carry out conversion as the application of the invention.It can be 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 may 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 and is connected to the one or more client data storages 1560 that are used to store to the information of client computer 1510 this locality.Same, can be connected to the one or more server data stores 1540 that can be used to store to the information of server 1530 this locality in server 1530 operations.
Described above comprise 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 combination and permutation of the present invention also are possible.Therefore, the present invention is intended to comprise all such changes, the modifications and variations in the spirit and scope that fall into appended claims.In addition, describe in detail or claims in use on the meaning of term " comprise or have ", such term should be similar to that term " comprises " is comprising property, is explained as the transition speech in claims the time as " comprising ".

Claims (32)

1. data recovery system comprises:
One snapshot assembly, it generates snapshot database from source database, and wherein, described snapshot database holds sparse file, and described sparse file stores the data of replacing as to the modification result of described source database; And
One recovery component, it utilizes described snapshot database that described source database is returned to incident time point before.
2. the system as claimed in claim 1 is characterized in that, described incident is corresponding to user error.
3. system as claimed in claim 2 is characterized in that, described recovery component comprises a reduction assembly, and it copies to described source database with the snapshot data database data.
4. system as claimed in claim 3 is characterized in that, described 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 described assembly of cancelling utilizes database log file to concentrate on described mistake.
6. the system as claimed in claim 1 is characterized in that, also comprises a directory component, and whether the page or leaf that it is followed the tracks of in the described snapshot database is shared with source database.
7. system as claimed in claim 6 is characterized in that, whether the page or leaf that described directory component is followed the tracks of in the described source database has been copied to described snapshot database.
8. the system as claimed in claim 1 is characterized in that, described snapshot assembly comprises a monitor assemblies, and it observes described source database, and starts snapshot creation when the incident that described source database may be modified to specific degrees takes place.
9. the system as claimed in claim 1 is characterized in that, described recovery component is side by side upgraded and synchronous one or more mirror database automatically and with the recovery of described source database.
10. database data recovery system comprises:
Be used for monitoring change that data are stored and the device that the data of displacement is kept at snapshot database;
Be used to restore the data to the device of previous time point, wherein, reduction comprises the snapshot database file copy on the data storage file that is associated.
11. system as claimed in claim 10 is characterized in that, described snapshot database comprises sparse file, the original value of the data storage file of described sparse file representative before change.
12. system as claimed in claim 11 is characterized in that, described snapshot database and described data storage are shared the data that just do not had change since described snapshot database is created.
13. system as claimed in claim 10 is characterized in that, also comprises the affairs of opening that are used to catch and also do not submit to when being applied in snapshot creation, closer to concentrate on wrong device.
14. system as claimed in claim 10 is characterized in that, also comprises to be used for database log file is applied to data storage, so that preserve good affairs and concentrate on the device of the incident that proves reduction.
15. a data reconstruction method comprises:
Create database snapshot; And
Revert to described snapshot, with state with the time point place of described database recovery when creating described snapshot.
16. method as claimed in claim 15 is characterized in that, described impinging upon soon when detecting the incident that may significantly change database created automatically.
17. method as claimed in claim 16 is characterized in that, described incident is corresponding to the installation of new application program.
18. method as claimed in claim 15 is characterized in that, described snapshot comprises the one or more sparse files corresponding to database file, the structure of described database when described sparse file represents to create described snapshot.
19. method as claimed in claim 18 is characterized in that, revert to described snapshot comprise will be included in page or leaf in the described sparse file copy on the corresponding page or leaf of described database.
20. method as claimed in claim 18 is characterized in that, the transactional applications of opening that also comprises not submission is in described database.
21. method as claimed in claim 20 is characterized in that, also comprises database log file is applied to described database, to concentrate on the incident that causes recovery.
22. the computer-readable media with storage computer executable instructions thereon, described computer executable instructions is used to carry out method as claimed in claim 15.
23. a data reconstruction method comprises:
Create the snapshot database of the source database at a time point place;
Will after creating described snapshot, submit to the data of displacement to copy to described snapshot database by affairs; And
When incident occurs, revert to the state of described database when creating described snapshot.
24. method as claimed in claim 23 is characterized in that, described incident is a user error.
25. method as claimed in claim 24 is characterized in that, the state that reverts to described database when creating described snapshot utilizes graphic user interface to start by the data base administrator.
26. method as claimed in claim 23 is characterized in that, a directory component is used for determining which data is shared between source database and snapshot database, and which data is unique to described snapshot database.
27. method as claimed in claim 23 is characterized in that, the described database that reduces comprises the page or leaf from the sparse data library file is copied on the corresponding source database page or leaf.
28. method as claimed in claim 27 is characterized in that, also comprises the affairs that seizure is not submitted to when creating described snapshot.
29. method as claimed in claim 28 is characterized in that, also comprises the described transactional applications of not submitting in described source database.
30. method as claimed in claim 29 is characterized in that, also comprises the searching database daily record, and described daily record is applied to described database, so that described database is involved in, reflects the exactly variation of the described database before described incident occurs.
31. method as claimed in claim 23 is characterized in that, also comprises automatically when described source database reduction, upgrades one or more mirror databases automatically.
32. being used for enforcement of rights, the computer-readable medium with storage computer executable instructions thereon, described computer executable instructions require 23 described methods.
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 true CN1784676A (en) 2006-06-07
CN1784676B 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 (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102187329A (en) * 2008-10-21 2011-09-14 微软公司 Forgetting items with knowledge based synchronization
CN102685733A (en) * 2012-04-27 2012-09-19 王兰睿 Method and system for establishing and maintaining mobile station information mirror image databases
CN101566959B (en) * 2008-03-26 2013-10-16 赛门铁克公司 Using volume snapshots to prevent file corruption in failed restore operations
CN103870478A (en) * 2012-12-12 2014-06-18 腾讯科技(深圳)有限公司 Method and device for restoring synchronous data
CN103914359A (en) * 2012-12-31 2014-07-09 中国移动通信集团浙江有限公司 Data recovery method and device
WO2014111773A1 (en) * 2013-01-17 2014-07-24 International Business Machines Corporation Data backup recovery
CN104156369A (en) * 2013-05-14 2014-11-19 上海盛大网络发展有限公司 Database mirror making method and database
CN104462342A (en) * 2014-12-04 2015-03-25 北京国双科技有限公司 Synchronous processing method and device for database snapshots
CN105190623A (en) * 2013-03-15 2015-12-23 亚马逊科技公司 Log record management
WO2016078529A1 (en) * 2014-11-20 2016-05-26 阿里巴巴集团控股有限公司 Service processing method, device and system
CN106708662A (en) * 2016-12-13 2017-05-24 上海上讯信息技术股份有限公司 Method for restoring database and equipment
CN106933501A (en) * 2015-12-30 2017-07-07 伊姆西公司 Duplicate is created at user-defined time point
CN107003882A (en) * 2014-12-18 2017-08-01 英特尔公司 Translation cache closure and lasting snapshot in dynamic code generation system software
CN107203345A (en) * 2017-06-01 2017-09-26 深圳市云舒网络技术有限公司 A kind of many copy storage rapid verification coherence methods and its device
CN107239365A (en) * 2016-03-29 2017-10-10 华为技术有限公司 A kind of method and device for accessing storage device
CN107835983A (en) * 2015-04-16 2018-03-23 诺宝公司 Backup-and-restore is carried out in distributed data base using consistent database snapshot
TWI625621B (en) * 2013-07-11 2018-06-01 格芯公司 Method, computer usable program product, and data processing system for recovery in a database
CN111414370A (en) * 2019-01-07 2020-07-14 北京智融网络科技有限公司 Feature library updating method and system
TWI735518B (en) * 2017-01-24 2021-08-11 香港商阿里巴巴集團服務有限公司 Service provision method and system of database
US11222008B2 (en) 2015-05-29 2022-01-11 Nuodb, Inc. Disconnected operation within distributed database systems

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9589008B2 (en) * 2013-01-10 2017-03-07 Pure Storage, Inc. Deduplication of volume regions

Family Cites Families (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 (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101566959B (en) * 2008-03-26 2013-10-16 赛门铁克公司 Using volume snapshots to prevent file corruption in failed restore operations
CN102187329A (en) * 2008-10-21 2011-09-14 微软公司 Forgetting items with knowledge based synchronization
CN102187329B (en) * 2008-10-21 2013-09-18 微软公司 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
CN102685733A (en) * 2012-04-27 2012-09-19 王兰睿 Method and system for establishing and maintaining mobile station information mirror image databases
CN103870478A (en) * 2012-12-12 2014-06-18 腾讯科技(深圳)有限公司 Method and device for restoring synchronous data
CN103914359A (en) * 2012-12-31 2014-07-09 中国移动通信集团浙江有限公司 Data recovery method and device
WO2014111773A1 (en) * 2013-01-17 2014-07-24 International Business Machines Corporation Data backup recovery
CN110083656B (en) * 2013-03-15 2024-04-12 亚马逊科技公司 Log record management
CN105190623A (en) * 2013-03-15 2015-12-23 亚马逊科技公司 Log record management
US10031813B2 (en) 2013-03-15 2018-07-24 Amazon Technologies, Inc. Log record management
CN110083656A (en) * 2013-03-15 2019-08-02 亚马逊科技公司 Log record management
CN104156369A (en) * 2013-05-14 2014-11-19 上海盛大网络发展有限公司 Database mirror making method and database
CN104156369B (en) * 2013-05-14 2019-04-02 上海盛大网络发展有限公司 A kind of database mirroring production method and a kind of database
TWI625621B (en) * 2013-07-11 2018-06-01 格芯公司 Method, computer usable program product, and data processing system for recovery in a database
CN105677673A (en) * 2014-11-20 2016-06-15 阿里巴巴集团控股有限公司 Business processing method, device and system
CN105677673B (en) * 2014-11-20 2019-01-04 阿里巴巴集团控股有限公司 Method for processing business, apparatus and system
WO2016078529A1 (en) * 2014-11-20 2016-05-26 阿里巴巴集团控股有限公司 Service processing method, device and system
CN104462342A (en) * 2014-12-04 2015-03-25 北京国双科技有限公司 Synchronous processing method and device for database snapshots
CN104462342B (en) * 2014-12-04 2018-08-07 北京国双科技有限公司 database snapshot synchronization processing method and device
CN107003882A (en) * 2014-12-18 2017-08-01 英特尔公司 Translation cache closure and lasting snapshot in dynamic code generation system software
CN107835983A (en) * 2015-04-16 2018-03-23 诺宝公司 Backup-and-restore is carried out in distributed data base using consistent database snapshot
CN107835983B (en) * 2015-04-16 2022-02-18 诺宝公司 Backup and restore in distributed databases using consistent database snapshots
US11222008B2 (en) 2015-05-29 2022-01-11 Nuodb, Inc. Disconnected operation within distributed database systems
CN106933501A (en) * 2015-12-30 2017-07-07 伊姆西公司 Duplicate is created at user-defined time point
US10496672B2 (en) 2015-12-30 2019-12-03 EMC IP Holding Company LLC Creating replicas at user-defined points in time
CN106933501B (en) * 2015-12-30 2020-04-28 伊姆西Ip控股有限责任公司 Method, system, and computer program product for creating a replica
US10997209B2 (en) 2015-12-30 2021-05-04 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
CN107239365A (en) * 2016-03-29 2017-10-10 华为技术有限公司 A kind of method and device for accessing storage device
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
CN107203345A (en) * 2017-06-01 2017-09-26 深圳市云舒网络技术有限公司 A kind of many copy storage rapid verification coherence methods and its device
CN111414370A (en) * 2019-01-07 2020-07-14 北京智融网络科技有限公司 Feature library updating method and system

Also Published As

Publication number Publication date
DE602004026422D1 (en) 2010-05-20
CN1784676B (en) 2012-05-30
ATE463797T1 (en) 2010-04-15

Similar Documents

Publication Publication Date Title
CN1784676A (en) Database data recovery system and method
EP1602042B1 (en) Database data recovery system and method
EP3008599B1 (en) Live restore for a data intelligent storage system
US9262281B2 (en) Consolidating analytics metadata
US10102079B2 (en) Triggering discovery points based on change
US7613743B1 (en) Methods and apparatuses for data protection
CN101243446B (en) Online page restore from a database mirror
US7814057B2 (en) Page recovery using volume snapshots and logs
US10642696B2 (en) Copying compressed pages without uncompressing the compressed pages
US7650341B1 (en) Data backup/recovery
US8874515B2 (en) Low level object version tracking using non-volatile memory write generations
US8666942B2 (en) Systems and methods for managing snapshots of replicated databases
CN1755673A (en) File system with file management function and file management method
CN1752939A (en) Method and system for synthetic backup and restore
US20060206544A1 (en) Automatic backup and restore system and method
CN1408083A (en) Scalable storage architecture
CN1653427A (en) Method and apparatus for creating a virtual data copy
CN1764901A (en) A device for restoring at least one of files, directories and application oriented files in a computer to a previous state
CN102314503A (en) Indexing method
US7254683B2 (en) Speculative data mirroring apparatus method and system
US20230297510A1 (en) Write-behind optimization of covering cache
US7519634B2 (en) System and method for preserving memory resources during data backup
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