CN107193943A - A kind of method and apparatus of RDBMS online datas migration - Google Patents

A kind of method and apparatus of RDBMS online datas migration Download PDF

Info

Publication number
CN107193943A
CN107193943A CN201710361267.7A CN201710361267A CN107193943A CN 107193943 A CN107193943 A CN 107193943A CN 201710361267 A CN201710361267 A CN 201710361267A CN 107193943 A CN107193943 A CN 107193943A
Authority
CN
China
Prior art keywords
table space
database user
user table
rdbms
read
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.)
Pending
Application number
CN201710361267.7A
Other languages
Chinese (zh)
Inventor
文瑞超
冯晓庆
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
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
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710361267.7A priority Critical patent/CN107193943A/en
Publication of CN107193943A publication Critical patent/CN107193943A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

This application discloses a kind of method and apparatus of RDBMS online datas migration, it is read-only status that this method, which is included the Status Change of source database user's table space, exports metadata therein;The data file and the metadata of the source database user table space are transferred on transfer server, the state of the source database user table space is set to read-write state after the end of transmission;The metadata is imported to target database user table space;The state of the target database user table space is set to read-write state.The method and apparatus of above-mentioned RDBMS online datas migration, can be in relational database management system performs data migration process, continue externally to provide service inquiry service, and in the time window of agreement, the migration of the mass data of TB ranks can be realized by the physical operations of operating system.

Description

