SQL SERVER – FIX: SQL Profiler Error – Cannot Retrieve Trace Definition for SQL Server Version

As soon as I opened profiler and clicked on “connect” button, I was welcomed with below the message box. This is one of the funniest error message which I have seen from long time. There is no message!!! Let us see how to fix SQL Profiler Error.

Hitting OK on above, came to below message.

The version shown in the message 13.0.900 is the version of my SQL instance (SQL Server 2016 CTP) on which I was connecting. Here is the text of the second error message.

Read More

SQL SERVER – Unable to Start SQL Server – TDSSNIClient Initialization Failed with error 0xd

As a part of my passion, I do visit the forums and try to help. I contacted him personally via email and found an interesting situation. So, sharing it via the blog. I saw below post in a public forum about TDSSNIClient Initialization Failed.

Hi Experts,
I am not able to start the SQL Server service. Getting below error while starting SQL via configuration manager.

Read More

SQL SERVER – Error Msg 5042, Level 16 – The File ‘tempdev02’ Cannot be Removed Because it is Not Empty

As a SQL Server DBA you would know that sometimes it is possible to make mistakes with the database. Few of the time it can be corrected. Out of them, some are easy and some are difficult. I was running out of space on my VM and I started hunting for a bigger file on my machine. It was not difficult to find and recall that I added some files to the TempDB database while doing some testing. Here is the command to get details about the database file, which gave me Error Msg 5042.

Read More

PowerShell Script – Backup Every Database In SQL Server

Using scripts can be a powerful way to automate things that a GUI will fail in many cases. I was working with a client who wanted to write a PowerShell script that would help him automate his backups. This is a pretty simple requirement that can be easily achieved using SMO as shown below in my scripts. I have been using these scripts for a number of years at various places. Let us see how we can backup every database in SQL Server

Read More