Blog LogoBlog Logo

Tag: SQL Server

All tags

Aggregate of columns, not rows

In SQL Server it is very easy to aggregate a value across many rows. You simply just write something like this: SELECT MAX(SomeColumn) FROM SomeTable This will...

— 11 Jul 2017

DROP/CREATE vs ALTER on SQL Server Stored Procedures

We have a number of migration scripts that modify the database as our applications progress. As a result we have occasion to alter stored procedures, but...

— 15 Oct 2013

Tip of the day: How to tell why your app couldn’t log on to SQL Server

When you get a log in failure on SQL Server the message you get back from SQL Server Management Studio, or in a .NET Exception is vague for security. They...

— 26 Jul 2013

Optimising clustered indexes in SQL Server 2008

I've just found a script on another blog to go through all the clustered indexes in a SQL Server database and rebuild them in order to reduce fragmentation and...

— 06 Aug 2012

If you really must do dynamic SQL...

I may have mentioned in previous posts and articles about SQL Injection Attacks that dynamic SQL (building SQL commands by concatenating strings together) is a...

— 21 Sep 2009

Tip of the Day #5 (SQL Server memory usage)

You can limit the amount of memory that SQL Server uses by using the sp_configure stored procedure. By limiting the amount of memory that SQL Server is...

— 20 Jul 2008

Spatial Operations in SQL Server 2008 (Katmai) - Union and Convex Hull

CODE EXAMPLES IN THIS POST WORK WITH THE NOVEMBER 2007 CTP (CTP 5) OF SQL SERVER 2008. Say you would like to create a polygon out of a group of points. One way...

— 15 Dec 2007

Contradictory messages

While attempting to create a database project in Visual Studio 2008 against a SQL Server 2008 database I got a rather odd error message. The dialog used to...

— 08 Dec 2007

Inserting geometry through a .NET Application

THIS POST REFERS TO THE NOVEMBER 2007 CTP (CTP 5) OF SQL SERVER 2008 Following from my previous posts ( Getting started with Spatial Data in SQL Server 2008 ,...

— 06 Dec 2007

Getting started with Spatial Data in SQL Server 2008

THIS POST REFERS TO THE NOVEMBER 2007 CTP (CTP 5) OF SQL SERVER 2008 This post is probably going to be a wee bit random. After the running around over the last...

— 01 Dec 2007

SQL Exception because of a timeout

You think it would be easy to find information on exactly what error number a SqlException has when the command timed out. But, it isn't. MSDN , for all that...

— 23 Jun 2007

Oh No! More on SQL Injection Attacks

I've not written about this in a while becuase it seemed that people were getting the message. But today I was asked, on Code Project , "I am wondering why...

— 22 Jun 2007

SQL Injection Attacks and executing dynamically created SQL

There is a very important difference between EXEC[UTE] and sp_executesql that anyone who executes dynamically generated SQL statements ought to know. Typically...

— 22 Jun 2007

SQL Injection Attacks and Some Tips on How to Prevent Them

Introduction Security in software applications is an ever more important topic. In this article, I discuss various aspects of SQL Injection attacks, what to...

— 23 Apr 2005