oracle中的数据传输 [英] data transfer in oracle

查看:121
本文介绍了oracle中的数据传输的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是mahalakshmi。我的问题是如何从一台服务器获取blob数据类型到另一台服务器。我的第一台服务器有照片表,其中包含student_no,Photo。现在我想将所有数据更改为第二台服务器。请允许任何人帮助我,我使用SQL开发人员。

提前谢谢

解决方案

使用Oracle导出将整个表导出到文件,将文件复制到serverB并导入。



http:// www.orafaq.com/wiki/Import_Export_FAQ [ ^ ]

您可以使用rsync将oracle .dbf文件同步到另一台服务器。这有问题,并且同步所有文件的工作更加可靠。



对于记录组,编写一个查询来构建一个以管道分隔的(或任何适合您数据的分隔符)文件你要移动的行。将该文件复制到serverB。为sqlldr编写一个控制文件,并使用sqlldr将行加载到表中。 sqlldr是oracle安装的一部分。



http ://www.thegeekstuff.com/2012/06/oracle-sqlldr/ [ ^ ]

如果你在每个服务器上都有数据库监听器并且tnsnames知道这两个,你可以直接:



 插入 进入 mytable @ remote 
选择 * 来自 mytable
其中 somecolumn = somevalue;



查看远程表部分:



http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9014.htm [ ^ ]

如果这是一个持续的事情,请创建一个从实例@ serverA到实例的数据库链接@serverB。然后,您可以对一个实例或另一个实例或两者的数据执行任何权限。



http://psoug.org/definition/CREATE_DATABASE_LINK.htm [ ^ ]


hi, this is mahalakshmi. My question about how to fetch the blob data type from one server to another server. my first server have the photo table which contains student_no,Photo. now i want to change all the data to the second server. can any one help me please, i m using SQL developer.
Thanks in advance

解决方案

Use Oracle export to export a whole table to a file, copy the file to serverB and import.

http://www.orafaq.com/wiki/Import_Export_FAQ[^]
You can use rsync to sync an oracle .dbf file or files to another server. This has problems and syncing all files works more reliably.

For groups of records, write a query to build a pipe-delimited (or whatever delimiter suits your data) file with rows you need to move. Copy that file to serverB. Write a control file for sqlldr and use sqlldr to load the rows into the table. sqlldr is part of the oracle installation.

http://www.thegeekstuff.com/2012/06/oracle-sqlldr/[^]
If you have db listeners up on each server and tnsnames knows about both, you can directly:

insert into mytable@remote 
select * from mytable
  where somecolumn=somevalue;


Look at the remote table section:

http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9014.htm[^]
If this is going to be an ongoing thing, create a db link from instance@serverA to instance@serverB. You can then do anything you have permissions for with data on one instance or the other or both.

http://psoug.org/definition/CREATE_DATABASE_LINK.htm[^]


这篇关于oracle中的数据传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