What is fill factor? Fill factor is the value that determines the percentage of space on each leaf-level page to be filled with data. In SQL Server, the smallest unit is a page, which is made of Page with size Continue Reading..
Recently in a developer meet, I was asked a question that, “is there a simpler way to have a stored procedure output fill into a table without defining all columns, as simple as like * into #t ?” You must be thinking about OPENQUERY, Continue Reading..
Recently a few of developers started complaining about 100s of database in one instance, making them difficult to navigate in SSMS. This situation is quite generic in all development environment. So here we are going to do a little trick to hide all the databases Continue Reading..
We have been using different methods in SQL to convert row data into columns. Some time it’s just the requirement for data visualisation only. To fulfil this requirement mostly we use PIVOT, which is complex and lengthy. In this blog Continue Reading..
Checking a column existence in a table is very simple in SQL Server, but you should be careful while doing it on Azure environment. We simply ignore the performance consideration while writing SELECTs against systems tables/views/dmvs etc. Recently a stored proc started Continue Reading..
Recently a friend of mine asked me that how can he record his SQL Server service restart history in a database table, also would like to get some kind of notification email when the instance comes online after a server reboot or after the service Continue Reading..
Recently in one of my project I needed to write a script to fetch identity column values from unknown tables being passed as parameter to a stored procedure. In the database there are many tables and identity column names are Continue Reading..
If you have ever handled errors by using TRY-CATCH in SQL Server then you must be familiar with a function called ERROR_PROCEDURE(), which returns the stored procedure name when any error occurs during execution, and by using this function we write the procedure name with Continue Reading..
All we know that the system objects are residing in master database and they can be called from any other databases available on that instance, with the respective context. That’s cool, having an object at one place and being called from other databases without Continue Reading..
We are very much familiar with a system stored procedure called sp_helptext, which gets us the object definition on query window itself, but that sp is limited to procedures, functions, triggers, computed columns, views etc. So far there are no system Continue Reading..