I'm finding the following SQL to be coming from squirrel and locking other DB's. Our system is all Microsoft SQL databases. I've disabled the MS SQL plugin because I'm guessing it is coming from that as the system tables are proprietary to MS SQL.
Any ideas where this might be coming from or how to disable it (if not the MS SQL plugin?).
<?query --
UPDATE s
SET
s.sql_text =
(
SELECT
REPLACE
(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
N'--' + NCHAR(13) + NCHAR(10) +
CASE
WHEN @get_full_inner_text = 1 THEN est.text
WHEN LEN(est.text) < (@statement_end_offset / 2) + 1 THEN est.text
WHEN SUBSTRING(est.text, (@statement_start_offset/2), 2) LIKE N'[a-zA-Z0-9][a-zA-Z0-9]' THEN est.text
ELSE
CASE
WHEN @statement_start_offset > 0 THEN
SUBSTRING
(
est.text,
((@statement_start_offset/2) + 1),
(
CASE
WHEN @statement_end_offset = -1 THEN 2147483647
ELSE ((@statement_end_offset - @statement_start_offset)/2) + 1
END
)
)
ELSE RTRIM(LTRIM(est.text))
END
END +
NCHAR(13) + NCHAR(10) + N'--' COLLATE Latin1_General_Bin2,
NCHAR(31),N'?'),NCHAR(30),N'?'),NCHAR(29),N'?'),NCHAR(28),N'?'),NCHAR(27),N'?'),NCHAR(26),N'?'),NCHAR(25),N'?'),NCHAR(24),N'?'),NCHAR(23),N'?'),NCHAR(22),N'?'),
NCHAR(21),N'?'),NCHAR(20),N'?'),NCHAR(19),N'?'),NCHAR(18),N'?'),NCHAR(17),N'?'),NCHAR(16),N'?'),NCHAR(15),N'?'),NCHAR(14),N'?'),NCHAR(12),N'?'),
NCHAR(11),N'?'),NCHAR(8),N'?'),NCHAR(7),N'?'),NCHAR(6),N'?'),NCHAR(5),N'?'),NCHAR(4),N'?'),NCHAR(3),N'?'),NCHAR(2),N'?'),NCHAR(1),N'?'),
NCHAR(0),
N''
) AS [processing-instruction(query)]
FOR XML
PATH(''),
TYPE
),
s.statement_start_offset =
CASE
WHEN LEN(est.text) < (@statement_end_offset / 2) + 1 THEN 0
WHEN SUBSTRING(CONVERT(VARCHAR(MAX), est.text), (@statement_start_offset/2), 2) LIKE '[a-zA-Z0-9][a-zA-Z0-9]' THEN 0
ELSE @statement_start_offset
END,
s.statement_end_offset =
CASE
WHEN LEN(est.text) < (@statement_end_offset / 2) + 1 THEN -1
WHEN SUBSTRING(CONVERT(VARCHAR(MAX), est.text), (@statement_start_offset/2), 2) LIKE '[a-zA-Z0-9][a-zA-Z0-9]' THEN -1
ELSE @statement_end_offset
END
FROM
#sessions AS s,
(
SELECT TOP(1)
text
FROM
(
SELECT
text,
0 AS row_num
FROM sys.dm_exec_sql_text(@sql_handle)
UNION ALL
SELECT
NULL,
1 AS row_num
) AS est0
ORDER BY
row_num
) AS est
WHERE
s.session_id = @session_id
AND s.request_id = @request_id
AND s.recursion = 1
OPTION (KEEPFIXED PLAN)
--?>
No, this SQL isn't executed by SQuirreL.
I guess it's generated by your JDBC driver.
Thanks. I haven't seen it since I turned off the MS SQL pluggin, but that could just be coincidence. I'll be watching for it.
I'm hoping something like that isn't coming from the JDBC driver but you never know.
May be You are Use Sp_WhoIsActive Procedure or sp_blitzWhoIs
Sorry, I can't reproduce your problem. I checked the following:
Hi. Respectfully, this was from 6 years ago so I'm guessing whatever the
issue was was solved in the MS SQL driver I was using or something like
that.
Probably can close this ticket.
On Sat, Nov 26, 2022, 2:09 PM Gerd Wagner gerdwagner@users.sourceforge.net
wrote:
Related
Bugs:
#1266Closed on user request.