SQL Browser
Job details
Name: | SQL Browser | |
Platform: | Sqlserver | |
Category: | Security | |
Premium package: | Security and compliance package | |
Description: | Checks if the SQL Server Browser is disabled. | |
Long description: | Checks if the SQL Server Browser is disabled. No recommendation is being given on disabling the SQL Server Browser service. | |
Version: | 1.2 | |
Default schedule: | 28 1 1 * | |
Requires engine install: | Yes | |
Compatibility tag: | .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & eng_inst_priv = 0 & (engine_edition = ‘Microsoft SQL Server’ | engine_edition = ‘Azure SQL Managed Instance’)] |
Parameters
Name | Default value | Description |
---|---|---|
return status | 1 | Return status value (ALARM – 2, WARNING – 1, or OK – 0) when the SQL Server Browser is ebabled. |
history threshold | 365 | The maximum number of days to keep statistics for in the historic tables. |
Job Summary
- Purpose: The purpose of this job is to monitor the status of the SQL Server Browser service on a SQL Server instance to determine if it’s disabled, which is critical for the operational security of the SQL Server environment.
- Why: This job is crucial because it verifies whether the SQL Server Browser service is disabled, which can have implications for the security and accessibility of SQL Server instances on the network. If the service status isn’t as expected, it may pose security risks or affect the discoverability and connectivity of SQL services.
- Manual checking: You can check this manually in the SQL Server instance by using the “sc qc SQLBrowser” command:
sc qc SQLBrowser
Job Description
The job periodically checks and records the start type of the SQL Server Browser service to see if it has been disabled (represented as 4 in the system). The job logs current values into a history table and a records output table for debugging or auditing purposes.
Implementation Detail
- The job uses three main SQL tables:
- dbw_sql_browser_info – Holds current value/status of the SQL Server Browser service.
- dbw_sql_browser_histr – Stores historical data of checks.
- dbw_sql_browser_output – Temporarily captures output from system commands.
- Procedures and configurations:
- A SQL procedure dbw_sql_browser_proc executes commands to retrieve the current status of the SQL Server Browser service using the Windows ‘sc’ command.
- The job manages SQL configuration settings temporarily enabling ‘show advanced options’ and ‘xp_cmdshell’ if they are disabled to perform necessary checks.
Job Dependencies
The job depends on several artifacts for its operation:
- Main Procedure: dbw_sql_browser_proc for executing checks.
- Support Tables:
- dbw_sql_browser_info – Tracks current service status.
- dbw_sql_browser_histr – Aggregates historical data.
- dbw_sql_browser_output – Logs command execution outputs.
Reporting and Visualization
- This job also includes a reporting component that visualizes:
- The output from the ‘sc qc SQLBrowser’ command.
- Aggregated statistics on the start type of the SQL Browser service over time in a bar chart format showing counts of checks against different service statuses per day.
Schedule and Version
- Default Schedule: The job is configured to run monthly (once every start of the month at 1:28 AM).
- Version: 1.2
- Company: dbwatch.com
Upgrade and Maintenance
- The job has an upgrade path from version 1.1 with modifications in the procedure to accommodate newer SQL Server conditions.
- Post-implementation cleanup ensures that old status records beyond a certain historical threshold (default of 365 days) are purged from the system.