ODBC 访问外部表是否可能导致数据或锁损坏?

发布于 2024-09-09 10:11:20 字数 137 浏览 3 评论 0原文

我需要从 SQL Server2005 表中获取数据,并将其放入另一个系统中。

我的供应商说:

“我们不建议您直接进入 SQL 并收集数据,因为这可能会导致 数据损坏或者您可以在导出时锁定表。”

这是真的吗?

I need to get data out of SQL Server2005 tables, and into another system.

My vendors says:

"We don´t recommend that you go directly in the SQL and collect data, because it can result in
corruption of data or you can lock tables while exporting."

Is that true?

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

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

发布评论

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

评论(2

为你拒绝所有暧昧 2024-09-16 10:11:20

是的。您可以在导出时锁定表。如果您想避免锁定,可以使用WITH(NOLOCK)提示(但请注意您可能会读取“陈旧”或其他不一致的数据)。

数据损坏是什么意思?如果您只在没有锁的情况下读取数据,则不会损坏数据(但您可以读取不一致的数据)。

Yes. You could lock tables while exporting. You can use the WITH(NOLOCK) hint if you want to avoid locks (but be aware you could read 'stale' or otherwise inconsistent data).

What do they mean by corruption of data? You can't corrupt data if you only read it without locks (but you could read inconsistent data).

相对绾红妆 2024-09-16 10:11:20

根据微软自己的说法,这个问题的答案如下:

“读操作完全支持对 Microsoft Navision 的 ODBC 访问,尽管写操作需要仔细注意,因为业务逻辑被绕过(例如不执行触发器)。”

资料来源:http://www.navisionguider.dk/downloads/Nav_IntegrationGuide1.2 中的第 15 页.pdf

有人有使用 ODBC 仅进行读取操作的经验吗?它是否以任何关键方式干扰写入操作? (写操作是否变得不可能,或者数据是否被破坏)?
或者这只是一个性能问题? (当您导出/读取大量数据时,写入速度较慢)?
我想我可能会遇到脏读(读取过时的数据),但其他人仍然可以进行写操作?

According to Microsoft themselves the answer to the question is the following:

"ODBC access to Microsoft Navision is fully supported for Read operations although write operations need careful attention as the business logic is bypassed (for example triggers are not executed)."

Source: page 15 in http://www.navisionguider.dk/downloads/Nav_IntegrationGuide1.2.pdf

Anyone with experiences in using ODBC for read operations only? Does it disturb the write operations in any critical way? (is write operations made impossible, or is data destroyed)?
Or is it just a performance issue? (slower writes, while you're exporting/reading tons of data)?
I guess I could experience dirty reads (read outdated data), but write operations should still be possible for others?

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