A kind of method and apparatus of RDBMS online datas migration
Technical field
The invention belongs to database technical field, more particularly to a kind of method and apparatus of RDBMS online datas migration.
Background technology
In existing relational database management system (RDBMS) data migration process, database necessarily be in Close shapes State, and cause operation system to be conducted interviews to database, that is, database can not externally provide service, and it is very not square Just, and existing Data Transference Technology belong to the operation of data base logic aspect more, including database level is other imports and exports, or User class is imported and exported, application programming interfaces exp/imp and expdp/impdp that such as oracle database is provided; The interface BCP that Sybase and SQLServer databases are provided, and the interface move/load etc. that DB2 database is provided, or Using third-party Data Migration Tools, such as sqldeveloper, Toad, this is only applicable to the business of small data quantity, and right In mass data migration demand often beyond customer requirement time window.
The content of the invention
To solve the above problems, the invention provides a kind of method and apparatus of RDBMS online datas migration, can close It is that data base management system is performed in data migration process, continues externally to provide service inquiry service, and in the time window of agreement It is intraoral, the migration of the mass data of TB ranks can be realized by the physical operations of operating system.
A kind of method for RDBMS online datas migration that the present invention is provided, including:
It is read-only status the Status Change of source database user's table space, exports metadata therein;
The data file and the metadata of the source database user table space are transferred on transfer server, transmitted The state of the source database user table space is set to read-write state after end;
The metadata is imported to target database user table space;
The state of the target database user table space is set to read-write state.
It is preferred that, in the method that above-mentioned RDBMS online datas are migrated,
It is set in the state by the source database user table space after read-write state, in addition to:
Change the form of the data file of the source database user table space.
It is preferred that, in the method that above-mentioned RDBMS online datas are migrated,
It is set in the state by the target database user table space after read-write state, in addition to:
The database object imported outside the source database user table space.
It is preferred that, in the method that above-mentioned RDBMS online datas are migrated,
The data file and the metadata of the source database user table space are transferred on transfer server and are:
The data file and the metadata of the source database user table space are transferred on nas server.
A kind of device for RDBMS online datas migration that the present invention is provided, including:
Lead-out unit, for being read-only status the Status Change of source database user's table space, exports first number therein According to;
Transmission unit, for the data file and the metadata of the source database user table space to be transferred into transfer On server, the state of the source database user table space is set to read-write state after the end of transmission;
Import unit, for importing the metadata to target database user table space;
Setting unit, for the state of the target database user table space to be set into read-write state.
It is preferred that, in the device that above-mentioned RDBMS online datas are migrated, in addition to:
Converting unit, the form of the data file for changing the source database user table space.
It is preferred that, in the device that above-mentioned RDBMS online datas are migrated, in addition to:
The database object imported outside the source database user table space.
It is preferred that, in the device that above-mentioned RDBMS online datas are migrated, the transfer server is nas server.
Pass through foregoing description, the method and apparatus for the above-mentioned RDBMS online datas migration that the present invention is provided, due to this It is read-only status that method, which is included the Status Change of source database user's table space, exports metadata therein;By the source number It is transferred to according to the data file and the metadata of storehouse user's table space on transfer server, by the source data after the end of transmission The state of storehouse user's table space is set to read-write state;The metadata is imported to target database user table space;Will be described The state of target database user's table space is set to read-write state, therefore, it is possible to perform data in relational database management system In transition process, continue externally to provide service inquiry service, can be by the thing of operating system and in the time window of agreement The migration of the mass data of TB ranks is realized in reason operation.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
The schematic diagram of the method for the first RDBMS online data migration that Fig. 1 provides for the embodiment of the present application;
The schematic diagram of the device for the first RDBMS online data migration that Fig. 2 provides for the embodiment of the present application.
Embodiment
The core concept of the present invention is to provide a kind of method and apparatus of RDBMS online datas migration, can be in relation Data base management system is performed in data migration process, continues externally to provide service inquiry service, and in the time window of agreement It is interior, the migration of the mass data of TB ranks can be realized by the physical operations of operating system.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
The method for the first RDBMS online data migration that the embodiment of the present application is provided is as shown in figure 1, Fig. 1 is the application The schematic diagram of the method for the first RDBMS online data migration that embodiment is provided, this method comprises the following steps:
S1:It is read-only status the Status Change of source database user's table space, exports metadata therein;
In this case, in follow-up execution data migration process, relational database management system just can continue to Service is externally provided, and prevents change of the operation system to database in data migration process to operate, it is ensured that the one of data Cause property.It should be noted that in relational database management system, table space is that the logic of relational database management system is drawn Point, and a table space can only belong to a database, all database objects are all stored in the table space specified, but main What is deposited is table, so referred to as table space.As long as database is in OPEN states, other tables in addition to SYSTEM table spaces Space, can be set to Online or Offline states, and table space is divided into read-write Read- in online states Write and two kinds of read-only Read-Only, table space database in read-only status can be accessed, but can not be updated, institute With, the characteristic that be able to can be accessed by table space under read-only status, the consistent of data before and after Data Migration both ensure that Property, it can realize that database externally provides the demand of service again.Here the data that metadata refers to description user's table space include Table space total size, data file location and size information etc., the instrument of export metadata can use but be not limited to Oracle Data base tool exp/imp and expdp/impdp.
S2:The data file and the metadata of the source database user table space are transferred on transfer server, The state of the source database user table space is set to read-write state after the end of transmission;
It should be noted that on the transfer server that needs for a period of time act on transmitting data file to transfer, so as to The input of data is used as in different platform change data syllable sequence.Enter line number from physical layer using this transfer server According to migration, migration velocity is substantially increased, it becomes possible in specific the window of migration time, complete the industry of the Data Migration of client Business is required.
S3:The metadata is imported to target database user table space;
It should be noted that during the importing metadata, database can auto-associating table space and physical file Etc. information.
S4:The state of the target database user table space is set to read-write state.
It should be noted that the step namely reduces the state of target database user's table space, target database User's table space state is Read-Write states by Read-Only Status Changes, and such database can externally provide service.
The method migrated by foregoing description, the first RDBMS online data that the embodiment of the present application is provided, due to Including being read-only status the Status Change of source database user's table space, metadata therein is exported;By the source database The data file of user's table space and the metadata are transferred on transfer server, are used the source database after the end of transmission The state of family table space is set to read-write state;The metadata is imported to target database user table space;By the target The state of database user table space is set to read-write state, therefore, it is possible to perform Data Migration in relational database management system During, continue externally to provide service inquiry service, and in the time window of agreement, can grasp by the physics of operating system Realize the migration of the mass data of TB ranks.
The method for second of RDBMS online data migration that the embodiment of the present application is provided, is existed in the first above-mentioned RDBMS On the basis of the method for line Data Migration, in addition to following technical characteristic:
It is set in the state by the source database user table space after read-write state, in addition to:
Change the form of the data file of the source database user table space.
It should be noted that in the case of cross-platform transmission data, it is necessary to converting source data storehouse document format data, Because the syllable sequence of the storage of different platform file is different, so it is accomplished by being converted to the file suitable for the platform as requested Form, such as AIX, hp-ux platform syllable sequence are big end, and linux platforms syllable sequence is small end.If certain not cross-platform transmission If without the step.
The method for the third RDBMS online data migration that the embodiment of the present application is provided, is existed in the first above-mentioned RDBMS On the basis of the method for line Data Migration, in addition to following technical characteristic:
It is set in the state by the target database user table space after read-write state, in addition to:
The database object imported outside the source database user table space.
That is, after the completion of Data Migration, the object related to project such as storing process is brought into.
The method for the 4th kind of RDBMS online data migration that the embodiment of the present application is provided, be it is above-mentioned the first to the 3rd In the method for kind of RDBMS online data migration it is any on the basis of, in addition to following technical characteristic:
The data file and the metadata of the source database user table space are transferred on transfer server and are:
The data file and the metadata of the source database user table space are transferred on nas server.
It should be noted that the advantage using this nas server is that environment is easily built, cost is relatively low, middle number of levels It is moderate according to speed under the scene of amount.Furthermore it is also possible to directly transmit or store the mode of switching using FTP, it is not intended to limit herein. When can also work as data volume less than TB ranks by the way of FTP is as data transfer, the ring of existing network so can be directly used Border, and data volume be more than 10TB ranks when can be by the way of above-mentioned storage directly switches.
The device for the first RDBMS online data migration that the embodiment of the present application is provided is as shown in Fig. 2 Fig. 2 is the application The schematic diagram of the device for the first RDBMS online data migration that embodiment is provided, the device includes:
Lead-out unit 201, for being read-only status the Status Change of source database user's table space, exports member therein Data, in this case, in follow-up execution data migration process, relational database management system just can continue to externally Service is provided, and prevents change of the operation system to database in data migration process to operate, it is ensured that the uniformity of data. It should be noted that in relational database management system, table space is the logical partitioning of relational database management system, and one Individual table space can only belong to a database, and all database objects are all stored in the table space specified, but main storage Be table, so referred to as table space.As long as database is in OPEN states, other table spaces in addition to SYSTEM table spaces, Online or Offline states can be set to, and table space is divided into read-write Read-Write in online states With read-only two kinds of Read-Only, table space database in read-only status can be accessed, but can not be updated, so, can be with The characteristic that can be accessed by table space under read-only status, both ensure that the uniformity of the data before and after Data Migration, again might be used To realize that database externally provides the demand of service.Here the data that metadata refers to description user's table space are total including table space Size, data file location and size information etc., the instrument of export metadata can use but be not limited to oracle database work Has exp/imp and expdp/impdp;
Transmission unit 202, for the data file and the metadata of the source database user table space to be transferred to On transfer server, the state of the source database user table space is set to read-write state, it is necessary to illustrate after the end of transmission Be, it is necessary on a period of time transfer server that transmitting data file to transfer act on, so as in different platform conversion number According to input during syllable sequence as data, Data Migration is carried out from physical layer using this transfer server, is greatly improved Migration velocity, it becomes possible in specific the window of migration time, completes the business need of the Data Migration of client;
Import unit 203, for importing the metadata to target database user table space, it is necessary to illustrate, When importing metadata, database can the information such as auto-associating table space and physical file;
Setting unit 204, for the state of the target database user table space to be set into read-write state, it is necessary to say It is bright, that is, the state of target database user's table space is reduced, target database user's table space state by Read- Only Status Changes are Read-Write states, and such database can externally provide service.
The device for second of RDBMS online data migration that the embodiment of the present application is provided, is existed in the first above-mentioned RDBMS On the basis of the device of line Data Migration, in addition to following technical characteristic:
Converting unit, the form of the data file for changing the source database user table space.
It should be noted that in the case of cross-platform transmission data, it is necessary to converting source data storehouse document format data, Because the syllable sequence of the storage of different platform file is different, so it is accomplished by being converted to the file suitable for the platform as requested Form, such as AIX, hp-ux platform syllable sequence are big end, and linux platforms syllable sequence is small end.
The device for the third RDBMS online data migration that the embodiment of the present application is provided, is existed in the first above-mentioned RDBMS On the basis of the device of line Data Migration, in addition to following technical characteristic:
The database object imported outside the source database user table space.
That is, after the completion of Data Migration, the object related to project such as storing process is brought into.
The device for the 4th kind of RDBMS online data migration that the embodiment of the present application is provided, be it is above-mentioned the first to the 3rd In the device of kind of RDBMS online data migration it is any on the basis of, in addition to following technical characteristic:
The transfer server is nas server.
It should be noted that the advantage using this nas server is that environment is easily built, cost is relatively low, middle number of levels It is moderate according to speed under the scene of amount.Furthermore it is also possible to directly transmit or store the mode of switching using FTP, it is not intended to limit herein. When can also work as data volume less than TB ranks by the way of FTP is as data transfer, the ring of existing network so can be directly used Border, and data volume be more than 10TB ranks when can be by the way of above-mentioned storage directly switches.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (8)

