lausser / check_mssql_health

Wenn du dich für Plugins (oder OMD oder allgemein Monitoring) interessierst oder von deiner Installation erzählen willst...die Tradition der deutschsprachigen Monitoring-Workshops wird wiederbelebt: https://discord.gg/jDfPZ63FcJ A plugin, which checks various parameters of Microsoft SQL database servers.
http://labs.consol.de/nagios/check_mssql_health
GNU General Public License v2.0
39 stars 28 forks source link

Update DBI.pm - really now #57

Closed LaXKo closed 2 weeks ago

LaXKo commented 3 weeks ago

This update improves connection stability and prevents issues with database names exceeding length limits, as encountered in some Sybase or FreeTDS configurations.

codeautopilot[bot] commented 3 weeks ago

PR summary

This Pull Request addresses an issue in the DBI.pm file where the syb_db_use() function was truncating database names longer than 32 characters when using the ct_command method. The solution implemented bypasses the DSN "database" parameter and instead uses an explicit "USE " SQL statement after establishing a connection. This change ensures that the correct database context is set without encountering truncation issues, thereby improving connection stability, especially in environments using Sybase or FreeTDS configurations with long database names.

Suggestion

Consider adding comments or documentation to explain the rationale behind bypassing the DSN "database" parameter and using the explicit "USE " statement. This will help future developers understand the context and reasoning behind this change, especially if they encounter similar issues. Additionally, ensure that any potential edge cases, such as special characters in database names, are handled appropriately.