mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
remove unused metadata queries from backup (#538)
This commit is contained in:
@@ -143,7 +143,6 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
BackupConfigInfo configInfo = new BackupConfigInfo();
|
||||
configInfo.RecoveryModel = GetRecoveryModel(databaseName);
|
||||
configInfo.DefaultBackupFolder = CommonUtilities.GetDefaultBackupFolder(this.serverConnection);
|
||||
configInfo.LatestBackups = GetLatestBackupLocations(databaseName);
|
||||
configInfo.BackupEncryptors = GetBackupEncryptors();
|
||||
return configInfo;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.SqlTools.ServiceLayer.Admin.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
|
||||
{
|
||||
@@ -13,21 +11,11 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.Contracts
|
||||
/// </summary>
|
||||
public class BackupConfigInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets default database info
|
||||
/// </summary>
|
||||
public DatabaseInfo DatabaseInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets recovery model of a database
|
||||
/// </summary>
|
||||
public string RecoveryModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the latest backup set of a database
|
||||
/// </summary>
|
||||
public List<RestoreItemSource> LatestBackups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default backup folder
|
||||
/// </summary>
|
||||
|
||||
@@ -153,7 +153,6 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
if (sqlConn != null && !connInfo.IsCloud)
|
||||
{
|
||||
BackupConfigInfo backupConfigInfo = this.GetBackupConfigInfo(helper.DataContainer, sqlConn, sqlConn.Database);
|
||||
backupConfigInfo.DatabaseInfo = AdminService.GetDatabaseInfo(connInfo);
|
||||
response.BackupConfigInfo = backupConfigInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,8 +62,7 @@ CREATE CERTIFICATE {1} WITH SUBJECT = 'Backup Encryption Certificate'; ";
|
||||
|
||||
requestContext.Verify(x => x.SendResult(It.Is<BackupConfigInfoResponse>
|
||||
(p => p.BackupConfigInfo.RecoveryModel != string.Empty
|
||||
&& p.BackupConfigInfo.DefaultBackupFolder != string.Empty
|
||||
&& p.BackupConfigInfo.DatabaseInfo != null)));
|
||||
&& p.BackupConfigInfo.DefaultBackupFolder != string.Empty)));
|
||||
|
||||
testDb.Cleanup();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user