简体   繁体   English

将特定数据从 Oracle 数据库(超过 100 个表)提取到另一个具有结构但没有数据的 Oracle 数据库的工具

[英]Tool to extract specific data from a Oracle database (with over 100 tables) to another Oracle Database which has the structure but not the data

I have the following challenge: I have a large Oracle Database # 1 with 100 tables which are linked through one to many and many to many relationship.我面临以下挑战:我有一个大型Oracle 数据库 # 1,其中包含 100 个表,这些表通过一对多和多对多关系链接。

I need to copy only certain rows from the main Oracle Database # 1 into a Oracle Database #2 which has the same data structure ( tables) but no data.我只需要将主Oracle 数据库 #1中的某些行复制到具有相同数据结构(表)但没有数据的Oracle 数据库 #2中。 Is there a tool that helps me automate the load process, taking into account the constraints that arise from one-many and many-many relationships.有没有一种工具可以帮助我自动化加载过程,同时考虑到由一对多和多对多关系产生的约束。

It is a relatively simple task to "copy" all the data. “复制”所有数据是一项相对简单的任务。 How?如何? Using Export/Import Data Pump (or even the original exp/imp utilities).使用导出/导入数据泵(甚至是原始的 exp/imp 实用程序)。

Although you can apply the WHERE clause to export, I'm not sure that doing that for 100 tables is feasible.虽然您可以应用WHERE子句进行导出,但我不确定对 100 个表执行此操作是否可行。 You should know how tables are related to each other so that you wouldn't miss a record.您应该知道表之间是如何相互关联的,这样您就不会错过任何记录。

So, if you're about to do it table-by-table, perhaps it is a better option to write (PL/)SQL code which will do the job.因此,如果您要逐个表地执行此操作,那么编写 (PL/)SQL 代码来完成这项工作也许是更好的选择。 A procedure, maybe?一个程序,也许? Using an IN parameter, you'd be able to copy any set-of-records you want.使用IN参数,您将能够复制您想要的任何记录集。 Of course, you'd have to maintain the procedure if new tables are created or relationships are modifed.当然,如果创建新表或修改关系,则必须维护该过程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从oracle数据库中提取数据 - Extract data from oracle database 从 Oracle 数据库中提取数据,使用 Pandas 没有 oracle 即时客户端 - Extract data from Oracle Database with Pandas without oracle instant client 在Oracle中将数据从一个数据库复制到另一个数 - Copy data from one database to another in Oracle 将数据从Oracle数据库复制(导入)到另一个数据库 - Copy (Import) Data from Oracle Database To Another Oracle数据库有虚拟数据吗? - Oracle database has virtual data? 如何使用Oracle Goldengate从多个数据库中提取数据并复制到具有不同表结构的一个数据库中? - How to extract data from multiple databases and replicate to one database having different table structure using Oracle Goldengate? 使用python从oracle数据库中的多个表中获取数据并将这些数据插入到另一个表中 - Fetch data from multiple tables from oracle database using python and insert those data into another table 使用 SQL from Oracle Database 从 XML Clob 中提取数据 - Extract data from XML Clob using SQL from Oracle Database 如何将某些表中的数据从一个Oracle数据库迁移到另一个数据库? - How to migrate data from some tables from one Oracle database to another? 如何从Oracle数据库中的XML字段中以表格格式提取数据? - How to extract data in tabular format from XML field in Oracle database?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM