重现步骤

[步骤]

prometheus告警
            开始时间: 16:36:02 

            错误代码: N1636026  

            sql类型: DECLARE   

            sql: [16:36:02]  -------------------------------------------------------------
CODE:N1636026
Error:16_8152_30_-2146232060
SQL: DECLARE @ProductSKUS TABLE(SKU VARCHAR(50) primary key); INSERT INTO @ProductSKUS
SELECT SKU FROM (
SELECT
ROW_NUMBER() OVER (ORDER BY ID DESC ) AS [PageIndex], * FROM (
SELECT P.SKU,P.ID FROM dbo.RB_Product (NOLOCK) p LEFT JOIN RB_Product_Admin pa WITH ( NOLOCK ) ON pa.SKU = p.SKU AND pa.CustomerID = p.CustomerID LEFT JOIN RB_WareHouse_Product whp WITH ( NOLOCK ) ON whp.SKU = p.SKU AND whp.CustomerID = p.CustomerID AND whp.WareHouseID = (CASE p.DefaultLocalWarehouse WHEN 0 THEN 5312 WHEN NULL THEN 5312 ELSE p.DefaultLocalWarehouse END) AND EXISTS (SELECT 1 FROM RB_WareHouse WHERE whp.WareHouseID =RB_WareHouse.ID AND whp.CustomerID = RB_WareHouse.CustomerID AND RB_WareHouse.WareHouseType = 1) LEFT JOIN RB_WareHouse wh (NOLOCK) ON p.CustomerID=wh.CustomerID AND p.DefaultLocalWarehouse=wh.ID AND wh.IsActive=1 LEFT JOIN ( SELECT CustomerID , SKU , SUM(BadNum) AS ProductBadNum FROM RB_Procurement_Detail_BadList WITH ( NOLOCK ) WHERE BadNum > 0 AND DType = 1 GROUP BY CustomerID , SKU ) AS RB_Procurement_Detail_BadList ON p.SKU = RB_Procurement_Detail_BadList.SKU AND p.CustomerID = RB_Procurement_Detail_BadList.CustomerID LEFT JOIN ( SELECT CustomerID , SKU , SUM(NumError) AS NumError FROM RB_ProductManageLog WITH ( NOLOCK ) WHERE NumError > 0 GROUP BY CustomerID , SKU ) AS RB_ProductManageLog ON p.SKU = RB_ProductManageLog.SKU AND p.CustomerID = RB_ProductManageLog.CustomerID LEFT JOIN RB_Product_Declaration pd ( NOLOCK ) ON p.CustomerID = pd.CustomerID AND p.SKU = pd.SKU WHERE p.CustomerID =1 AND p.DeleteStatus =0 AND p.SKU IN (Select item from CharSplitForIn('14803100148556971487779014900991149783891470893314840683149151821492364214924688147591831483499914904572149994901487903014901888147308801475285114752972148432061484560114851313149352321495142614959409149104231491842514951745148264401484938514887383149513691495954914978841149799661499321914995570148808021476755514901655149524051498452014803055148398971485949414990215149166581485818114929669149329161464940314819705148418761485115214890253148552021497850414807968149797881491393114966881149842881498819414801734148521361485384114854065148581671489271814910530',','))
) AS TempTable
) AS PagerTable
WHERE PagerTable.[PageIndex] BETWEEN 1 AND 25;
SELECT
ROW_NUMBER() OVER (ORDER BY ID DESC ) AS [PageIndex], * FROM (SELECT p.ID ,
p.CustomerID ,
p.ClientSKU ,
p.SKU ,
p.ProductState ,
p.MinSaleNum ,
p.ImageUrl ,
p.ProductProperty ,
p.WithBattery ,
p.PlugRelate ,
p.PlugRelateType ,
p.ProductGroupSKU ,
p.ProductName ,
p.ProductNameCN ,
p.LastSupplierPrice ,
p.GrossWeight ,
p.UnitShipFee ,
p.LastBuyShipFee ,
p.SalePrice ,
p.PackWeight ,
p.IsGroup ,
p.OnlineStatus ,
p.ComeSource AS ComeSource ,
ISNULL(whp.GoodNum, 0) GoodNum ,
ISNULL(whp.AvgDailySales, 0) AvgDailySales ,
ISNULL(wh.WareHouseName,'') DefaultLocalWarehouseName,
pa.RecommendValue ,
pa.AddAdminID ,
pa.AddAdminName ,
pa.AddTime ,
pa.DevelopmentAuditOperatorName ,
pa.ProductDevelopmentAuditTime ,
pa.EditAuditOperatorName ,
pa.ProductEditAuditTime ,
pa.PictureAuditOperatorName ,
pa.ProductPictureAuditTime ,
pa.IsAmazonSale ,
pa.NoSalePlatform ,
pa.NoSaleCountry ,
pa.DevelopStatus ,
pa.DevelopAdminID ,
pa.DevelopAdminName ,
pa.DevelopTime ,
pa.DevelopRefuseReason ,
pa.DevelopRefuseTime ,
pa.AssignDevelopAdminID ,
pa.AssignDevelopAdminName ,
pa.AssignDevelopTime ,
pa.EditStatus ,
pa.EditAdminID ,
pa.EditAdminName ,
pa.EditTime ,
pa.EditRefuseTime ,
pa.ToImageMemo ,
pa.ImageStatus ,
pa.ImageAdminID ,
pa.ImageAdminName ,
pa.ImageTime ,
pa.ImageRefuseTime ,
pa.BuyerID ,
pa.BuyerName ,
pa.BuyerSetTime ,
pa.CheckStatus ,
pa.CheckReason ,
pa.CheckAdminID ,
pa.CheckAdminName ,
pa.CheckTime ,
pa.OnlineTime ,
pa.OfflineTime ,
pa.OfflineAdminID ,
pa.OfflineAdminName ,
p.TaxPoint ,
p.TaxRate ,
p.IsRawMaterial ,
ISNULL(ProductBadNum, 0) ProductBadNum ,
ISNULL(NumError, 0) NumError ,
p.ProductType ,
ISNULL(p.IsFBABarCode, 0) IsFBABarCode ,
ISNULL(p.IsRecommendOcean, 0) AS IsRecommendOcean ,
pd.DeclarationPriceRate ,
p.IsCheckDeclarationCode ,
p.IsCheckTransport ,
p.LastBuyPrice ,
pa.PriceSpecialistOperatTime ,
ISNULL(p.DefaultLocalWarehouse, 0) AS DefaultLocalWareHouse ,
p.DevelopType ,
p.AppointDevelopType ,
p.PictureSource ,
p.PreclassStatus ,
p.PreclassGoodsCode ,
p.ImitatingBrandRemark,
p.ProductStateRemarks,
p.ClassID1,
p.ClassID2,
p.ClassID,
p.BeginTime,
p.EndTime,
p.ProdutcArrivalDate,
ISNULL(pa.PhotographerId,0) PhotographerId,
ISNULL(pa.PhotographerName,'') PhotographerName,
pa.PhotographerTime,
pa.WrapDesignerId,
pa.WrapDesignerName,
pa.WrapDesignerTime,
pa.ImageDesignerId,
pa.ImageDesignerName,
pa.ImageDesignerTime,
pa.IntellectualPropertyRightsAdminID,
pa.IntellectualPropertyRightsAdminName,
pa.IntellectualPropertyRightsTime,
ISNULL(p.EditNum,0) EditNum,
p.IsNeedCeCertification
FROM (SELECT * FROM dbo.RB_Product (NOLOCK) WHERE SKU IN (SELECT * FROM @ProductSKUS)) p
LEFT JOIN RB_Product_Admin pa WITH ( NOLOCK ) ON pa.SKU = p.SKU
AND pa.CustomerID = p.CustomerID
LEFT JOIN RB_WareHouse_Product whp WITH ( NOLOCK ) ON whp.SKU = p.SKU
AND whp.CustomerID = p.CustomerID
AND whp.WareHouseID = (CASE p.DefaultLocalWarehouse WHEN 0 THEN 5312 WHEN NULL THEN 5312 ELSE p.DefaultLocalWarehouse END) AND EXISTS (SELECT 1 FROM RB_WareHouse WHERE whp.WareHouseID =RB_WareHouse.ID
AND whp.CustomerID = RB_WareHouse.CustomerID AND RB_WareHouse.WareHouseType = 1)
LEFT JOIN RB_WareHouse wh (NOLOCK) ON p.CustomerID=wh.CustomerID AND p.DefaultLocalWarehouse=wh.ID AND wh.IsActive=1
LEFT JOIN ( SELECT CustomerID ,
SKU ,
SUM(BadNum) AS ProductBadNum
FROM RB_Procurement_Detail_BadList WITH ( NOLOCK )
WHERE BadNum > 0
AND DType = 1
GROUP BY CustomerID ,
SKU
) AS RB_Procurement_Detail_BadList ON p.SKU = RB_Procurement_Detail_BadList.SKU
AND p.CustomerID = RB_Procurement_Detail_BadList.CustomerID
LEFT JOIN ( SELECT CustomerID ,
SKU ,
SUM(NumError) AS NumError
FROM RB_ProductManageLog WITH ( NOLOCK )
WHERE NumError > 0
GROUP BY CustomerID ,
SKU
) AS RB_ProductManageLog ON p.SKU = RB_ProductManageLog.SKU
AND p.CustomerID = RB_ProductManageLog.CustomerID
LEFT JOIN RB_Product_Declaration pd ( NOLOCK ) ON p.CustomerID = pd.CustomerID
AND p.SKU = pd.SKU WHERE p.CustomerID =1 AND p.DeleteStatus =0 AND p.SKU IN (Select item from CharSplitForIn('14803100148556971487779014900991149783891470893314840683149151821492364214924688147591831483499914904572149994901487903014901888147308801475285114752972148432061484560114851313149352321495142614959409149104231491842514951745148264401484938514887383149513691495954914978841149799661499321914995570148808021476755514901655149524051498452014803055148398971485949414990215149166581485818114929669149329161464940314819705148418761485115214890253148552021497850414807968149797881491393114966881149842881498819414801734148521361485384114854065148581671489271814910530',','))) AS TempTable;
SELECT COUNT(1) FROM (SELECT P.SKU,P.ID FROM dbo.RB_Product (NOLOCK) p LEFT JOIN RB_Product_Admin pa WITH ( NOLOCK ) ON pa.SKU = p.SKU AND pa.CustomerID = p.CustomerID LEFT JOIN RB_WareHouse_Product whp WITH ( NOLOCK ) ON whp.SKU = p.SKU AND whp.CustomerID = p.CustomerID AND whp.WareHouseID = (CASE p.DefaultLocalWarehouse WHEN 0 THEN 5312 WHEN NULL THEN 5312 ELSE p.DefaultLocalWarehouse END) AND EXISTS (SELECT 1 FROM RB_WareHouse WHERE whp.WareHouseID =RB_WareHouse.ID AND whp.CustomerID = RB_WareHouse.CustomerID AND RB_WareHouse.WareHouseType = 1) LEFT JOIN RB_WareHouse wh (NOLOCK) ON p.CustomerID=wh.CustomerID AND p.DefaultLocalWarehouse=wh.ID AND wh.IsActive=1 LEFT JOIN ( SELECT CustomerID , SKU , SUM(BadNum) AS ProductBadNum FROM RB_Procurement_Detail_BadList WITH ( NOLOCK ) WHERE BadNum > 0 AND DType = 1 GROUP BY CustomerID , SKU ) AS RB_Procurement_Detail_BadList ON p.SKU = RB_Procurement_Detail_BadList.SKU AND p.CustomerID = RB_Procurement_Detail_BadList.CustomerID LEFT JOIN ( SELECT CustomerID , SKU , SUM(NumError) AS NumError FROM RB_ProductManageLog WITH ( NOLOCK ) WHERE NumError > 0 GROUP BY CustomerID , SKU ) AS RB_ProductManageLog ON p.SKU = RB_ProductManageLog.SKU AND p.CustomerID = RB_ProductManageLog.CustomerID LEFT JOIN RB_Product_Declaration pd ( NOLOCK ) ON p.CustomerID = pd.CustomerID AND p.SKU = pd.SKU WHERE p.CustomerID =1 AND p.DeleteStatus =0 AND p.SKU IN (Select item from CharSplitForIn('14803100148556971487779014900991149783891470893314840683149151821492364214924688147591831483499914904572149994901487903014901888147308801475285114752972148432061484560114851313149352321495142614959409149104231491842514951745148264401484938514887383149513691495954914978841149799661499321914995570148808021476755514901655149524051498452014803055148398971485949414990215149166581485818114929669149329161464940314819705148418761485115214890253148552021497850414807968149797881491393114966881149842881498819414801734148521361485384114854065148581671489271814910530',','))) AS TempCount;

