Log In | Register

Ahmad Osama, Author at SQL Server Blogs, Events, Webcasts, Videos, SQL Server learning & education Ahmad Osama, Author at SQL Server Blogs, Events, Webcasts, Videos, SQL Server learning & education



Ahmad Osama

About Ahmad Osama

Ahmad Osama is a MCP Database Administrator/Developer. Ahmad started his career in the sales industry working as database executive; responsible for report writing, application development and basic database administration. In 2008 he joined World Fashion Exchange as Database Administrator. While in this role he focused on troubleshooting and performance tuning. In 2010 he joined The Perfect Future Technologies and has been awarded as best new comer and expert of the year working as database administrator on one of largest political database in the world. Ahmad has experience in database administration, SSIS, performance tuning, VLDBs and web development. When not working on SQL Server, he can be found glued to his Xbox.

Conference and Networking benefits

Conference and networking are two sides of the coin. In today’s world of advanced technology, one can attend conferences, online and benefit from them. Every other big conference whether it’s Microsoft’s Build or Apple’s WWDC is available live over the internet. The conference sessions are even available for download for later use. With that […]

SQL Server new query window shortcut

Shortcuts help you to do your work swiftly and with increased productivity. In this blog we’ll look at new query window shortcut every SQL Server geek should know


Window + R -> ssms.exe
Open SQL Server management studio

Open a new query window

Move among open query windows

Execute All or selected queries

Ctrl […]

SQL Server error message 3159

One of my friends working on SQL Server 2000 to 2005 faced following issue.

Msg 3159, Level 16, State 1, Line 1
The tail of the log for the database “databasename” has not been backed up.
Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lose.

SQL function to get weekday – weekly calendar

In this blog post we’ll look at a way to list out all week days of a week a particular date belongs too. This can be even referred to as weekly calendar. This comes handy in reporting. A SQL function to get week days of particular date is given below

First, create the below function […]

Insert multiple rows using single Insert statement in SQL Server

This is a very basic problem sometimes newbies struggle with. I have seen developers writing 10 different insert statements to insert 10 rows in a table.  This can be simplified in multiple ways as shown below



Ahmad Osama

Like us on FaceBook  |  Join the fastest growing SQL Server group on FaceBook

Follow me on Twitter |  […]

Constraint to limit VARCHAR max character length in SQL Server

A business need may arise to limit a VARCHAR column to a certain length. Consider a scenario where in an application has a 10000 character limit for a column. The VARCHAR(max) is the suitable data type choice for this column. However a VARCHAR(max) column is not limited to 10000 characters. In that case we […]

SQL Server unattended installation 2014

SQL Server unattended installation or silent installation can be done using the configuration.ini file. The SQL Server installation GUI application saves the setup instructions in a configuration.ini file which it further uses to install selected options. The same file can be modified and passed as a parameter to setup.exe command to do a silent/unattended installation.

The […]

Primary Key and Unique Key difference in SQL Server

Primary and Unique Key both enforce uniqueness of columns on which they are defined. Then where do they differ? They differ in following way

-          A primary key doesn’t allow null value wherein a unique key allows one null value.

-          A primary keys purpose is to uniquely define a row in a table wherein unique […]

Locking hints SQL Server

Locking hints are used with SELECT/INSERTS/UPDATE/DELETE statements to enforce or change the default locking behavior.  Given below are some of the locking hints available in SQL Server


The ROWLOCK hint tells query optimizer to lock rows (KEY level locks) instead of taking PAGE or TABLE level locks when reading or modifying data. A row lock […]

Difference between UNION and UNION ALL in SQL Server

Difference between UNION and UNION ALL is one of the most asked interview question.

UNION and UNION ALL both combine result set from two or more queries into single result. The difference is that UNION ALL doesn’t remove duplicate rows from the combined result set.

The below snapshot demonstrates the use of UNION operator.

The UNION operator […]