Why would I get PREEMPTIVE_OS_AUTHORIZATIONOPS using tSQLt when Working at Home?
6
votes
2
answers
1085
views
I have an SSDT project containing tSQLt unit tests.
I always find when working at home that publishing this and running all tests (from a post deploy script) is problematic (against both localdb and SQL Server developer edition).
The publish hangs indefinitely and I eventually have to kill visual studio.
The wait type is
PREEMPTIVE_OS_AUTHORIZATIONOPS
and an example of a statement hung waiting for this (from sys.dm_exec_sql_text
) is
(@r BIT OUTPUT)
SELECT @r = CASE
WHEN I.Version = I.ClrVersion THEN 1
ELSE 0
END
FROM tSQLt.Info() AS I;
I also reproduce this by calling
SELECT tSQLt.Private::Info()
Which is a simple method
public static SqlString Info()
{
return (SqlString) Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
I assume that it is trying to contact the domain controller to establish that I have some permissions or other. I don't get this with other CLR assemblies and so suspect that this may be something to do with TSQLT not being a SAFE_ACCESS
assembly (permission set is EXTERNAL_ACCESS
).
Anyone know what's going on here and how I can fix this and work disconnected from my company's network without encountering this?
Asked by Martin Smith
(88051 rep)
Oct 7, 2017, 01:28 PM
Last activity: Oct 10, 2017, 07:30 AM
Last activity: Oct 10, 2017, 07:30 AM