diff --git a/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts b/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts index 74ace5b5c6ce..4ddb5ab16515 100644 --- a/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts +++ b/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts @@ -87,9 +87,13 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { + await this.notifyServerRestart(); + })); } protected override get helpUrl(): string { @@ -364,6 +368,13 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { + if (this.shouldRestartServer) { + await vscode.window.showInformationMessage(localizedConstants.needToRestartServer, { modal: true }); + this.shouldRestartServer = false; + } + } + private initializeProcessorsSection(): void { const isEnabled = this.engineEdition !== azdata.DatabaseEngineEdition.SqlManagedInstance; let nodes: NumaNode[] = this.objectInfo.numaNodes; @@ -491,7 +502,7 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { await this.handleAuthModeChange(); }); this.sqlServerAndWindowsAuthRadioButton = this.createRadioButton(localizedConstants.sqlServerAndWindowsAuthText, radioServerGroupName, this.objectInfo.authenticationMode === ServerLoginMode.Mixed, async () => { await this.handleAuthModeChange(); }); @@ -529,7 +540,7 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { this.objectInfo.dataLocation = newValue; + if (this.objectInfo.dataLocation !== this.originalObjectInfo.dataLocation) { + this.shouldRestartServer = true; + } }, dataLocationInputboxProps); const dataLocationButton = this.createBrowseButton(async () => { const newPath = await this.selectFolder(this.objectInfo.dataLocation); this.dataLocationInput.value = newPath; this.objectInfo.dataLocation = newPath; + if (this.objectInfo.dataLocation !== this.originalObjectInfo.dataLocation) { + this.shouldRestartServer = true; + } }, isEnabled); const dataLocationInputContainer = this.createLabelInputContainer(localizedConstants.dataLocationText, [this.dataLocationInput, dataLocationButton]) this.logLocationInput = this.createInputBox(async (newValue) => { this.objectInfo.logLocation = newValue; + if (this.objectInfo.logLocation !== this.originalObjectInfo.logLocation) { + this.shouldRestartServer = true; + } }, logLocationInputboxProps); const logLocationButton = this.createBrowseButton(async () => { const newPath = await this.selectFolder(this.objectInfo.logLocation); this.logLocationInput.value = newPath; this.objectInfo.logLocation = newPath; + if (this.objectInfo.logLocation !== this.originalObjectInfo.logLocation) { + this.shouldRestartServer = true; + } }, isEnabled); const logLocationInputContainer = this.createLabelInputContainer(localizedConstants.logLocationText, [this.logLocationInput, logLocationButton]) @@ -782,5 +805,4 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase