SQLServerException: Arithmetic overflow error converting numeric to data type numeric(1)
2017-02-08 14:40
791 查看
java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Arithmetic overflow error converting numeric to data type numeric. ......
这个报错很直接,一眼就看出来什么问题。由于产品的复杂性,当客户向我们报这个问题时,我们一下子查不出来是那个表(那个sql)引起的,因为很多表是在产品使用过程动态生成的。产品在实现时,表字段基本都给得很大了,出现这个问题很奇怪,怀疑是不是出现什么极端情况(比如,极大值除以极小值)。碰到这种问题,一开始要把涉及到的sql找出来,这样表、数据就可以出现了,然后再研究是那个字段、那个值会导致这个问题。
数据库是mssql server,sqlserver 提供了一个工具 SQL Server Profiler,利用这个工具可以找出对应的sql.
Open SQL Server Profiler(under Performance Toolsof MS SQLServer Studio) -> File -> New Trace, then connect to targetserver.
后续,继续解决这个问题,请点击下面链接了解详情。
SQLServerException: Arithmetic overflow error converting numeric to data type numeric(2)
相关文章推荐
- SQLServerException: Arithmetic overflow error converting numeric to data type numeric(2)
- Arithmetic overflow error converting numeric to data type numeric
- 纠结了一天多的问题arithmetic overflow error converting expression to data type datetime
- Arithmetic overflow error converting IDENTITY to data type int(SqlServer主键自增长引起的问题)
- System.InvalidCastException: Unable to cast object of type SqlDataProvider to type DataProvider
- Error converting data type nvarchar to datetime
- MSSQL: Arithmetic overflow error converting expression to data type int
- ERROR: The version of SQL Server in use does not support datatype 'datetime2'.
- An exception of type System.Data.SqlClient.SqlException was thrown. Additional exception information: A network-related or instance-specific error occ
- 使用data:JSON.stringify(object)遇到Uncaught TypeError: Converting circular structure to JSON
- HOW TO: Change the Owner of a User-Defined Data Type That Is in Use in SQL Server 2000
- SQL Server error "Xml data type is not supported in distributed queries" and workaround for it
- hiveserver2启动:javax.jdo.JDODataStoreException: Error executing SQL query "select "DB_ID" from "DBS""
- Could not store transport type data for Receive Location 'Recv.Loc' to config store. Primary SSO Server 'Sql-server' failed. The external credentials in the SSO database are more recent.
- Error: The version of SQL Server in use does not support datatype 'datetime2'
- Error:Error converting bytecode to dex: Cause: com.android.dex.DexIndexOverflowException,解决65536
- SQLServer 中 错误 Error converting data type varchar to datetime 的解决方法
- Error: The version of SQL Server in use does not support datatype 'datetime2
- Error:Error converting bytecode to dex: Cause: com.android.dex.DexIndexOverflowException: Cannot mer
- How to select the data type in SQLserver database such as varchar, nvarchar