microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.55k stars 898 forks source link

Why LOCK_TIMEOUT is set to 5000 vs - 1 in SSMS ? #2258

Open hamidmira opened 6 years ago

hamidmira commented 6 years ago

Steps to Reproduce: Unless I'm mistaken, under SQL Operations Studio, connections are initiated with LOCK_TIMEOUT at 5000 (5 seconds) while under SSMS by default LOCK_TIMEOUT equals - 1 (wait forever) SELECT @@LOCK_TIMEOUT Why not use the default value -1 for LOCK_TIMEOUT ? Thank you

kburtram commented 6 years ago

@hamidmira in SSMS this query option is set based on the below user setting. We don't currently have equivalent UI to set this default option in SQL Ops Studio, so we are using the defaults provided by .Net SqlClient and the server configuration, which appears to be 5000 in this case.

We're tracking the request to add UI to auto-set these options with this issue https://github.com/Microsoft/sqlopsstudio/issues/726. I'll keep this issue open to change the default setting for this particular setting.

image

hamidmira commented 6 years ago

@kburtram Thank you for considering my request. I have taken note of your comments added to issue #726. The solution envisaged suits me perfectly.