User configuration defined in this section will never be replaced by subsequent SQLWATCH updates.
Data collection relies on SQL Agent jobs. The jobs' schedules can be modified to fit specific requirements.
Data retention is executed by Agent job
snapshot_type has its own retention defined in table
This approach allows setting different retention for performance data, disk utilisation, query performance and son on.
Default retention periods:
SELECT * FROM [dbo].[sqlwatch_config_snapshot_type]
Disk Utilisation Database
XES Long Queries
XES Query Processing
Disk Utilisation OS
Performance counters collected by SQLWATCH are defined in table
[dbo].[sqlwatch_config_performance_counters]. Collection of individual performance counters can be set using the Boolean
collect column. Disabling the default performance counter collectors will stop them from being shown on the default dashboard. New collectors can be added to the list if required.
Please note the
instance_name is dynamic and contains actual names of objects i.e. database names. The collection definition takes this into account with a dynamic approach:
Literal valid instance name i.e. 'Elapsed Time:Total(ms)' or ''
Will translate to literal 'Elapsed Time:Total(ms)' or '' Not e that instance name must a valid instance
Will only include '_Total' instances. This is useful if we only want to collect high level aggregates and are not interested in low level objects i.e. database
Will not include '_Total' instances, i.e. it will collect any other instances for this particular
To start collecting data from a remote instance, add a reference to the configuration table:
sql_instance and hostname
sql_instance is what
@@SERVERNAME returns on the remote instance and this is what gets logged in the remote tables and
hostname is the physical host name to connect to. Most of the time they are the same unless you are connecting via IP (no DNS records) or you are connecting to SQL Server on Docker, which has different IP and
sql_port Optionally you can specify non standard port to connect
sqlwatch_database_name Name of the database where SQLWATCH is deployed on the remote instance. Default is SQLWATCH.
environment Custom label to group servers into specific environments in the PowerBI report.
is_active Whether to include instance in the collection or not
last_collection_time and collection_status Are populated during the collection from the remote instance and indicate last collection time and the status.