Blog Archives

Determining a setting for Cost threshold for parallelism

The cost threshold for parallelism option specifies the threshold at which SQL Server creates and runs parallel plans for queries. SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan

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

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

Clearing a Single Plan from Cache

Most of you guys know that you can clear all cached plans using DBCC FREEPROCCACHE. In SQL Server 2008 you are able to clean a single pan from cache. The query below helps you to find the plan. There is

Posted in Administration, Scripts

Default trace security auditing [SQL Server]

The Default trace enabled can provides us valuable information about the running server, but it isn’t well-documented. What is the default trace? The default trace is enabled by default in SQL Server and is a minimum weight trace which consists by

Tagged with:
Posted in Scripts, Security

Alert – Databases do not have Transaction log backups

The SP below sends alert when there are no transaction log backups in the last 90 minutes.

Tagged with: ,
Posted in Alerts, Backup, Scripts

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