如何使用生产数据库中的更改定期更新我的本地数据库 [英] How to periodically update my local DB with changes from the Production DB
问题描述
我想知道是否有类似的工具可以说Oracle的subversion.
I want to know if there is a similar type of tool to say subversion for Oracle.
我遇到了一些需要调试潜在编码或数据问题的情况.问题是数据非常大,每 24 小时左右更新一次是不可能的.但我在想是否有办法运行一个脚本来查看本地和生产数据库,确定它们之间的区别(生产数据库是想要的更改).并使用这些新记录/更改更新本地数据库.
I am in a bit of a situation where I need to debug potential coding or data issues. The problem is that the Data is quite big and to do a update every 24h or so will just be impossible. But Im thinking if there is a way to run a script that could look at the local and production DB, determine the difference between them ( production DB being the wanted changes ). and update the local DB with those new records/changes.
有什么东西可以做这种事情吗?
Is there something out there that might do this type of thing?
这将用于 oracle 11gR2 数据库
This will be for oracle 11gR2 databases
推荐答案
检查DBLINK
在两台oracle服务器之间是否工作数据库链接教程 ID http://www.orafaq.com/wiki/Database_link
check whether the DBLINK
works between the two oracle server
the db link tutorial id http://www.orafaq.com/wiki/Database_link
如果 DBLINK
工作,创建一个像
If the DBLINK
works create a procedure like
PROCEDURE p1
IS
BEGIN
--MERGE SCRIPTS to your table
END;
每天在 DBMS_JOBS
中调用相同的代码,如下所示
call the same in DBMS_JOBS
for each day like below
exec dbms_job.submit(:v_JobNo, 'proc1;', TRUNC(SYSDATE)+1, 'TRUNC(SYSDATE)+1');
有关工作的更多信息,请参阅此处http:///docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_job.htm#BABHCBFD
for more information about jobs refer here http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_job.htm#BABHCBFD
如果 DBLINK
不起作用,您必须使用其他一些中间件工具
if the DBLINK
doesnot works you have to go some other middleware tools
希望对你有帮助
这篇关于如何使用生产数据库中的更改定期更新我的本地数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!