The Problem:
SharePoint is, of course, a monster of an application platform with many configuration quirks. As a DBA supporting a content database utilized by a SharePoint environment, I ran across a problem: After installing SharePoint, there is no way for the application administrator to tell the DBA the real database name.
The Reason:
During installation, an alias is created for the database. Unless you write that name down or name the alias something that reflects the database name, there is no clear way to determine the name of the database, either in the application or in the configuration files.
The Solution:
Since the solution was not particularly obvious, I’d like to share it, so that another DBA does not have to solve the issue at the worst possible time: an outage.
Read more ...
Your DBA is receiving complaints about a slow server at random periods throughout the week. How do you assess the environment and troubleshoot performance issues at different periods?
Using a series of PowerShell scripts, you can easily gather key statistics across your entire environment, and run the process several times a day to capture those statistics during different time periods and activity levels. The data is stored in a series of tables, which can then be used for alerting and trend reporting.
Read more ...
Recently, after assessing a client’s backup statistics, we discovered that over 20% of a client’s database instances had not been backed up. Before configuring backups for so many instances, we wanted to discover just how many databases were actually actively in use.
After investigating options, we developed the following query to detect database inactivity. The query uses the command sys.dm_db_index_usage_stats. The query returns the last accessed time for all indexes (including heap). Based on this, we are able to determine the last accessed time for each database. Any databases with a last access data beyond an agreed upon threshold (e.g. older than 1 week) can be flagged for follow up.
One Drawback: If the SQL Server service is restarted, last accessed stats are reset. So, this query is not useful for detecting database activity for servers that are frequently restarted. However, the query also returns the server restart date, which you can use to help you flag those restarts for further analysis.
Read more ...