1. a kind of method of RDBMS online datas migration, it is characterised in that including:
It is read-only status the Status Change of source database user's table space, exports metadata therein;
The data file and the metadata of the source database user table space are transferred on transfer server, the end of transmission The state of the source database user table space is set to read-write state afterwards;
The metadata is imported to target database user table space;
The state of the target database user table space is set to read-write state.
2. the method for RDBMS online datas migration according to claim 1, it is characterised in that
It is set in the state by the source database user table space after read-write state, in addition to:
Change the form of the data file of the source database user table space.
3. the method for RDBMS online datas migration according to claim 1, it is characterised in that
It is set in the state by the target database user table space after read-write state, in addition to:
The database object imported outside the source database user table space.
4. the method for the RDBMS online datas migration according to claim any one of 1-3, it is characterised in that by the source The data file of database user table space and the metadata, which are transferred on transfer server, is:
The data file and the metadata of the source database user table space are transferred on nas server.
5. a kind of device of RDBMS online datas migration, it is characterised in that including:
Lead-out unit, for being read-only status the Status Change of source database user's table space, exports metadata therein;
Transmission unit, for the data file and the metadata of the source database user table space to be transferred into transfer service On device, the state of the source database user table space is set to read-write state after the end of transmission;
Import unit, for importing the metadata to target database user table space;
Setting unit, for the state of the target database user table space to be set into read-write state.
6. the device of RDBMS online datas migration according to claim 5, it is characterised in that
Also include:
Converting unit, the form of the data file for changing the source database user table space.
7. the device of RDBMS online datas migration according to claim 5, it is characterised in that
Also include:
The database object imported outside the source database user table space.
8. the device of the RDBMS online datas migration according to claim any one of 5-7, it is characterised in that
The transfer server is nas server.
CN201710361267.7A 2017-05-19 2017-05-19 A kind of method and apparatus of RDBMS online datas migration Pending CN107193943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710361267.7A CN107193943A (en) 2017-05-19 2017-05-19 A kind of method and apparatus of RDBMS online datas migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710361267.7A CN107193943A (en) 2017-05-19 2017-05-19 A kind of method and apparatus of RDBMS online datas migration

