Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable QueryStore tab to the database properties #2200

Merged
merged 14 commits into from
Sep 7, 2023

Conversation

ssreerama
Copy link
Contributor

@ssreerama ssreerama commented Aug 31, 2023

This PR adds the ability to view/update query store options to the database proeprties.

@@ -89,6 +98,33 @@ static DatabaseHandler()
displayFileTypes.TryAdd(FileType.Log, SR.prototype_file_logFile);
displayFileTypes.TryAdd(FileType.FileStream, SR.prototype_file_filestreamFile);

displayOperationModeOptions.TryAdd(QueryStoreOperationMode.Off, CommonConstants.QueryStoreOperationMode_Off);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be localizing option values like OFF and READ_ONLY - do we do that in SSMS?

@erinstellato-ms what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other couple of dropdown options(All,Auto,None,Custom) are translated in the MS quey store help doc, so localized these too.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's our general practice on localizing options in ADS? Specifically, options in a drop down? Example: Backup functionality (in preview), we have Set backup compression as a drop down with three options. Are those localized?

Fundamentally...first, let's be consistent across ADS. Second, I will have to install another language of SSMS to see what we do there :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created a task to verify and add/remove all such dropdown options:
#2213

}
catch (Exception ex)
{
areQueryStorePropertiesInitialized = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exception are you expecting to be thrown here? I'm not sure what "initialized" would mean in this case, or why we'd want to skip setting the values completely in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While create database the value this.currentState.queryStoreOptions is not null but its properties (ex: DesiredState...etc) throws "'this.currentState.queryStoreOptions.DesiredState' threw an exception of type 'System.NullReferenceException'"

Copy link
Member

@corivera corivera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me pending other people's comments.

@ssreerama ssreerama linked an issue Sep 6, 2023 that may be closed by this pull request
Copy link
Member

@corivera corivera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending my other comments

@ssreerama ssreerama merged commit a053457 into main Sep 7, 2023
5 checks passed
@ssreerama ssreerama deleted the sai/QueryStore_DBProps branch September 7, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide SMO database properties experience to the QueryStore Tab
4 participants