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

add sp_help_revlogin #270

Merged
merged 6 commits into from
Feb 18, 2023
Merged

add sp_help_revlogin #270

merged 6 commits into from
Feb 18, 2023

Conversation

lowlydba
Copy link
Owner

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have updated the Version number of any scripts modified.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@github-actions
Copy link

github-actions bot commented Feb 18, 2023

❌ TSQLLint Summary

Linted 7 files in 1.1737302 seconds

103 Errors.
0 Warnings.

See results
Type Rule Location Message
data-type-length install_dba-multitool.sql(3245,57) Data type length not specified.
keyword-capitalization install_dba-multitool.sql(3155,15) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3156,15) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3160,24) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3161,16) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3162,21) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3163,24) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3171,26) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3172,27) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3173,28) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3175,35) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3206,5) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3245,50) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3262,17) Expected TSQL Keyword to be capitalized.
keyword-capitalization install_dba-multitool.sql(3271,94) Expected TSQL Keyword to be capitalized.
print-statement install_dba-multitool.sql(3236,13) PRINT statement found.
print-statement install_dba-multitool.sql(3243,9) PRINT statement found.
print-statement install_dba-multitool.sql(3247,9) PRINT statement found.
print-statement install_dba-multitool.sql(3248,9) PRINT statement found.
print-statement install_dba-multitool.sql(3254,17) PRINT statement found.
print-statement install_dba-multitool.sql(3258,17) PRINT statement found.
print-statement install_dba-multitool.sql(3262,17) PRINT statement found.
print-statement install_dba-multitool.sql(3349,13) PRINT statement found.
print-statement install_dba-multitool.sql(3350,13) PRINT statement found.
print-statement install_dba-multitool.sql(3351,13) PRINT statement found.
semicolon-termination install_dba-multitool.sql(3151,30) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3183,4) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3160,37) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3161,19) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3162,24) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3163,32) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3164,29) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3165,18) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3166,44) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3167,43) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3171,29) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3172,30) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3173,31) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3175,66) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3176,46) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3177,54) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3178,120) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3180,27) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3182,34) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3186,32) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3194,46) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3195,50) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3196,42) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3197,42) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3198,42) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3199,54) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3200,52) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3201,53) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3202,52) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3203,53) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3204,50) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3205,50) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3206,51) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3207,46) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3208,46) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3209,53) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3220,24) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3220,24) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3230,28) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3230,28) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3232,24) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3233,137) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3236,39) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3237,29) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3238,34) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3239,22) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3242,52) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3243,22) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3245,101) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3247,22) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3248,17) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3254,25) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3256,51) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3258,30) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3260,132) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3262,30) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3266,182) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3271,111) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3273,76) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3274,75) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3279,43) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3283,43) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3286,152) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3290,89) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3295,97) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3301,82) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3305,84) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3309,87) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3312,82) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3315,27) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3347,16) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3349,26) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3350,30) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3351,24) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3353,137) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3355,21) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3356,26) Statement not terminated with semicolon.
semicolon-termination install_dba-multitool.sql(3357,13) Statement not terminated with semicolon.

📄 Full job results.

♻️ This comment has been updated with latest results.

@lowlydba lowlydba merged commit f48cbf1 into main Feb 18, 2023
@lowlydba lowlydba deleted the revlogin branch February 18, 2023 19:12
@github-actions
Copy link

badge

Code Coverage Summary

Filename                    Stmts    Miss  Cover    Missing
------------------------  -------  ------  -------  -----------------------------------------------------------------------
[dbo].[sp_doc]                 91       3  96.70%   93-94, 391
[dbo].[sp_estindex]           207       5  97.58%   186, 739-744
[dbo].[sp_hexadecimal]         11      11  0.00%    12-30
[dbo].[sp_help_revlogin]       52      52  0.00%    24-170
[dbo].[sp_helpme]              93       1  98.92%   337
[dbo].[sp_sizeoptimiser]      240      18  92.50%   145, 178, 226, 241, 661, 871, 926, 930, 934, 938, 1078, 1139, 1221-1226
TOTAL                         694      90  87.03%

Results for commit: a582480

Minimum allowed coverage is 90%

♻️ This comment has been updated with latest results

Copy link

@Imran-imtiaz48 Imran-imtiaz48 left a 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

  1. 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.
  2. 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.
  3. 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.
  4. Testing: Ensure that after adding this property, appropriate tests are in place to validate that the @verbose functionality behaves as expected in various scenarios.

@lowlydba
Copy link
Owner Author

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

  1. 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.
  2. 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.
  3. 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.
  4. 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!

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.

[Request] Add sp_help_revlogin
2 participants