Archive

Archive for the ‘SQL Server’ Category

PowerShell Script to Send Email (multiple recipients)

February 15, 2013 14 comments

In this article I will try to wrap how to PowerShell to manage your SQL Server Notifications. And this is very much regular scenario for most of the SQL Server DBA’s to generate notifications when issues arise. There are many ways that we can handle these notifications, but one of the simplest and most reliable and the most common way is email notifications. Read more…

Count number of rows in stored procedure

October 12, 2012 Leave a comment

              Many a times in our daily life of a SQL development/DBA profile, we have to spend our day across stored procedures, and we need to find out how many rows are there in any stored procedures, especially when we have to do some analysis or while  we have to review any stored procedure for evaluation or estimation, the very first thing which comes in everyone’s thought is, how big is the stored procedures the following are the simple ways to get the approximate number of rows in stored procedure. Read more…

Finding and removing hidden characters in your data using dynamic T-SQL

October 5, 2012 1 comment

Today I was struggling with one issue which keeps my SSIS package failing in one of the data imports.And came across one of the blog. The problem was a conversion problem from varchar type to float and I kept getting the following error:

Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to float.

However, my data was numeric I checked it many times… or was it really 100% numeric?

Apparently there are some crazy hidden characters that you cannot see when you just glimpse at data. One of the best ways to find out if your data has some non-numeric characters in it is by running a simple query.

Read more...

SELECT * Vs SELECT Column Name in SQL Server Query

September 2, 2012 4 comments

People always keep saying do not use SELECT * exercise SELECT <column names> instead. But no one put more light on this and this becoming myth in SQL Server and other database management systems. Here are couple of reasons why should we avoid SELECT * and go with SELECT <column names>

Read more…

Power Pivot and Power View now available in Excel 2013.

August 1, 2012 1 comment

In Excel 2013, much of that functionality, including the infrastructure that supports it, is built directly into the Data Model in Excel. Without installing a separate add-in, PowerPivot and Power View add-ins are installed by default. But they are not automatically enabled.  You have to do some menu/dialog box acrobatics to turn them on, but it’s a one-time set-and-forget requirement.

If you’d like to try it yourself, click through File|Options|Add-Ins|Manage COM Add-Ins|Go… and then enable the add-ins by checking them off and clicking OK.

Read more…

SET QUOTED_IDENTIFIER ON/OFF and SET ANSI_NULLS ON/OFF

June 9, 2012 Leave a comment

Most of us use those statements while creating stored procedures and functions. most of us don’t know what is the significance of those statements and how they are useful.

SET QUOTED_IDENTIFIER ON/OFF

Read more…

Understand Response Time vs. Total Time in SQL

June 8, 2012 Leave a comment

Response time is the time it takes for a query to return the first record. Total time is the time it takes for the query to return all records. For an interactive application, response time is important because it is the perceived time for the user to receive visual affirmation that a query is being processed. For a batch application, total time reflects the overall throughput. You have to determine what the performance criteria are for your application and queries, and then design accordingly.

Read more…

%d bloggers like this: