WAITFOR Delay/Time not working properly in Windows Docker (SQL Server Linux)

408 views Asked by At

The time specified in the waitfor delay is not honored in SQL Server Linux on Docker Desktop for Windows.

Script:

declare @tsstart varchar(100) = CONVERT (VARCHAR(100) , SYSDATETIME() ,121);
raiserror(@tsstart,0,0) with nowait;
WAITFOR DELAY '00:00:15';
declare @tend varchar(100)  = CONVERT (VARCHAR(100) ,SYSDATETIME(),121 );
raiserror(@tend,0,0) with nowait;

Output:

2021-03-25 23:05:23.4457947
2021-03-25 23:05:33.0387152

I would expect the @tend would be 2021-03-25 23:05:38.4457947 (because i specified 15 seconds in my waitfor.

The same code executes fine on a SQL Server installed on Windows 10 Pro (laptop). Anything I am missing?

Environment : SQL Server Linux (2019)

Microsoft SQL Server 2019 (RTM-CU9) (KB5000642) - 15.0.4102.2 (X64) 
    Jan 25 2021 20:16:12 
    Copyright (C) 2019 Microsoft Corporation
    Developer Edition (64-bit) on Linux (Ubuntu 18.04.5 LTS) <X64>

Docker for Desktop Windows (Linux Container) (Docker engine: v20.10.5) Docker Version

0

There are 0 answers