[LUA-print] onSubOperateFailure 1 由于数据库操作异常,请稍后重试!

断点调试发现链接服务器有问题器

升级原链接服务器脚本为sql server 17版本,再执行,问题解决
sql
USE [master]
GO
-- 删除旧链接服务器
IF EXISTS (SELECT 1 FROM sys.servers WHERE name = N'WHQJPlatformDBLink')
EXEC sp_dropserver N'WHQJPlatformDBLink', 'droplogins'
GO
-- 创建链接服务器(新版驱动 + 加密)
EXEC master.dbo.sp_addlinkedserver
@server = N'WHQJPlatformDBLink',
@srvproduct = N'',
@provider = N'MSOLEDBSQL',
@datasrc = N'127.0.0.1', -- ⚠️ 不要使用 (LOCAL)
@catalog = N'WHQJPlatformDB',
@provstr = N'Encrypt=yes;TrustServerCertificate=yes;'
GO
-- 登录映射(使用当前登录上下文)
EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname = N'WHQJPlatformDBLink',
@useself = N'True'
GO
-- 服务器选项(保持原配置)
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'collation compatible', 'true'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'data access', 'true'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'dist', 'false'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'pub', 'false'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'rpc', 'true'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'rpc out', 'true'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'sub', 'false'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'connect timeout', '0'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'collation name', NULL
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'lazy schema validation', 'false'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'query timeout', '0'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'use remote collation', 'true'
EXEC master.dbo.sp_serveroption N'WHQJPlatformDBLink', 'remote proc transaction promotion', 'true'
GO

重新创建

创建成功
