Category Archives: SQL

How to Change Suspect Mode to Normal Mode in SQL Server Database

If you are reading this, you are desperately looking for solutions to change suspect mode to normal mode. It also means that your database has gone into the suspect mode. In that case, you have already experienced one of the … Continue reading

Posted in SQL | Leave a comment

Automation to list all TCP static and dynamic ports of SQL Server instances using PowerShell

I was asked by the reader on how to get all the port information of SQL Servers instances. As you all know that PowerShell is built on .Net automation framework. I would prefer PowerShell to design any such requirements than … Continue reading

Posted in SQL | Tagged , , | Leave a comment

How to automatically Discover SQL Server instances

DBAs have plenty of day-to-day tasks to do as part of the administration, but one overarching task is managing the entire SQL Server environment. To do this, the full SQL Server estate must be discovered and inventoried. To accomplish that … Continue reading

Posted in SQL | Tagged , , , , | Leave a comment

SQL Date functions in SQL Server

SQL date format functions like the DateDiff SQL function and DateAdd SQL Function are oft used by DBAs but many of us never took the time to fully understand these extremely useful features. For professionals just getting started with SQL … Continue reading

Posted in SQL | Tagged , | Leave a comment

Overview of DML Operations – SQL Delete

This article on the SQL Delete is a part of the SQL essential series on key statements, functions and operations in SQL Server. To remove a row from a table is accomplished through a Data Manipulation Language, aka DML statement, using … Continue reading

Posted in SQL | Tagged | Leave a comment

Overview of the SQL Insert statement

This article on the SQL Insert statement is part of a series on string manipulation functions, operators and techniques. The previous articles are focused on SQL query techniques, all centered around the task of data preparation and data transformation. The … Continue reading

Posted in SQL | Tagged , , | Leave a comment

SQL Pivot and Unpivot relational operatots

In this article, we’ll walk-through the SQL Pivot and SQL Unpivot operators and how they can be useful to transpose SQL Server data. Also, we’ll discuss both static and dynamic ways to use PIVOT and UNPIVOT relational operators that can … Continue reading

Posted in SQL | Tagged , , | Leave a comment

Overview of the SQL Update statement

In this article, we’ll walk-through the SQL update statement to modify one or more existing rows in the table.    After reading this article, you’ll understand the following topics covering how to use a simple SQL update statement on multiple columns … Continue reading

Posted in SQL | Tagged , , , , | Leave a comment

SQL Database Corruption: Causes, Prevention, Fixing Techniques

“I had a Database File and I want to attach this MDF file to SQL Server 2014. However, whenever I try to attach the file, I am receiving following error message : The header for file ….\MSSQL\DATA\xxxx_data.mdf’ is not a … Continue reading

Posted in SQL | Leave a comment