Category Archives: SQL Azure

SQL AZURE pricing (PROS | CONS) – How costly is to have SQL Database on a Cloud?

Hosting a Microsoft SQL Server Database on a cloud is very cheap, Anyone can afford to have a SQL Server database in Microsoft Cloud Environment. The cost starts from $5 per month, yes Microsoft has an 100 MB option, which costs only $5 a month. Currently many customer / Business managers are unaware of this [...]

250+ SQL Queries Interview Question Answers

SQL Interview Queries Question / Questions Answers This is a never ending topic and there is no limit to questions that all depends on profile and interviewer. I am trying my level best to divide questionnaire based on Experience in Query Writing skills 5+ Years of Experience (Expert) 2-5 Years of Experience (Intermediate) 1-2 Years [...]

50 Database Optimization TIPS

Database Optimization TIPS helps any system to perform work efficiently and quickly. SQL Server Performance tuning is very wide subject and there are a lot of different pieces to troubleshoot a poor performing application. Connectivity / Network Server Hardware Operating System SQL Server Database Query The basic principle of Optimization / Tuning is Profile First [...]


SQL Server Database Log File has grown exponentially over a period of time and now causing DISK space issue, how to reduce | Shrink Log file SQL Database (.ldf) size? Steps to truncating log files and shrinking your database Get logical / physical name of your database log file (LDF) Truncate LOG File Shrink LOG [...]

Optimization Tips

Database Scheme Optimization Tips Devote the appropriate resources to schema design. Separate online analytical processing (OLAP) and online transaction processing (OLTP) workloads. Normalize first, denormalize later for performance. Define all primary keys and foreign key relationships. Define all unique constraints and check constraints. Choose the most appropriate data type. Use indexed views for denormalization. Partition [...]

How to Shrink Database File ?

SQL Script to shrink a unused space from a database file. — ***********************************************************************************/ — Description : SQL Script to shrink a non used space from a database — Compatibility : 7.0+ — This Script should be executed in master — ***********************************************************************************/ use <database name> go — Knowing information about database file sp_helpfile go — Shrinking [...]

How to trace Deadlock in SQL Server ?

What is a DEAD LOCK in SQL Server? When two or more transactions conflict in such a way that each is waiting for the other before they proceed. For instance, Transaction A might have a lock on Record 1 while trying to write to Record 2, while Transaction B has a lock on Record 2 [...]