Database

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 …

How to take compressed backup in SQL Server TIP #64

Problem:-  A good maintenance plan always said to take backup but sometimes it is very difficult to take backup of database just because of space constraint.We take backup but we don’t have enough space available.Solutions:  SQL server provided  the best way and gave us solution of compressed backup. Now how to take compressed backup let …

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 …

Grouping Sets–Good to know feature TIP# 60

  Grouping sets is one of the cool feature came in SQL SERVER 2008. Lets understand here with problem and solution. Problem:-  Suppose , We want  an aggregation result in a query with different groups. Firstly we want aggregated result on first column then combination of First & second column then other column combination. So, …

Find last statistics updated date detail ?–Maintenance TIP #59

  Problem:- One of the pain point in any SQL engineer  is “Performance”. There are various reasons due to which your SQL Server database is slow. One of the possible reason is your maintenance.   You don’t know when statistics last updated and take further step if those are not updated Solution:- Here we have simple …

Merge Statement one of the way to synch destination from source table TIP# 58

  Problem:-  Suppose you have a source table and one destination table and you want to synch destination table from source table. means if record is already exists then you need to update and the record with latest value and insert the record if record is not exists. Solution:-  Although there are various ways exist …