Publications (1)

Publication Number Publication Date
CN107193943A true CN107193943A (en) 2017-09-22

Family

ID=59874682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710361267.7A Pending CN107193943A (en) 2017-05-19 2017-05-19 A kind of method and apparatus of RDBMS online datas migration

Country Status (1)

Country Link
CN (1) CN107193943A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189761A (en) * 2018-08-31 2019-01-11 中国农业银行股份有限公司 A kind of data migration method and device
CN109299072A (en) * 2018-10-16 2019-02-01 郑州云海信息技术有限公司 A kind of method and device that database migrates online
CN109656908A (en) * 2018-11-30 2019-04-19 广州品唯软件有限公司 A kind of online moving method of database, electronic equipment and storage medium
CN113568886A (en) * 2021-07-21 2021-10-29 上海淇玥信息技术有限公司 Data migration method and device and electronic equipment
CN114024956A (en) * 2020-07-17 2022-02-08 北京达佳互联信息技术有限公司 Data migration method, device, server and storage medium
CN114443654A (en) * 2022-01-14 2022-05-06 苏州浪潮智能科技有限公司 Method and system for modifying length of spatial data block of database table on line

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070146788A1 (en) * 2005-12-27 2007-06-28 Fujitsu Limited Data mirroring method
CN101650744A (en) * 2009-09-16 2010-02-17 中兴通讯股份有限公司 System and method for processing great data amount based on transport tablespace
CN104573056A (en) * 2015-01-22 2015-04-29 浪潮电子信息产业股份有限公司 Database large data volume online migration method based on oracle
CN104899333A (en) * 2015-06-24 2015-09-09 浪潮(北京)电子信息产业有限公司 Cross-platform migrating method and system for Oracle database
CN105138603A (en) * 2015-08-07 2015-12-09 浪潮电子信息产业股份有限公司 Oracle database migration tool for carrying out migration from HP-UX platform to K-UX platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070146788A1 (en) * 2005-12-27 2007-06-28 Fujitsu Limited Data mirroring method
CN101650744A (en) * 2009-09-16 2010-02-17 中兴通讯股份有限公司 System and method for processing great data amount based on transport tablespace
CN104573056A (en) * 2015-01-22 2015-04-29 浪潮电子信息产业股份有限公司 Database large data volume online migration method based on oracle
CN104899333A (en) * 2015-06-24 2015-09-09 浪潮(北京)电子信息产业有限公司 Cross-platform migrating method and system for Oracle database
CN105138603A (en) * 2015-08-07 2015-12-09 浪潮电子信息产业股份有限公司 Oracle database migration tool for carrying out migration from HP-UX platform to K-UX platform

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189761A (en) * 2018-08-31 2019-01-11 中国农业银行股份有限公司 A kind of data migration method and device
CN109299072A (en) * 2018-10-16 2019-02-01 郑州云海信息技术有限公司 A kind of method and device that database migrates online
CN109299072B (en) * 2018-10-16 2022-06-10 郑州云海信息技术有限公司 Method and device for online migration of database
CN109656908A (en) * 2018-11-30 2019-04-19 广州品唯软件有限公司 A kind of online moving method of database, electronic equipment and storage medium
CN114024956A (en) * 2020-07-17 2022-02-08 北京达佳互联信息技术有限公司 Data migration method, device, server and storage medium
CN114024956B (en) * 2020-07-17 2024-03-12 北京达佳互联信息技术有限公司 Data migration method, device, server and storage medium
CN113568886A (en) * 2021-07-21 2021-10-29 上海淇玥信息技术有限公司 Data migration method and device and electronic equipment
CN114443654A (en) * 2022-01-14 2022-05-06 苏州浪潮智能科技有限公司 Method and system for modifying length of spatial data block of database table on line
CN114443654B (en) * 2022-01-14 2024-01-26 苏州浪潮智能科技有限公司 Method and system for on-line modifying length of database table space data block

