Development · Performance Tuning

How to collected inventory for SQL Server using Microsoft Assessment and Planning (MAP) tool

Hi friends, We need to collect inventory for database migration as well as platform to set up environment for migration, development and testing. Is there any tool from Microsoft to achieve this scenario? Yes, we have Microsoft Assessment and Planning Tool (MAP) for it. From BOL: The Microsoft Assessment and Planning (MAP) Toolkit is an… Continue reading How to collected inventory for SQL Server using Microsoft Assessment and Planning (MAP) tool

Performance Tuning · Uncategorized

SQL Server Execution Plan Operator – Table Scan

In my previous blog we discussed about the different format of SQL Server execution plan. Now in upcoming blogs we will discussed about the most commonly seen operators we see when execution plan generates. In this post I will start the easy one that is Table Scan operator. As with the name of operator Table… Continue reading SQL Server Execution Plan Operator – Table Scan

Development · Performance Tuning · Uncategorized

SQL Server Execution Plan formats

Execution plan helps in knowing how a query gets executed and troubleshooting a query which is performing poor. In SQL Server execution plan can be of 2 types: Estimated Execution plan Actual Execution plan Execution plan can be viewed in 3 different formats: Text format XML format Graphical format We can choose the format on… Continue reading SQL Server Execution Plan formats

Development

Limitation of In-Memory OLTP in SQL Server 2016 – Sp_rename not allowed

Hi friends, one more limitation of In-Memory OLTP is SQL Server 2016 is that sp_rename is not allowed to change the name of in-memory OLTP objects. Sp_rename is a system stored procedure which allows to change the name of the user-defined objects like table name, column name, datatype of a column etc. in the current… Continue reading Limitation of In-Memory OLTP in SQL Server 2016 – Sp_rename not allowed

Development

SQL Server – How to retrieve SQL plans from Cache

Hi friends, in this blog post I will tell you how we can retrieve the SQL plan from the cache. In SQL Server there are multiple DMV (Dynamic Management Views) and DMO (Dynamic Management Objects) which can be used to retrieve the information about execution plan. Sys.dm_exec_query_plan is most commonly used DMO which is used… Continue reading SQL Server – How to retrieve SQL plans from Cache

Development

SQL Server – Rollback transaction completely in case of error

Hi friends, I recently found an issue while inserting data into table during transactions that transaction will not completely rollback if we use multiple insert statement in transaction. Let me give you a demo on this how to handle such situation. Create table Test_tran (               ID Int Primary… Continue reading SQL Server – Rollback transaction completely in case of error

Development

SQL Server – Conditions when value of @@error changes

Hi friends, when we do error handling in our SQL code we use different methods like TRY/CATCH, RAISERROR etc. to return the error messages. We also use global variable @@error to print the error value of the last T-SQL statement executed. But many folks doesn’t know that value of @@error gets reset with every execution… Continue reading SQL Server – Conditions when value of @@error changes