Permalink
Browse files

Prototype: Get list of databases by using sp_my_dbs stored procedure

  • Loading branch information...
olljanat committed Dec 12, 2017
1 parent 3923250 commit a0a2f06396c95428668f03c59418ec73fc4e4e9d
Binary file not shown.
@@ -914,7 +914,8 @@ public ListDatabasesResponse ListDatabases(ListDatabasesParams listDatabasesPara
var systemDatabases = new[] {"master", "model", "msdb", "tempdb"};
using (DbCommand command = connection.CreateCommand())
{
command.CommandText = @"SELECT name FROM sys.databases WHERE state_desc='ONLINE' ORDER BY name ASC";
// command.CommandText = @"SELECT name FROM sys.databases WHERE state_desc='ONLINE' ORDER BY name ASC";
command.CommandText = @"exec sp_my_dbs";
command.CommandTimeout = 15;
command.CommandType = CommandType.Text;

0 comments on commit a0a2f06

Please sign in to comment.