如何将 CLOB 从 Oracle 复制到 SQL Server

发布于 2024-07-27 01:39:17 字数 51 浏览 7 评论 0原文

CLOB 是 XML 数据,> 8k(有时> 32k)。 有什么建议么?

The CLOB is XML data that is > 8k (sometimes > 32k). Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雾里花 2024-08-03 01:39:17

不幸的是,我无法在 SQL Server 中运行它,因此我编写了一个 C# 控制台应用程序来导入和解析 CLOB 数据,然后将结果写入 SQL Server。

Unfortunatly I was unable to run it within SQL Server, so I wrote a C# console application to import and parse the CLOB data, then to write out the results to SQL Server.

嘿哥们儿 2024-08-03 01:39:17

您可能必须使用 IMAGE 类型,因为 BINARY 类型在 SQLServer 2K 中限制为 (IIRC) 8000 字节。 SQLServer 2005 中对 varchar 和 varbinary 的限制有所增加,因此这取决于您的目标是什么。 对于 2005 年,如果您的数据是 ASCII,则可以使用 varchar,如果是 unicode 文本,则使用 nvarchar,否则使用 varbinary。

如果您正在寻找示例代码,则必须向我们提供更多信息,例如您使用的语言/平台以及如何访问这两个数据库。 另外,这是一次性传输,还是需要在生产中以编程方式执行的操作?

You may have to use the IMAGE type, as the BINARY type is limited to (IIRC) 8000 bytes in SQLServer 2K. The limits for varchar and varbinary increased in SQLServer 2005, so it depends on what your target is. For 2005, if your data is ASCII varchar will work, if it's unicode text use nvarchar, otherwise use varbinary.

If you're looking for sample code, you'll have to give us more information, like what language/platform you're using, and how you're accessing the two databases. Also, is this a one-time transfer, or something that you need to do programmatically in production?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文