操作方法

错误:基础 DBMS 错误 [[Microsoft][SQL Native Client 10.0][Server] 将浮点型转换为数据类型数字的算术溢出错误

Last Published: April 23, 2024

描述

在使用 SQL Server 并涉及到将 shapefile 导入或加载到企业级地理数据库的特定工作流中,如果被加载的数据中存在 DOUBLE 类型字段,则可能会返回以下错误:

Error:   
Underlying DBMS error {{Microsoft}{SQL Native Client 10.0}{Server}Arithmetic overflow error converting float to data type numeric.} {{<shapefile name>}

原因

此错误是由于 SQL Server 加载或转换 FLOAT 或 DOUBLE 类型的数据字段的方式造成的,尤其是在字段精度较低的情况下。 这些规则在 shapefile 数据结构中不受支持,因此,如果存在的数据超过将数据加载到 SQL Server 时施加的精度或比例限制,则会返回上述错误。

Note:
Precision refers to the maximum total number of decimal digits that are stored, both to the left and right of the decimal point. The precision must have a value between 1, to the maximum precision of 38. The default precision in SQL Server is set to 18. This limit can be set higher (ex: 500) in ArcCatalog; however, the DBMS limit of 38 is maintained as the highest number storage possible. For more information, please review the Microsoft documentation in the Related Information section below.

解决方案或解决方法

手动编辑或提高企业级要素类的精度级别,适应正在加载的数据。

  1. 在企业级地理数据库或 SDE 地理数据库中创建一个新要素类,用于加载 shapefile。
    • 右键单击数据库或数据集 > 新建 > 要素类
  2. 从 shapefile 导入新要素类的坐标系。 此外,将 shapefile 中的字段导入到新要素类中。 单击下一步
    “新建要素类”窗口,其中一个选定的坐标系被高亮显示。
  3. 接受 tolerance 和 configuration 关键字,除非使用自定义设置。 单击下一步
  4. 从 shapefile 导入字段。
    “新建要素类”窗口,其中列出了来自 shapefile 的适用字段。
Note:
The default precision values for DOUBLE fields are 0.
  1. 字段属性部分,将所有 DOUBLE 字段的精度值更改为数据所需的最大值(最大为 38)。
    “新建要素类”窗口,其中字段精度属性已被更改为 38。
  2. 更新精度值后,单击完成
  3. 右键单击内容列表中新创建的要素类。 选择加载 > 加载数据
  4. 在输入数据中引用 shapefile,然后单击添加,列出要加载的源数据。 对其余部分使用默认设置,然后继续加载数据。

文章 ID: 000013811

接收通知并查找新问题或常见问题的解决方案

从我们全新的 AI 聊天机器人中获得简明答案和视频解决方案。

下载 Esri 支持应用程序

相关信息

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项