-->
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.

Archives: May 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, 498 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,238 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, 432 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, 450 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, 463 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, 889 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,347 reads

Posted in Kapil Blogs on 5 May 2016

SQL Server – Row Level security in SQL Server 2016 – Part 1

Hi friends, in SQL 2016 several new security features gets introduced which will help users to protect their data in many ways. Today, I will discuss new security feature Row Level Security (RLS) which implements the security inside the database itself, not at application level. Suppose we have some critical…

Read more

2 comments, 357 reads

Posted in Kapil Blogs on 3 May 2016