Rajat Jaiswal

How to determine free space on each fixed drive of server machine using SQL SERVER ? TIP #75

  When you do  SQL Server maintenance one of important aspect is available space on server drive because your SQL SERVER data is dependent on space . Now what you need to do to get free space from each drive ? Just create a simple job which run on daily basis which send you space …

How to determine Meta data or result set information of a stored procedure /trigger ? TIP # 73

  Sometimes it may require that you don’t know what will be output of  a stored procedure ? what kind of result set it return ? In such case SQL SERVER provided a new DMV statement which is sys.dm_exec_describe_first_result_set_for_object. In other words if we want to know result set’s meta data then we can use …

How explicitly insert default value ? TIP #72

  Suppose, sometimes you just need  entry in the table with all the default values. For example you have a Student table which looks like as below CREATE TABLE #tmpStudent (StudentId INT IDENTITY(1,1),                          FirstName VARCHAR(100) DEFAULT ‘RAJAT’,                          Course    VARCHAR(100) DEFAULT ‘MATHS’)   Now , suppose for in some situation we need just default entry for …

How to take differential backup ? TIP #67

Friends,We were discussing backup from last few post. Now lets take a look one more feature of backup which is differential backup.Differential backup  is backup after last full backup. Before taking Differential backup  it is a mandatory condition to take full backup.Differential backup can speed up your recovery process or we can say restore process.In …

Oh! I forgot When I took last Database Backup ? How to determine this? TIP # 66

  In last few tips TIP #64 & TIP #65  we get information  how to take backup & How to ensure it can be restore? Now lets me share some more information related to backup. Problem:-   Sometimes , we are interested to know when last backup is taken for particular database ? Solution:  The first …

Converting Row to Column use Pivot feature TIP #62

  Problem:  Sometimes we may require to convert row data to column. we require pivot view of data. Solution:  Lets understand this by an example below I am using a table variable which have few columns like  Employee, Amount, Month and year. Lets define and create some sample data here. DECLARE @tblEmployee AS TABLE (Employee        …

Database Diagram support object cannot be install error-SSMS TIP# 61

  Problem:-  It is general problem that you are interested in generating the database diagram of a database and when you right click on database diagrams folder of database and try to create a new database diagram you get following error as shown in below snap. Solution:- The above snap says that you are not …