File Group backups are great when working with very large databases (VLDB’s) that have been partitioned. Typically when I come across File Group backups implemented in production the database is using the full recovery model. With the full recovery model you can specify individual file groups for backup. A very common backup strategy for VLDB’s […]
Category: Query Tidbits
How to check for last SQL Server backup
As a database professional, I get asked to review the health of database environments very often. When I perform these reviews, one of the many checks I perform is reviewing backup history and making sure that the backup plans in place meet the requirements and service level agreements for the business. I have found a […]
SQL Server Installation Date
I have been working on a project recently to collect system metrics of a SQL Server environment. One of the items that came up that would like to collected is the date that SQL Server was installed on the server. In doing a quick search on where this property would be located I found that sys.server_principals […]
What is Page Life Expectancy (PLE) in SQL Server
Being a production DBA means having to quickly look at a SQL Server and diagnose issue with it. We know that a quick look at perfmon or task manager can tell us of high CPU usage, but what is a good way to quickly look at proper memory usage. Checking out the Page Life Expectancy […]
SQL Server – Cannot resolve collation conflict
A friend of mine contacted me through email today having a very common problem with a query he had written. He received an error, “cannot resolve collation conflict for equal to operator”. Early in my career I had experienced the same issue so I quickly searched my code snippets and found where I had used […]
How to restore the tail end of a transaction log
Have you ever tried to restore a backup over an existing database and receive an error stating the tail of the log for the database has not been backed up? Many times if you are just restoring a database into a development environment you don’t care so you just restore WITH REPLACE and move on. […]
Find the version of the Master DB from a backup
Try researching recovering the master database online and you will see countless references to having to have SQL at the same version and builld level as the backup of the master database. Since most folks probably don’t have a routine in place to record the version number each time SQL server is patched we need […]
Collect Database File Size with Powershell
I decided to start monitoring the amount of free space in my database files so that I can make sure all my databases are set to auto grow by the right amount and to monitor the amount of free space so I can schedule the expansion of the files rather than let them auto grow. […]