CN104462119B - Data migration method and device - Google Patents
Data migration method and device Download PDFInfo
- Publication number
- CN104462119B CN104462119B CN201310429783.0A CN201310429783A CN104462119B CN 104462119 B CN104462119 B CN 104462119B CN 201310429783 A CN201310429783 A CN 201310429783A CN 104462119 B CN104462119 B CN 104462119B
- Authority
- CN
- China
- Prior art keywords
- data
- migrated
- database
- parameter information
- source database
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/214—Database migration support
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of data migration method and devices, belong to field of computer technology.The described method includes: repository is generated, parameter information and transition condition including table belonging to data to be migrated in the parameter information of source database, the parameter information of target database, source database in the repository;According to the parameter information and transition condition of table belonging to data to be migrated in the parameter information of the source database in repository, source database, data to be migrated are exported;According to the parameter information of table belonging to data to be migrated in source database, the parameter information of transition condition and target database, table is built in target database;It will be directed into the table built in target database from data to be migrated derived in source database.Technical solution of the present invention can be suitable for the migration of data between any two kinds of databases, and the Data Migration being not limited between two kinds of fixed data libraries, Data Migration mode is more flexible, very easy to use.
Description
Technical field
The present invention relates to field of computer technology, in particular to a kind of data migration method and device.
Background technique
Migration of the data between disparate databases is very common in Current software industry, such as examines in the system reform
Consider cost or performance, replacement background data base is generally required, as oracle database is replaced with mysql database, mysql
Database is replaced with postgre database, and postgre database is replaced with oracle database etc..
In the prior art, migration of the data between disparate databases usually first passes through the table structure of parsing source database
Definition is parsed into structured query language (the Structured Query Language of the table creation of target database support;
SQL), to execute in target database, and new table is generated in target database, the lattice pre-defined according to Migration tools
Formula exports data from source database, then derived data are imported target database, completes Data Migration.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems: in the prior art, number
According to the migration between disparate databases, it is only limitted to a kind of database and is migrated into another database, it can not be again toward the third
Database migration causes migration of the data between disparate databases inflexible, and use is very inconvenient.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of data migration method and devices.It is described
Technical solution is as follows:
On the one hand, a kind of data migration method is provided, which comprises
Repository is generated, includes the parameter information of source database, the parameter information of target database, institute in the repository
State the parameter information and transition condition of table belonging to data to be migrated in source database;
According to belonging to data to be migrated in the parameter information of the source database in the repository, the source database
Table parameter information and the transition condition, the data to be migrated are exported;
According to the parameter information of table belonging to data to be migrated in the source database, the transition condition and the target
The parameter information of database builds table in the target database;
The institute built in the target database will be directed into from the data to be migrated derived in the source database
It states in table.
On the other hand, a kind of data migration device is provided, described device includes:
Generation module includes parameter information, the target database of source database for generating repository, in the repository
Parameter information, in the source database table belonging to data to be migrated parameter information and transition condition;
Export module, for according in the parameter information of the source database in the repository, the source database
The parameter information of table belonging to data to be migrated and the transition condition export the data to be migrated;
Table module is built, parameter information, the migration for the table according to belonging to data to be migrated in the source database
The parameter information of condition and the target database builds table in the target database;
Import modul, for the derived data to be migrated the target data will to be directed into from the source database
In the table built in library.
Technical solution provided in an embodiment of the present invention has the benefit that
By generation repository, the parameter of parameter information, target database in the repository including source database is believed
Breath, in source database table belonging to data to be migrated parameter information and transition condition;According to the source database in repository
Parameter information, in source database table belonging to data to be migrated parameter information and transition condition, data to be migrated are led
Out;According to the parameter information of table belonging to data to be migrated in source database, the parameter information of transition condition and target database,
Table is built in target database;The table built in target database will be directed into from data to be migrated derived in source database
In.Using the technical solution of the embodiment of the present invention, the migration of data between any two kinds of databases can be suitable for, be not limited to two
Data Migration between kind fixed data library, Data Migration mode is more flexible, very easy to use.And it is real using the present invention
Apply the technical solution of example, can customized transition condition, according to demand flexibly generate configuration information, thus realize in two data
Data Migration is carried out between library, so as to save the cost of database migration, improves the efficiency of Data Migration.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is the flow chart for the data migration method that one embodiment of the invention provides.
Fig. 2 be another embodiment of the present invention provides data migration method flow chart.
Fig. 3 is the structural schematic diagram for the data migration device that one embodiment of the invention provides.
Fig. 4 be another embodiment of the present invention provides data migration device structural schematic diagram.
Fig. 5 is a kind of terminal device structural schematic diagram provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Fig. 1 is the flow chart for the data migration method that one embodiment of the invention provides.As shown in Figure 1, the present embodiment provides
Data migration method, can specifically include following steps:
100, repository is generated;
It include the parameter information of source database, the parameter information of target database, source data in the repository of the present embodiment
The parameter information and transition condition of table belonging to data to be migrated in library.Such as the parameter information of source database includes source data
The login link information of the IP address and port numbers in library, the type of source database and source database, such as the user of source database
Name and password, optionally, the parameter information of source database can also include the other parameters information etc. of source database.Number of targets
Parameter information according to library also may include the IP address of target database and the type of port numbers and target database and
The login link information of target database, such as the username and password of target database, optionally, the parameter of target database
Information can also include the other parameters information etc. of target database.The parameter information of table belonging to data to be migrated can wrap
The title of table is included, or optionally, can also include other attribute informations of some tables, as which database the table belongs to
(database) or the table belongs to the information etc. of which user (schema).Transition condition may include number to be migrated
It is arranged according to the position such as n-th in the table etc., and other of the data to be migrated can be with customized restrictive condition, such as
The initial time for the table to be migrated and end time etc..When carrying out data between different source databases and target database
When migration, it is only necessary to configure the repository, use is very flexible and convenient.
The type of the source database of the present embodiment and the type of target database can be oracle database, mysql
Database perhaps postgre database etc. or may be other kinds of database.Source database in the present embodiment
Type and target database
101, the ginseng of the table according to belonging to data to be migrated in the parameter information of the source database in repository, source database
Number information and transition condition, data to be migrated are exported;
102, the parameter information of the table according to belonging to data to be migrated in source database, transition condition and target database
Parameter information builds table in target database;
103, it will be directed into the table built in target database from data to be migrated derived in source database.
The executing subject of data migration method provided in this embodiment is data migration device, which can be with
The device integrated for daemon software program.
Data migration method provided in this embodiment includes the ginseng of source database by generating repository, in the repository
Number information, the parameter information of target database, in source database table belonging to data to be migrated parameter information and migration item
Part;According to the parameter information of table belonging to data to be migrated in the parameter information of the source database in repository, source database with
And transition condition, data to be migrated are exported;According to the parameter information of table belonging to data to be migrated in source database, migration item
The parameter information of part and target database, builds table in target database;It derived data to be migrated will be led from source database
Enter in the table built into target database.Using the technical solution of the present embodiment, can be suitable for any two kinds of databases it
Between data migration, the Data Migration being not limited between two kinds of fixed data libraries, Data Migration mode is more flexible, using very
It is convenient.And using the present embodiment technical solution, can flexible configuration to realize carry out data between two databases
Migration, so as to save the cost of database migration, improves the efficiency of Data Migration.
Optionally, on the basis of the technical solution of above-mentioned embodiment illustrated in fig. 1, wherein step 101 is " according in repository
The parameter information of source database, in source database table belonging to data to be migrated parameter information and transition condition, will be to
Migrating data export ", can specifically include following steps:
(1) source database is accessed according to the parameter information of the source database in repository;
Such as IP address and port numbers according to the source database in repository, and the login including username and password
The accessible source database of link information.
(2) parameter information of the table according to belonging to data to be migrated in source database and transition condition generate data export
SQL statement;
Such as the data that the parameter information and transition condition of the table according to belonging to data to be migrated in source database generate are led
SQL statement can export the data to be migrated for meeting transition condition out.And the SQL statement is the grammer suitable for source database
The sentence of rule.
(3) data are executed in the source database of access and export SQL statement, and realization exports data to be migrated.
Still optionally further, on the basis of the technical solution of above-described embodiment, wherein in step (3) " to the source of access
Database executes data and exports SQL statement, and realization exports data to be migrated " after, it can also include: to be recorded in repository
The prompting message of " data export to be migrated is completed ".
It is that technology of the invention is described with a data instance to be migrated it should be noted that in the embodiment of the present invention
Scheme, in practical application, data migration device, can be to each Data Migration process phase to be migrated in data migration process
Together.I.e. to each data to be migrated, after data export, it can all record that " data to be migrated have exported in repository
At " prompting message, therefore the technical solution of the present embodiment can show the progress of Data Migration, can be convenient for user
The progress for checking Data Migration, compensate in the prior art can not monitoring data migration progress defect, effectively improve
The flexibility of Data Migration is carried out between disparate databases.
Still optionally further, on the basis of the technical solution of above-described embodiment, wherein in step (3) " to the source of access
Database executes data and exports SQL statement, and realization exports data to be migrated " after, it can also include: according to derived wait move
The parameter information of data and target database is moved, the data insertion SQL statement for being suitable for target database syntax rule is generated.
Still optionally further, on the basis of the technical solution of above-described embodiment, wherein step 102 " according to source database
In the parameter information of table belonging to data to be migrated, transition condition and target database parameter information, in target database
Build table ", it can specifically include following steps:
(a) parameter information of the table according to belonging to data to be migrated in source database, transition condition and target database
Parameter information generates and builds table SQL statement suitable for target database syntax rule;
(b) according to the parameter information access target database of target database;
Such as IP address and port numbers according to the target database in repository, and stepping on including username and password
Record the accessible target database of link information.
(c) it is executed in the target database of access and builds table SQL statement, table is built in realization in target database.
Still optionally further, on the basis of the technical solution of above-described embodiment, wherein step 103 " will be from source database
In derived data to be migrated be directed into the table built in target database ", can specifically include: in table execute data insert
Enter SQL statement, data to be migrated are directed into table by realization.
Still optionally further, on the basis of the technical solution of above-described embodiment, data are executed in table be inserted into SQL language
Sentence, after data to be migrated are directed into table by realization, can also include: in repository record " data to be migrated import at
The prompting message of function, migration completion ".
Similarly, " number to be migrated can all be recorded in repository after data importing to each data to be migrated
According to importing successfully, migration is completed " prompting message, therefore the technical solution of the present embodiment can carry out the progress of Data Migration
Show, the progress of Data Migration can be checked convenient for user, compensate in the prior art can not monitoring data migration progress lack
It falls into, effectively improves the flexibility for carrying out Data Migration between disparate databases.
All optional technical solutions in above-described embodiment can use combinable mode any combination, form this hair
Bright alternative embodiment, this is no longer going to repeat them.
Data migration method provided in this embodiment can be suitable for the migration of data between any two kinds of databases, no
The Data Migration being limited between two kinds of fixed data libraries, Data Migration mode is more flexible, very easy to use.And using this
The technical solution of embodiment, can flexible configuration to realize carry out Data Migration between two databases, so as to save
The cost for saving database migration, improves the efficiency of Data Migration.Moreover, can be carried out to the state of each data to be migrated
Monitoring, compensate in the prior art can not monitoring data migration progress defect, effectively improve between disparate databases
Carry out the flexibility of Data Migration.
Fig. 2 be another embodiment of the present invention provides data migration method flow chart.The Data Migration side of the present embodiment
Method further introduces this on the basis of the technical solution of above-mentioned embodiment illustrated in fig. 1 and its alternative embodiment in further detail
The technical solution of invention.As shown in Fig. 2, the data migration method of the present embodiment, can specifically include following steps:
200, repository is generated;
It include the parameter information of source database, the parameter information of target database, source data in the repository of the present embodiment
The parameter information and transition condition of table belonging to data to be migrated in library.The step is identical as step 100, referring particularly to step
Record in 100, details are not described herein.
201, source database is accessed according to the parameter information of the source database in repository;
202, the parameter information of the table according to belonging to data to be migrated in source database and transition condition generate data export
SQL statement;
203, data are executed in the source database of access and export SQL statement, and realization exports data to be migrated;
204, the prompting message of " data export to be migrated is completed " is recorded in repository;
205, it according to the parameter information of derived data to be migrated and target database, generates and is suitable for target database language
The data of method rule are inserted into SQL statement;
Wherein step 204 and step 205 can be not limited in sequence.
206, the parameter information of the table according to belonging to data to be migrated in source database, transition condition and target database
Parameter information generates and builds table SQL statement suitable for target database syntax rule;
207, according to the parameter information access target database of target database;
208, it is executed in the target database of access and builds table SQL statement, table is built in realization in target database;
209, data are executed in table and are inserted into SQL statement, and data to be migrated are directed into table by realization;
210, the prompting message of " data to be migrated import successfully, and migration is completed " is recorded in repository.
The implementation of specific steps also can refer to the optional technical solution of above-mentioned embodiment illustrated in fig. 1 in detail, no longer superfluous herein
It states.
Data migration method provided in this embodiment can be suitable for the migration of data between any two kinds of databases, no
The Data Migration being limited between two kinds of fixed data libraries, Data Migration mode is more flexible, very easy to use.And using this
The technical solution of embodiment, can flexible configuration to realize carry out Data Migration between two databases, so as to save
The cost for saving database migration, improves the efficiency of Data Migration.Moreover, can be carried out to the state of each data to be migrated
Monitoring, compensate in the prior art can not monitoring data migration progress defect, effectively improve between disparate databases
Carry out the flexibility of Data Migration.
Fig. 3 is the structural schematic diagram for the data migration device that one embodiment of the invention provides.As shown in figure 3, the present embodiment
Data migration device, can specifically include: generation module 10, builds table module 12 and import modul 13 at export module 11.
Wherein parameter information, number of targets of the generation module 10 for generating repository, in the repository including source database
According to the parameter information and transition condition of table belonging to data to be migrated in the parameter information in library, source database;It can join in detail
It is admitted to the record for stating related method embodiment.Export module 11 is connect with generation module 10, and export module 11 is used for according to configuration
The parameter information and transition condition of table belonging to data to be migrated in the parameter information of source database in library, source database,
Data to be migrated are exported;It builds table module 12 to connect with generation module 10, builds table module 12 for generating according to generation module 10
Repository in source database in the parameter information of table belonging to data to be migrated, transition condition and target database parameter
Information builds table in target database;Import modul 13 respectively with export module 11 and build table module 12 and connect, import modul 13
It is directed into target database for the data to be migrated derived from the export module 11 in source database and builds table module 12 and built
Table in.
The data migration device of the present embodiment realizes that Data Migration and above-mentioned correlation technique are implemented by using above-mentioned module
The realization mechanism of example is identical, in detail can also be referring to the record of above-mentioned related method embodiment, and details are not described herein.
The data migration device of the present embodiment generates repository by using above-mentioned module, includes source number in the repository
According to the parameter information of table belonging to data to be migrated in the parameter information in library, the parameter information of target database, source database with
And transition condition;According to the ginseng of table belonging to data to be migrated in the parameter information of the source database in repository, source database
Number information and transition condition, data to be migrated are exported;Believed according to the parameter of table belonging to data to be migrated in source database
The parameter information of breath, transition condition and target database, builds table in target database;It will be derived wait move from source database
Data are moved to be directed into the table built in target database.Using the technical solution of the present embodiment, any two kinds can be suitable for
The migration of data between database, the Data Migration being not limited between two kinds of fixed data libraries, Data Migration mode is more flexible,
It is very easy to use.And using the present embodiment technical solution, can customized transition condition, according to demand flexibly generate match
Confidence breath carries out Data Migration between two databases to realize, so as to save the cost of database migration, improves
The efficiency of Data Migration.
Fig. 4 be another embodiment of the present invention provides data migration device structural schematic diagram.As shown in figure 4, this implementation
The data migration device of example specifically can also include following technology on the basis of the technical solution of above-mentioned embodiment illustrated in fig. 3
Scheme.
In the data migration device of the present embodiment, export module 11 is specifically used for the ginseng according to the source database in repository
Number message reference source database;Number is generated according to the parameter information of table belonging to data to be migrated in source database and transition condition
According to export SQL statement;Data are executed in the source database of access and export SQL statement, and realization exports data to be migrated.
It optionally, further include logging modle 14 in the data migration device of the present embodiment.The logging modle 14 and generation mould
Block 10 connects, and the source database that logging modle 14 is used to access at 11 Duis of export module executes data and exports SQL statement, and realizing will
After data export to be migrated, the prompt of record " data export to be migrated is completed " disappears in the repository that generation module 10 generates
Breath.
Optionally, in the data migration device of the present embodiment, what generation module 10 was also used to access at 11 Duis of export module
Source database executes data and exports SQL statement, realizes after exporting data to be migrated, according to derived data to be migrated and mesh
The parameter information of database is marked, the data insertion SQL statement for being suitable for target database syntax rule is generated.
Optionally, in the data migration device of the present embodiment, build table module 12 be specifically used for according in source database wait move
The parameter information of table belonging to data, the parameter information of transition condition and target database are moved, generates and is suitable for target database
Syntax rule builds table SQL statement;According to the parameter information access target database of target database;In the target data of access
It is executed in library and builds table SQL statement, table is built in realization in target database.
Optionally, in the data migration device of the present embodiment, import modul 13 is specifically used for executing data insertion in table
SQL statement, data to be migrated are directed by realization builds in the table that table module 12 is established.
Optionally, in the data migration device of the present embodiment, logging modle 14 is also used to hold in table in import modul 13
Row data are inserted into SQL statement, after data to be migrated are directed into table by realization, remember in the repository that generation module 10 generates
The prompting message of record " data to be migrated import successfully, and migration is completed ".
All optional technical solutions in above-described embodiment can use combinable mode any combination, form this hair
Bright alternative embodiment, this is no longer going to repeat them.
The data migration device of the present embodiment realizes that Data Migration and above-mentioned correlation technique are implemented by using above-mentioned module
The realization mechanism of example is identical, in detail can also be referring to the record of above-mentioned related method embodiment, and details are not described herein.
Data migration device provided in this embodiment, by using above-mentioned module can be suitable for any two kinds of databases it
Between data migration, the Data Migration being not limited between two kinds of fixed data libraries, Data Migration mode is more flexible, using very
It is convenient.And using the present embodiment technical solution, can flexible configuration to realize carry out data between two databases
Migration, so as to save the cost of database migration, improves the efficiency of Data Migration.Moreover, can be to be migrated to each
The states of data be monitored, compensate in the prior art can not monitoring data migration progress defect, effectively improve
The flexibility of Data Migration is carried out between disparate databases.Furthermore the technical solution of the present embodiment can to Data Migration into
Degree showed, compensate in the prior art can not monitoring data migration progress defect, effectively improve in different data
The flexibility of Data Migration is carried out between library.
Fig. 5 is a kind of terminal device structural schematic diagram provided in an embodiment of the present invention.Referring to Fig. 5, which can be with
For implementing the data migration method provided in above-described embodiment.Specifically:
Terminal device 800 may include communication unit 110, include one or more computer readable storage medium
Memory 120, input unit 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (wireless
Fidelity, Wireless Fidelity) module 170, include one or more than one the processor 180 and power supply of processing core
190 equal components.It will be understood by those skilled in the art that terminal device structure shown in Fig. 5 is not constituted to terminal device
It limits, may include perhaps combining certain components or different component layouts than illustrating more or fewer components.Wherein:
Communication unit 110 can be used for receiving and sending messages or communication process in, signal sends and receivees, the communication unit 110
Can be RF(Radio Frequency, radio frequency) circuit, router, modem, etc. network communication equipments.Particularly, when
When communication unit 110 is RF circuit, after the downlink information of base station is received, transfer at one or more than one processor 180
Reason;In addition, the data for being related to uplink are sent to base station.RF circuit usually as communication unit include but is not limited to antenna,
At least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupler,
LNA(Low Noise Amplifier, low-noise amplifier), duplexer etc..In addition, communication unit 110 can also be by wireless
Communication is communicated with network and other equipment.Any communication standard or agreement can be used in the wireless communication, including but not limited to
GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General
Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, code
Point multiple access), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), LTE (Long
Term Evolution, long term evolution), Email, SMS (Short Messaging Service, short message service) etc..
Memory 120 can be used for storing software program and module, and processor 180 is stored in the software journey of memory 120 by operation
Sequence and module, thereby executing various function application and data processing.Memory 120 can mainly include storing program area and deposit
Store up data field, wherein storing program area can application program needed for storage program area, at least one function (for example sound is broadcast
Playing function, image player function etc.) etc.;Storage data area, which can be stored, uses created data (ratio according to terminal device 800
Such as audio data, phone directory) etc..In addition, memory 120 may include high-speed random access memory, it can also include non-
Volatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Accordingly
Ground, memory 120 can also include Memory Controller, to provide processor 180 and input unit 130 to memory 120
Access.
Input unit 130 can be used for receiving the number or character information of input, and generate and user setting and function
Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 130 may include touching
Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad are collected and are used
Family on it or nearby touch operation (such as user using any suitable object or attachment such as finger, stylus in touch-sensitive table
Operation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional
, touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used
The touch orientation at family, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller is from touch
Touch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and can receive processor 180
The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves
Realize touch sensitive surface 131.In addition to touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically,
Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.),
One of trace ball, mouse, operating stick etc. are a variety of.
Display unit 140 can be used for showing information input by user or the information and terminal device that are supplied to user
800 various graphical user interface, these graphical user interface can by figure, text, icon, video and any combination thereof Lai
It constitutes.Display unit 140 may include display panel 141, optionally, can using LCD (Liquid Crystal Display,
Liquid crystal display), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display
Panel 141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 detect on it or near
Touch operation after, send processor 180 to determine the type of touch event, be followed by subsequent processing device 180 according to touch event
Type provides corresponding visual output on display panel 141.Although in Fig. 5, touch sensitive surface 131 is with display panel 141
Realize input and input function as two independent components, but in some embodiments it is possible to by touch sensitive surface 131 with
Display panel 141 is integrated and realizes and outputs and inputs function.
Terminal device 800 may also include at least one sensor 150, for example, optical sensor, motion sensor and other
Sensor.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can basis
The light and shade of ambient light adjusts the brightness of display panel 141, proximity sensor can when terminal device 800 is moved in one's ear,
Close display panel 141 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect all directions
The size of upper (generally three axis) acceleration, can detect that size and the direction of gravity, can be used to identify mobile phone posture when static
Application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (for example pedometer, strikes
Hit) etc.;Gyroscope, barometer, hygrometer, thermometer, infrared sensor for can also configure as terminal device 800 etc. other
Sensor, details are not described herein.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and terminal device 800.
Electric signal after the audio data received conversion can be transferred to loudspeaker 161, be converted by loudspeaker 161 by voicefrequency circuit 160
For voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, is connect by voicefrequency circuit 160
Audio data is converted to after receipts, then by after the processing of audio data output processor 180, is sent to through RF circuit 110 such as another
One terminal device, or audio data is exported to memory 120 to be further processed.Voicefrequency circuit 160 is also possible that
Earphone jack is believed with providing the logical figure of peripheral hardware earphone and terminal device 800.
In order to realize wireless communication, wireless communication unit 170, the wireless communication unit can be configured on the terminal device
170 can be WiFi module.WiFi belongs to short range wireless transmission technology, and unit 170 can by wireless communication for terminal device 800
To help user to send and receive e-mail, browse webpage and access streaming video etc., it provides wireless broadband for user and interconnects
Net access.Although Fig. 5 shows wireless communication unit 170, but it is understood that, and it is not belonging to terminal device 800
It must be configured into, can according to need within the scope of not changing the essence of the invention and omit completely.
Processor 180 is the control centre of terminal device 800, utilizes each of various interfaces and connection whole mobile phone
Part by running or execute the software program and/or module that are stored in memory 120, and calls and is stored in memory
Data in 120 execute the various functions and processing data of terminal device 800, to carry out integral monitoring to mobile phone.It is optional
, processor 180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modulatedemodulate
Adjust processor, wherein the main processing operation system of application processor, user interface and application program etc., modem processor
Main processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Terminal device 800 further includes the power supply 190(such as battery powered to all parts), it is preferred that power supply can lead to
Cross power-supply management system and processor 180 be logically contiguous, thus by power-supply management system realize management charging, electric discharge and
The functions such as power managed.Power supply 190 can also include one or more direct current or AC power source, recharging system, electricity
The random components such as source fault detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal device 800 can also include camera, bluetooth module etc., and details are not described herein.Specifically exist
In the present embodiment, the display unit of terminal device is touch-screen display, terminal device further include have memory and one or
The more than one program of person, one of them perhaps more than one program be stored in memory and be configured to by one or
It includes the instruction for performing the following operation that more than one processor, which executes the one or more programs: generating configuration
Library, include in the repository parameter information of source database, the parameter information of target database, in the source database wait move
Move the parameter information and transition condition of table belonging to data;
According to belonging to data to be migrated in the parameter information of the source database in the repository, the source database
Table parameter information and the transition condition, the data to be migrated are exported;
According to the parameter information of table belonging to data to be migrated in the source database, the transition condition and the target
The parameter information of database builds table in the target database;
The institute built in the target database will be directed into from the data to be migrated derived in the source database
It states in table.
Optionally, which is also used to store to give an order: according to the ginseng of the source database in the repository
Source database described in number message reference;
The parameter information and the transition condition of table belonging to the data to be migrated according to the source database generate
Data export SQL statement;
The data are executed in the source database of access and export SQL statement, are realized and are exported the data to be migrated.
Optionally, which is also used to store to give an order: record " lead by the data to be migrated in the repository
The prompting message of completion out ".
Optionally, which is also used to store to give an order: according to the derived data to be migrated and the target
The parameter information of database generates the data insertion SQL statement for being suitable for the target database syntax rule.
Optionally, which is also used to store to give an order: according to belonging to data to be migrated in the source database
The parameter information of the parameter information of table, the transition condition and the target database generates and is suitable for the target database
Syntax rule builds table SQL statement;
The target database is accessed according to the parameter information of the target database;
Table SQL statement is built described in executing in the target database of access, realization is built in the target database
The table.
Optionally, which is also used to store to give an order: the data insertion SQL statement is executed in the table,
The data to be migrated are directed into the table by realization.
Optionally, which is also used to store to give an order: record " lead by the data to be migrated in the repository
Enter success, migration is completed " prompting message.
It should be understood that data migration device provided by the above embodiment is in Data Migration, only with above-mentioned each function
The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds
Block is completed, i.e., the internal structure of device is divided into different functional modules, to complete all or part of function described above
Energy.In addition, data migration device provided by the above embodiment and data migration method embodiment belong to same design, it is specific real
Existing process is detailed in embodiment of the method, and which is not described herein again.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (2)
1. a kind of data migration method, which is characterized in that applied to the migration of data between any two kinds of databases, the method
Include:
Repository is generated, includes the parameter information of source database, the parameter information of target database, the source in the repository
The parameter information and transition condition of table belonging to data to be migrated in database, the parameter information of the source database includes institute
The IP address and port numbers of source database are stated, the parameter information of the target database includes the IP address of the target database
And port numbers, the parameter information of table belonging to the data to be migrated include the user that table belonging to the data to be migrated belongs to
Information and the database that belongs to, the transition condition include the position that the data to be migrated be in the table and migrate institute
Initial time and the end time of table are stated, the source database and the target database are different types of databases;
The source database is accessed according to the parameter information of the source database in the repository;
The parameter information and the transition condition of table belonging to the data to be migrated according to the source database generate data
Derived type structure query language statement, the data derived type structure query language statement can will meet the transition condition
Data export to be migrated;
The data derived type structure query language statement is executed in the source database of access, realization will be described to be migrated
Data export, and prompt is generated according to the prompting message completed about the data export to be migrated recorded in the repository
Information;
According to the parameter information of the derived data to be migrated and the target database, generates and be suitable for the target data
The data insert structure query language statement of library syntax rule;
According to the parameter information of table belonging to data to be migrated in the source database, the transition condition and the target data
The parameter information in library generates and builds table structure query language statement suitable for the target database syntax rule;
The target database is accessed according to the parameter information of the target database;
Table structure query language statement is built described in executing in the target database of access, is realized in the target data
The table is built in library;
The data insert structure query language statement is executed in the table, realizes and the data to be migrated are directed into institute
It states in table, and imports successful prompting message generation prompt letter about the data to be migrated according to what is recorded in the repository
Breath.
2. a kind of data migration device, which is characterized in that applied to the migration of data between any two kinds of databases, described device
Include:
Generation module includes the ginseng of the parameter information of source database, target database for generating repository, in the repository
Number information, in the source database table belonging to data to be migrated parameter information and transition condition, the source database
Parameter information includes the IP address and port numbers of the source database, and the parameter information of the target database includes the target
The parameter information of the IP address and port numbers of database, table belonging to the data to be migrated includes belonging to the data to be migrated
The table information of user belonged to and the database belonged to, the transition condition includes that the data to be migrated are in the table
Position and migrate initial time and the end time of the table, the source database and the target database are different types
Database;
Export module, for accessing the source database according to the parameter information of the source database in the repository;Root
Data export knot is generated according to the parameter information of table belonging to data to be migrated described in the source database and the transition condition
Structure query language statement, the data derived type structure query language statement can will meet the to be migrated of the transition condition
Data export;The data derived type structure query language statement is executed in the source database of access, realization will be described
Data export to be migrated, and it is raw according to the prompting message completed about the data export to be migrated recorded in the repository
At prompt information;
The generation module is also used to execute the data derived type structure in the source database of the export module to access
Change query language statement, realizes after exporting the data to be migrated, according to the derived data to be migrated and the mesh
The parameter information of database is marked, the data insert structure query language language for being suitable for the target database syntax rule is generated
Sentence;
Table module is built, parameter information, the transition condition for the table according to belonging to data to be migrated in the source database
With the parameter information of the target database, generates and build table structureization inquiry language suitable for the target database syntax rule
Speech sentence;The target database is accessed according to the parameter information of the target database;In the target database of access
Table structure query language statement is built described in middle execution, the table is built in realization in the target database;
Import modul is realized described for executing the data insert structure query language statement in the table wait move
It moves data to be directed into the table, and imports successfully prompt about the data to be migrated according to what is recorded in the repository
Message generates prompt information.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310429783.0A CN104462119B (en) | 2013-09-18 | 2013-09-18 | Data migration method and device |
PCT/CN2014/085897 WO2015039564A1 (en) | 2013-09-18 | 2014-09-04 | Method and apparatus for data migration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310429783.0A CN104462119B (en) | 2013-09-18 | 2013-09-18 | Data migration method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104462119A CN104462119A (en) | 2015-03-25 |
CN104462119B true CN104462119B (en) | 2019-11-05 |
Family
ID=52688224
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310429783.0A Active CN104462119B (en) | 2013-09-18 | 2013-09-18 | Data migration method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104462119B (en) |
WO (1) | WO2015039564A1 (en) |
Families Citing this family (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106294423A (en) * | 2015-05-25 | 2017-01-04 | 阿里巴巴集团控股有限公司 | Data base divides wiring method and the device of table |
CN104899333A (en) * | 2015-06-24 | 2015-09-09 | 浪潮(北京)电子信息产业有限公司 | Cross-platform migrating method and system for Oracle database |
CN106682021B (en) * | 2015-11-09 | 2021-09-28 | 五八同城信息技术有限公司 | Database migration method and device |
CN105824879B (en) * | 2015-12-17 | 2019-06-28 | 深圳市华讯方舟软件技术有限公司 | A kind of moving method based on PostgreSQL block storage equipment |
CN105701147B (en) * | 2015-12-30 | 2019-11-22 | 中国银联股份有限公司 | Configurable data shifts managing device |
US10114947B1 (en) * | 2016-06-29 | 2018-10-30 | Symantec Corporation | Systems and methods for logging processes within containers |
CN106446166A (en) * | 2016-09-23 | 2017-02-22 | 郑州云海信息技术有限公司 | Method and device for migrating data from DB2 database to K-DB database |
CN107016016B (en) * | 2016-10-10 | 2021-04-06 | 创新先进技术有限公司 | Data processing method and device |
CN107992498B (en) * | 2016-10-27 | 2021-10-22 | 腾讯科技(深圳)有限公司 | Method and system for importing data into data warehouse |
CN106686070B (en) * | 2016-12-13 | 2020-10-16 | 腾讯科技(深圳)有限公司 | Database data migration method, device, terminal and system |
CN107423334A (en) * | 2017-04-24 | 2017-12-01 | 云宏信息科技股份有限公司 | A kind of automatic data migration method and device for supporting multi-data source |
CN109067823A (en) * | 2018-06-11 | 2018-12-21 | 中国平安人寿保险股份有限公司 | A kind of data migration method, device, computer equipment and storage medium |
CN109189756A (en) * | 2018-06-29 | 2019-01-11 | 平安科技(深圳)有限公司 | Electronic device, the method for Data Migration and storage medium |
CN109802884B (en) * | 2018-12-29 | 2021-09-07 | 论客科技(广州)有限公司 | Campus mail migration method and device |
CN111797070A (en) * | 2019-04-08 | 2020-10-20 | 杭州晨熹多媒体科技有限公司 | Ticket data processing method and device |
CN112559118A (en) * | 2019-09-25 | 2021-03-26 | 北京国双科技有限公司 | Application data migration method and device, electronic equipment and storage medium |
CN110688367A (en) * | 2019-09-27 | 2020-01-14 | 浪潮软件集团有限公司 | Universal database migration adaptation method and system |
CN110704398B (en) * | 2019-09-30 | 2023-08-25 | 深圳前海环融联易信息科技服务有限公司 | Database migration method and device from MySQL to Oracle and computer equipment |
CN110895522B (en) * | 2019-12-02 | 2022-06-03 | 中国银行股份有限公司 | Data migration method and system |
CN111104393B (en) * | 2019-12-17 | 2024-02-20 | 深圳追一科技有限公司 | Data migration method, device, electronic equipment and storage medium |
CN111258990B (en) * | 2020-02-17 | 2023-04-07 | 同盾控股有限公司 | Index database data migration method, device, equipment and storage medium |
CN112035458B (en) * | 2020-09-01 | 2024-02-23 | 中国银行股份有限公司 | Data isolation method, device and equipment |
CN112416907A (en) * | 2020-12-03 | 2021-02-26 | 厦门市美亚柏科信息股份有限公司 | Database table data importing and exporting method, terminal equipment and storage medium |
CN112685384A (en) * | 2020-12-30 | 2021-04-20 | 平安普惠企业管理有限公司 | Data migration method and device, electronic equipment and storage medium |
CN113468143A (en) * | 2021-07-22 | 2021-10-01 | 咪咕数字传媒有限公司 | Data migration method, system, computing device and storage medium |
WO2023065861A1 (en) * | 2021-10-18 | 2023-04-27 | Huawei Cloud Computing Technologies Co., Ltd. | Application migration assessment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1763745A (en) * | 2005-09-06 | 2006-04-26 | 阎海强 | Structure oriented data migration method and system |
US7167965B2 (en) * | 2001-04-30 | 2007-01-23 | Hewlett-Packard Development Company, L.P. | Method and system for online data migration on storage systems with performance guarantees |
CN101364186A (en) * | 2008-09-27 | 2009-02-11 | 腾讯科技(深圳)有限公司 | Data migration method, system, data migration server and data interface server |
CN101789021A (en) * | 2010-02-24 | 2010-07-28 | 浪潮通信信息系统有限公司 | Universal configurable database data migration method |
US7797500B1 (en) * | 2007-03-21 | 2010-09-14 | Emc Corporation | Geometry adaptation using data redistribution |
CN102831211A (en) * | 2012-08-14 | 2012-12-19 | 中山大学 | Data sheet migration method based on sheet relation analysis |
CN103109271A (en) * | 2012-08-30 | 2013-05-15 | 华为技术有限公司 | Inter-platform application migration realization method and system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7664795B2 (en) * | 2003-09-26 | 2010-02-16 | Microsoft Corporation | Apparatus and method for database migration |
US7480643B2 (en) * | 2005-12-22 | 2009-01-20 | International Business Machines Corporation | System and method for migrating databases |
US20080306976A1 (en) * | 2007-06-05 | 2008-12-11 | International Business Machines Corporation | Process for dynamic table conversion |
US8949192B2 (en) * | 2007-11-19 | 2015-02-03 | International Business Machines Corporation | Technique of controlling access to database |
-
2013
- 2013-09-18 CN CN201310429783.0A patent/CN104462119B/en active Active
-
2014
- 2014-09-04 WO PCT/CN2014/085897 patent/WO2015039564A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7167965B2 (en) * | 2001-04-30 | 2007-01-23 | Hewlett-Packard Development Company, L.P. | Method and system for online data migration on storage systems with performance guarantees |
CN1763745A (en) * | 2005-09-06 | 2006-04-26 | 阎海强 | Structure oriented data migration method and system |
US7797500B1 (en) * | 2007-03-21 | 2010-09-14 | Emc Corporation | Geometry adaptation using data redistribution |
CN101364186A (en) * | 2008-09-27 | 2009-02-11 | 腾讯科技(深圳)有限公司 | Data migration method, system, data migration server and data interface server |
CN101789021A (en) * | 2010-02-24 | 2010-07-28 | 浪潮通信信息系统有限公司 | Universal configurable database data migration method |
CN102831211A (en) * | 2012-08-14 | 2012-12-19 | 中山大学 | Data sheet migration method based on sheet relation analysis |
CN103109271A (en) * | 2012-08-30 | 2013-05-15 | 华为技术有限公司 | Inter-platform application migration realization method and system |
Also Published As
Publication number | Publication date |
---|---|
WO2015039564A1 (en) | 2015-03-26 |
CN104462119A (en) | 2015-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104462119B (en) | Data migration method and device | |
CN103473011B (en) | A kind of mobile terminal performance detection method, device and mobile terminal | |
CN104243671B (en) | Volume adjusting method, device and electronic equipment | |
CN105278937B (en) | A kind of method and device showing pop-up box message | |
CN104252341B (en) | The client device of the skin change method of application program, device and application program | |
CN104104711B (en) | Reading histories treating method and apparatus | |
CN104834529A (en) | Method and device for optimizing performance of application | |
CN103530115B (en) | Application program display method and device and terminal equipment | |
CN104281600B (en) | The method and apparatus of Intelligent Selection word | |
CN106161176A (en) | Cluster conversation message treatment method and device | |
CN104852885A (en) | Method, device and system for verifying verification code | |
CN104077184B (en) | A kind of course control method and computer system of application program | |
CN104111927A (en) | Method, equipment and system for information classification | |
CN106385485A (en) | Call recording method, call recording device and mobile terminal | |
CN105808043B (en) | A kind of setting method and mobile terminal of terminal applies | |
CN108090345A (en) | Linux system external command performs method and device | |
CN104134043A (en) | Method and device for hiding contents, method and device for unhiding contents, and terminals | |
CN104063400A (en) | Data search method and data search device | |
CN103631592A (en) | Configuration method, calling method, device and equipment for displaying resources | |
CN110413639A (en) | Data check method and device, electronic equipment and computer readable storage medium | |
CN103399745A (en) | Method, device and terminal device for sending instant messages | |
CN105354067B (en) | A kind of interface configuration method and device | |
CN106484615B (en) | The method and apparatus of record log | |
CN108804251A (en) | A kind of data processing method and device of operation and maintenance | |
CN103729283A (en) | System log output method and device and terminal device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230712 Address after: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd. Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |
|
TR01 | Transfer of patent right |