Troubleshoot 586 error message id with state 5 – The prepared statement handle 1 is not valid in this

Recently I worked with one of customer where in jTDS application getting an error 586 and in Profiler Trace we could see an exception with error message id : 586 State 5 with below text: The prepared statement handle 1 is not valid in this context.  Please verify that current database, user default schema, and ANSI_NULLS… Read more

Msg 13575 OR Msg 13542 error message while adding period columns

You may see following error message while trying to enable system-versioned temporal table and adding period columns for a table which contain data: 1st error message: Msg 13575, Level 16, State 0, Line 32 ADD PERIOD FOR SYSTEM_TIME failed because table ‘temporaltest.dbo.CUSTOMERINFO’ contains records where end of period is not equal to MAX datetime. 2nd… Read more

SQL SERVER 2016 installation failing due to MSVCR120 missing Update (EXCEPTION_ILLEGAL_INSTRUCTION)

I was working on one of SQL SETUP issue with my colleague Shaurabh Thapa where in SQL SERVER 2016 installation was failing. So we looked into the setup logs and in detail.txt we could see following information:   Detail.txt (01) 2016-10-10 17:25:48 Slp: Sco: Returning service process id 0 (01) 2016-10-10 17:25:48 Slp: Configuration action… Read more

SSMS behaviour if you have Cluster Shared Volume and C drive repeating while choosing location for backup\restore\database attach

Consider this scenario, when you try to attach, restore or taking database backup using SQL SERVER Management Studio GUI and trying to choose the location then you may see C: drive repeating.   So this behavior may raise questions like, is it by design behavior? Will this cause any issue? Which drive to choose? So… Read more

“Backup and Restore Events” standard database report do not show all backup failure events

While investigating backup failure related issue on SQL SERVER 2008 R2 I was trying to pull the backup failure related information using “Backup and Restore Events” report however interestingly I don’t see any failure reported there. I went back and tried to reproduce the issue by taking a 10 GB database backup on 5 GB… Read more

How to track inactive logins in SQL SERVER

Many customer asked me if there is any easy way to find the list of logins which are inactive and can be deleted hence thought of documenting this method using blog. You could go to SQL SERVER Property and then turn on “Successful logins only” to record login information in SQL SERVER ERRORLOG. It would… Read more