SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Kapil Blogs

Hi friends, I am Kapil Singh Kumawat and I am from Jaipur in Rajasthan, India. I have been working with SQL Server for the last four and a half years and am currently working with Cognizant Technology Solutions as an SQL Server Developer. I have experience in performance tuning, SSIS, data migration, database designing and writing queries. My other interests include travelling, watching football and listening to music.

How to attach a new data disk to Azure VM using Azure Portal

In this blog I will tell you how we can attach a data disk to an Azure Virtual Machine using Azure Portal. We can also upload an existing data disk from on-premise data center to Azure and then add that disk as data disk to a VM. Navigate to the…

Read more

0 comments, 478 reads

Posted in Kapil Blogs on 5 January 2017

How to backup local SQL database and restore to Azure SQL database

Hi friends, recently I was finding a way on taking backup of local database and restore that database to Azure SQL database. I found that there is new option available to generate the scripts for Microsoft SQL Azure database using Generate Scripts option. Let me walkthrough step by step on…

Read more

3 comments, 716 reads

Posted in Kapil Blogs on 28 November 2016

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…

Read more

0 comments, 811 reads

Posted in Kapil Blogs on 30 September 2016

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…

Read more

0 comments, 431 reads

Posted in Kapil Blogs on 28 September 2016

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…

Read more

0 comments, 726 reads

Posted in Kapil Blogs on 14 September 2016

Importance of Database Backup In SQL Server

Overview To save any organisation from any big future loss, one needs make a proper strategy or disaster plan that will save them in their hard time. When working with critical data it becomes very necessary to backup organisation data. In any organisation, for an administrator it is very important…

Read more

0 comments, 428 reads

Posted in Kapil Blogs on 1 September 2016

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…

Read more

0 comments, 415 reads

Posted in Kapil Blogs on 21 July 2016

Getting started with In Memory OLTP in SQL Server 2016 – Part 1

In Memory OLTP (Hekaton) introduced in SQL Server 2014 is a new database engine component which is optimized for OLTP workloads to achieve the performance by storing data in memory and accessing data from memory. Memory optimized tables can be accessed using Transact –SQL. When memory optimized tables are accessed…

Read more

0 comments, 613 reads

Posted in Kapil Blogs on 18 July 2016

Limitation of In-Memory OLTP in SQL 2016 – Create Index is not supported

Hi friends, in this blog I will discuss another limitation of In Memory OLTP in SQL Server 2016. Once you create a table you cannot create any index created on memory optimized table using CREATE INDEX statement. So to create indexes you need to create them with column definition of…

Read more

1 comments, 397 reads

Posted in Kapil Blogs on 17 July 2016

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…

Read more

1 comments, 591 reads

Posted in Kapil Blogs on 13 July 2016

SQL Server – String_Escape function in SQL Server 2016

Hi friends, in SQL server 2016 another string function that introduced is String_Escape. This function can escape special characters within texts and will return text with escaped characters. Syntax STRING_ESCAPE (expression, type) Currently only the value that is supported for type argument is ‘json’ only. If you try to specify…

Read more

1 comments, 1,143 reads

Posted in Kapil Blogs on 10 July 2016

Microsoft SQL Server 2016 Certifications Announced

Hi friends, Microsoft has announced the release of three new SQL 2016 certifications, based on the different working database professional’s roles. MCSA: SQL 2016 Database Development can be achieved by passing the following two exams: 70-761 – Querying Data with Transact-SQL 70-762 – Developing SQL Databases MCSA: SQL 2016 Database…

Read more

1 comments, 691 reads

Posted in Kapil Blogs on 8 July 2016

SQL Server – STRING_SPLIT function in SQL Server 2016

Hi friends, in SQL server 2016 another new function STRING_SPLIT gets introduced which helps in splitting the character expression using separator. Previously, to do this type of work we need to write some code or function to split the character expression but in SQL 2016 function STRING_SPLIT reduce that work…

Read more

0 comments, 520 reads

Posted in Kapil Blogs on 6 July 2016

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…

Read more

0 comments, 560 reads

Posted in Kapil Blogs on 26 May 2016

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…

Read more

3 comments, 1,290 reads

Posted in Kapil Blogs on 24 May 2016

SQL Server – Change in Identity() Property during transactions

Recently while working on a scenario I found that in case of transaction if you are doing insertion operation on a table and when you Rollback your transaction then identity value that is inserted to the table is not rolled back. Let me demo you on this scenario using an…

Read more

0 comments, 480 reads

Posted in Kapil Blogs on 16 May 2016

Find Unused Database Objects in SQL Server

Overview SQL Server, a relational Database management system is mainly used for storing and retrieving data whenever required by its user.Among the several database objects present like Tables, Views, Procedures, and Functions, there are many unused database objects present in the SQL Server Database. User must be able to find…

Read more

0 comments, 486 reads

Posted in Kapil Blogs on 12 May 2016

SQL Server – Cleaning Procedure Cache for a particular database

HI friends, most of the time we used DBCC FREEPROCCACHE to clear the procedure cache, clears the specific plan from cache by specifying plan handle or SQL handle. DBCC FREEPROCCACHE does not require any parameters. To clear the plan cache we just need to execute below query – DBCC FREEPROCCACHE…

Read more

1 comments, 504 reads

Posted in Kapil Blogs on 11 May 2016

SQL Server – Row Level Security in SQL Server 2016 – Part 3

Hi friends, continuing from the previous post in this post we will learn how to add the blocking predicate to restrict the users to perform DML operation (INSERT, UPDATE, DELETE) for others users data. If you want to read the previous posts on Row Level Security you can find those…

Read more

1 comments, 932 reads

Posted in Kapil Blogs on 9 May 2016

SQL Server – Row Level Security in SQL 2016 – Part 2

Hi friends, in my previous post we have learnt how to implement Row Level Security feature in our database. You can find the link of Part1 here: https://kapilsqlgeek.com/2016/05/03/sql-server-row-level-security-in-sql-server-2016-part-1/ In this post we will discuss more on Row Level Security and see what will happen if we give users DML operation…

Read more

1 comments, 1,395 reads

Posted in Kapil Blogs on 5 May 2016

Newer posts

Older posts