Blog Archives

Finding Implicit Column Conversions in the Plan Cache

I’m just sharing with you guys a script to find all implicit data type conversions associated with mismatched data types in a specific database. It’s pretty handy when you are either developing or coding reviewing. More details here: http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/01/08/finding-implicit-column-conversions-in-the-plan-cache.aspx

Tagged with: , , ,
Posted in Administration, Performance tuning, Scripts

Sargable queries – Using indexes effectively

It’s really important to have effective indexes in your database, but also equally important to ensure that yours queries are written properly to use these indexes effectively. So, one thing that we always need to keep in mind is to

Tagged with: ,
Posted in Performance tuning, Tips

How to list all objects and indexes [SQL Server]

Today I had to list which objects belongs to which filegroup. It’s a simple and useful script that you can take from system catalogues: sys.filegroups, sys.indexes, sys.database_files and sys.data_spaces. Take a look this sample In the next post I’m going to share

Tagged with: , ,
Posted in Scripts, SQL Server Tips

How to monitor Timeout and Changes Roles from Availability Groups with Alerts

Agent alert can send alerts by email when occur some action/timeout between databases in your Availability Group Environment. It allows you to become proactive. The following script shows how to create these alerts. You can also configure to execute another

Tagged with: , , , , ,
Posted in Administration, Alerts, AlwaysOn, Scripts

Repository of White Papers – SQL Server

Like a good reader, I highly recommend that you read these white papers. These links contain much more knowledge that I can provide here. https://www.sqlskills.com/sql-server-resources/sql-server-whitepapers/ http://social.technet.microsoft.com/wiki/contents/articles/13146.white-paper-gallery-for-sql-server.aspx That’s it! Have fun.

Tagged with: , ,
Posted in SQL Server Tips

Lookup All File Sizes, Status, and FileName for all Databases

This script can help you find some details in all databases.

Tagged with: , ,
Posted in Scripts, SQL Server Tips

How do I find a value anywhere in a SQL Server Database

The query below will search all fields in all tables for a specific value. Enjoy it!

Tagged with: , ,
Posted in Scripts, SQL Server Tips