Similar Documents

Publication Publication Date Title
CN107193943A (en) A kind of method and apparatus of RDBMS online datas migration
US20230334030A1 (en) System and method for slowly changing dimension and metadata versioning in a multidimensional database environment
CN103299267B (en) The method and system connecting for carrying out the interleaved of many tenant's storages
CN104160381B (en) Managing method and system for tenant-specific data sets in a multi-tenant environment
US20190012329A1 (en) Shared filesystem for distributed data storage system
CN107239479A (en) A kind of method and device of data storage and inquiry based on block chain
CN108519862A (en) Storage method, device, system and the storage medium of block catenary system
CN103455540B (en) The system and method for generating memory model from data warehouse model
CN109726174A (en) Data archiving method, system, equipment and storage medium
US11768854B2 (en) Data permissioning through data replication
CA2901738C (en) Versatile data model
CN106980672A (en) The data-storage system and method for a kind of isomerous environment Based on Object-Oriented Technology
CN103246749A (en) Matrix data base system for distributed computing and query method thereof
CN104573022A (en) Data query method and device for HBase
US11372834B2 (en) Optimizing space management of tablespaces in database systems
CN104054071A (en) Method for accessing storage device and storage device
CN109408689A (en) Data capture method, device, system and electronic equipment
CN107408132A (en) The effective performance of insertion and point inquiry operation in row store
CN103853612A (en) Method for reading data based on digital family content under distributed storage
CN105550349A (en) Persistent layer device and database operation method
CN104573107A (en) Network security application NoSQL database and relational database fusion interface method
CN108763276A (en) A kind of method and system based on relevant database unloading big data platform
CN105354310B (en) Map tile storage layout optimization method based on MapReduce
US8166066B2 (en) System and method for brokering information between a plurality of commercially distinct clients
CN105335436A (en) Method and equipment for upgrading database structure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170922