如何将 Oracle BLOB 引入 SQL Server?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/691113/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I bring an Oracle BLOB into SQL Server?
提问by Ascalonian
I have two databases: Oracle 10G and SQL Server 2000.
我有两个数据库:Oracle 10G 和 SQL Server 2000。
Inside the Oracle database, I have several MS Word documents stored as BLOBs. What I need to do is extract the files from Oracle and place them into SQL Server. I am curious as to how I do this?
在 Oracle 数据库中,我有几个存储为 BLOB 的 MS Word 文档。我需要做的是从 Oracle 中提取文件并将它们放入 SQL Server。我很好奇我是如何做到这一点的?
I have heard something about DTS but not sure if that is something to look into.
我听说过一些关于 DTS 的事情,但不确定这是否值得研究。
回答by MichaelN
In sql server 2000, your choices for blob storages is either binary/varbinary or image. binary/varbinary can be used if the blob is <=8000bytes and image should be use when blob is larger than 8000 bytes.
在 sql server 2000 中,您对 blob 存储的选择是 binary/varbinary 或 image。如果 blob <=8000 字节,则可以使用 binary/varbinary,当 blob 大于 8000 字节时,应使用图像。
Personally I would use perl DBI to extract the files from oracle and insert them into sql server since I'm comfortable with perl.
我个人会使用 perl DBI 从 oracle 中提取文件并将它们插入到 sql server 中,因为我对 perl 很满意。
You can also use oracle's hsodbc to make a link between oracle and the sql server and attempt to insert data from one to the other.
您还可以使用oracle 的hsodbc 在oracle 和sql server 之间建立链接,并尝试将数据从一个插入到另一个。
If you are more comfortable in sql server then DTS is a option. I'm not sql server person so I would favor a different approach.
如果您更熟悉 sql server,那么 DTS 是一个选择。我不是 sql server 的人,所以我更喜欢不同的方法。