SQL Server Data Tools – SQL70001

You get an SQL70001 when you attempt to build a database project inside Visual Studio.

Read more No Comments »

NewID() within a user defined function in SQL Server

You try to use NEWID() in a UDF in SQL Server 2008 but you get an error that stops you.

Read more No Comments »

Get table size in KB in a single resultset

I’ve written a script that will tell you how much space each table in your database is using up.

Read more No Comments »

Move database file to a new location

Moving a database file to a new location is a common task that if done incorrectly can cause massive headaches. Here is a quick overview of how to perform this task.

Read more No Comments »

Move an existing table to a new filegroup

Sometimes you want to download a table from your live system into a testing environment, but don’t want to have to pull the whole database down. Moving a single table to a new filegroup makes this sort of task much easier as you can just backup and restore the filegroup into an existing database. Here is the script to move a table to a new filegroup.

Read more No Comments »

SQL Server changes varbinary and adds a zero

Wierd problem that has a very simple fix.

Read more No Comments »

Trigger recursion – Prevent triggers firing themselves in SQL Server 2008 R2

Trigger recursion can be the cause of very hard to find bugs. Luckily it is easily prevented.

Read more 4 Comments »

Catching circular references in recursive table models

So you have a recursive table model with parent/child relationships. Unfortunately with this model circular references are possible and can wreak havoc in your application. Here is how to prevent them.

Read more No Comments »

List of SQL Server 2008 R2 Collations

A complete list of all collations available in SQL Server 2008 R2 (there’s a lot!).

Read more No Comments »

Using computed columns in SQL Server 2008

I’m going to have a quick look at computed columns in SQL server 2008 today and give a quick overview of how to create them and how they work.

Read more No Comments »

© 2017 Garry Passarella. All Rights Reserved. Facebook Twitter Twitter