-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
add sp_help_revlogin #270
add sp_help_revlogin #270
Conversation
❌ TSQLLint SummaryLinted 7 files in 1.1737302 seconds 103 Errors. See results
📄 Full job results. ♻️ This comment has been updated with latest results. |
Code Coverage Summary
Results for commit: a582480 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code snippet demonstrates the addition of an extended property to the stored procedure sp_estindex. The property @verbose is defined to show intermediate variables used in size calculations, with a default value of 0. Additionally, the snippet includes a check to drop the existing procedure sp_hexadecimal if it exists.
Positive Aspects
• Clarity of Purpose: The purpose of the extended property @verbose is clearly documented, which is beneficial for future maintainability and readability.
• Proper Usage of sys.sp_addextendedproperty: The use of the system stored procedure to add an extended property is correct, following the expected syntax and conventions.
• Safe Procedure Drop: The conditional check for the existence of sp_hexadecimal before attempting to drop it is a good practice to prevent errors.
Suggestions for Improvement
- Documentation: While the purpose of the @verbose property is clear, consider adding more detailed comments above the code snippet. This can include the rationale behind adding the property and how it affects the procedure's behavior.
- Error Handling: Consider implementing error handling around the DROP PROCEDURE statement. Although it checks for existence, wrapping it in a TRY...CATCH block can help manage any unexpected errors gracefully.
- Consistency: If this snippet is part of a larger set of scripts, ensure that similar patterns (like adding extended properties) are consistent across the scripts for maintainability.
- Testing: Ensure that after adding this property, appropriate tests are in place to validate that the @verbose functionality behaves as expected in various scenarios.
@Imran-imtiaz48 If you'd like to see an enhancement, please open an Issue for it. I welcome pull requests for enhancements and bug fixes! |
Description
Add sp_help_revlogin under the MIT license to make it more accessible for automation to install/maintain.
Issue: Fixes #269
How Has This Been Tested?
Types of changes
Checklist: