mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
listDatabases now shows online databases only (#534)
This commit is contained in:
@@ -856,7 +856,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||
var systemDatabases = new[] {"master", "model", "msdb", "tempdb"};
|
||||
using (DbCommand command = connection.CreateCommand())
|
||||
{
|
||||
command.CommandText = "SELECT name FROM sys.databases ORDER BY name ASC";
|
||||
command.CommandText = @"SELECT name FROM sys.databases WHERE state_desc='ONLINE' ORDER BY name ASC";
|
||||
command.CommandTimeout = 15;
|
||||
command.CommandType = CommandType.Text;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user