AppDynamics for Databases
2.9.x Documentation
Appd tocbox | ||||||
---|---|---|---|---|---|---|
On this page:
|
Common metrics that DBAs and storage administrators want to track are how much space a database consumes at a given time and database consumption over time. These metrics can indicate when an individual database begins to consume excessive disk space and by analyzing these metrics you can also better forecast future storage requirements.
...
Code Block | ||
---|---|---|
| ||
SELECT database_name = DB_NAME(database_id) , total_size_mb = CAST(SUM(size) * 8. / 1024 AS DECIMAL(8,2)) , data_size_mb = CAST(SUM(CASE WHEN type_desc = 'ROWS' THEN size END) * 8. / 1024 AS DECIMAL(8,2)) , log_size_mb = CAST(SUM(CASE WHEN type_desc = 'LOG' THEN size END) * 8. / 1024 AS DECIMAL(8,2)) FROM sys.master_files WITH(NOWAIT) GROUP BY database_id |
You can schedule this SQL to run as a custom alert that returns tabular data. For example,
The results of this Custom SQL Alert can trigger an email, if Alert Type is set to Information Only (trigger email) or if Alert Type is set to Normal.
...
For example, the following shows that the first two columns of data are charted.
The following is a collection of articles on the web for the Microsoft SQL Server platform which contain SQL that you may find useful for creating custom SQL alerts for your environment. You can enter the SQL in the Custom Alerts SQL text box as described in Alert on Performance Metrics.