mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 09:35:36 -05:00
closing the default connections that are opned just for validating the connections. Added the feature to application name in the connection (#483)
This commit is contained in:
@@ -144,7 +144,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
{
|
||||
using (DatabaseTaskHelper helper = AdminService.CreateDatabaseTaskHelper(connInfo, databaseExists: true))
|
||||
{
|
||||
using (SqlConnection sqlConn = ConnectionService.OpenSqlConnection(connInfo))
|
||||
using (SqlConnection sqlConn = ConnectionService.OpenSqlConnection(connInfo, "Backup"))
|
||||
{
|
||||
if (sqlConn != null && !connInfo.IsSqlDW && !connInfo.IsAzure)
|
||||
{
|
||||
@@ -307,7 +307,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
if (supported && connInfo != null)
|
||||
{
|
||||
DatabaseTaskHelper helper = AdminService.CreateDatabaseTaskHelper(connInfo, databaseExists: true);
|
||||
SqlConnection sqlConn = ConnectionService.OpenSqlConnection(connInfo);
|
||||
SqlConnection sqlConn = ConnectionService.OpenSqlConnection(connInfo, "Backup");
|
||||
// Connection gets discounnected when backup is done
|
||||
|
||||
BackupOperation backupOperation = CreateBackupOperation(helper.DataContainer, sqlConn, backupParams.BackupInfo);
|
||||
@@ -344,7 +344,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
|
||||
if (connInfo != null)
|
||||
{
|
||||
using (sqlConn = ConnectionService.OpenSqlConnection(connInfo))
|
||||
using (sqlConn = ConnectionService.OpenSqlConnection(connInfo, "DisasterRecovery"))
|
||||
{
|
||||
if (sqlConn != null && !connInfo.IsSqlDW && !connInfo.IsAzure)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user