PARAMS:
MESSAGE:String or binary data would be truncated.
String or binary data would be truncated.
String or binary data would be truncated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB) 在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)
在 RB.DALExtend.RB_ProductExtend.QueryTemporaryTablePagerNew(String sqlDeclare, String sqlRecycle, String SQLString, String strOrder, Int32 pageIndex, Int32 pageSize, Int32& recordCount, Int32 times, SqlParameter[] parameters)
在 RB.DALExtend.RB_ProductExtend.GetModelListV2(CM_GetProductListParam param, Boolean isOpenNewSearch, Int32& recordCount)
在 PandaBuy.ERP.Web.IrobotBox.Product.ProductListV2.Page_Load(Object sender, EventArgs e)
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest()
在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
在 System.Web.UI.Page.ProcessRequest(HttpContext context)
在 ASP.irobotbox_product_productlistv2_aspx.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)



[结果]


[期望]


历史记录  
  1. 2022-11-18 18:29:23, 由 袁慧斌 创建。
  2. 2022-11-18 18:35:08, 由 胡晓龙 指派给 何建宝。
    修改了 指派给,旧值为 "huxiaolong",新值为 "hejianbao"。
  3. 2022-11-21 16:57:10, 由 何建宝 指派给 吴万春。
    修改了 指派给,旧值为 "hejianbao",新值为 "wuwanchun"。
  4. 2022-11-21 20:05:53, 由 吴万春 解决,方案为 系统设计缺陷 。
    修改了 解决方案,旧值为 "",新值为 "bydesign"。
    修改了 解决版本,旧值为 "",新值为 "trunk"。
    修改了 解决日期,旧值为 "",新值为 "2022-11-21 19:56:48"。
    修改了 指派给 ,旧值为 "wuwanchun",新值为 "tanhongbo"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "wuwanchun"。

    触发:批量搜索SKU输入一个超长不分割的字符串

    改动:根据数据库对应字段长度截断(没什么好的的解决办法)。

  5. 2022-11-22 16:09:22, 由 tanhongbo 添加备注。

    搜索正确:

  6. 2022-11-22 16:10:18, 由 tanhongbo 指派给 袁慧斌。
    修改了 指派给,旧值为 "tanhongbo",新值为 "yuanhuibin"。

    测试环境已解决:

    发版后,麻烦跟进一下,看看是否还有此问题

  7. 2022-11-24 17:34:34, 由 袁慧斌 指派给 吴万春。
    修改了 指派给,旧值为 "yuanhuibin",新值为 "wuwanchun"。
    前段页面应该做好响应的判断,不是正常的内容给以提示
  8. 2022-11-25 18:36:27, 由 吴万春 指派给 tanhongbo。
    修改了 指派给,旧值为 "wuwanchun",新值为 "tanhongbo"。
  9. 2022-11-26 10:07:07, 由 tanhongbo 添加备注。

    验证BUG:已修复

  10. 2022-11-26 10:09:58, 由 tanhongbo 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "tanhongbo",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "tanhongbo"。
    修改了 关闭日期,旧值为 "",新值为 "2022-11-26 10:09:58"。
  11. 2023-11-17 09:53:55, 由 刘超 编辑。
    修改了 所属模块,旧值为 "0",新值为 "1863"。
所属项目 技术中心-需求池
所属模块 系统运维   性能优化
所属计划
所属迭代
Bug类型
严重程度 提示
优先级 P2
Bug状态 已关闭
业务部门
影响功能
开发责任人
测试责任人
解决时效 0
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2022-11-26 10:09:58
截止日期 0000-00-00
上线时间
上线时效
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 袁慧斌 于 2022-11-18 18:29:23
影响环境 577
由谁解决 吴万春 于 2022-11-21 19:56:48
解决版本 主干
解决方案 系统设计缺陷
由谁关闭 tanhongbo 于 2022-11-26 10:09:58
最后修改 刘超 于 2023-11-17 09:53:48
相关Bug