mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -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"};
|
var systemDatabases = new[] {"master", "model", "msdb", "tempdb"};
|
||||||
using (DbCommand command = connection.CreateCommand())
|
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.CommandTimeout = 15;
|
||||||
command.CommandType = CommandType.Text;
|
command.CommandType = CommandType.Text;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user