Joe Webb Blog

Musing and observations about SQL Server, other technogies, and sometimes just life in general

Does the order of columns in an index matter?

A single column index is fairly straightforward to understand. You may have heard it compared to the index in the back of a technical book. When you want to find some information in the book, say DBCC INPUTBUFFER, you turn to the index in the back of the book and look up DBCC INPUTBUFFER. Read more →

Using CROSS JOIN to generate test data

To prepare for an upcoming technical presentation, I need to create some test data to use in a demo. I'm planning to show how different T-SQL programming techniques directly affect SQL Server's efficiency in resolving the query. Read more →

Using sp_MSforeachtable and DBCC CLEANTABLE to reclaim space

In a prior posting, I demonstrated how the undocumented sp_MSforeachtable stored procedure can be used to iterate through each of the tables within a database. In a separate posting earlier this year, I also demonstrated how the DBCC CLEANTABLE command can be employed to reclaim space that was once consumed by variable length character columns that have been subsequently dropped. Read more →

Creating a Notification Services Instance

Even though SQL Server 2008 does not include the Notification Services (SSNS) component, it seems that companies still consider SSNS a very viable option for upcoming notification projects. I'm planning to write a blog or SQLTeam article in the near future to address some questions I'm frequently asked. Read more →

SQL Server error messages

If you've worked with Microsoft SQL Server in a production environment for any length of time, you've undoubtedly been exposed to a number of different error messages. For example, many of us are probably familiar, too familiar perhaps, with error 1205 - the dreaded "you've been chosen as the victim of a deadlock" message. Read more →

Think holistically about securing your systems

A recent ZDNet article highlighted an event where two United Kingdom officials demonstrated just how vulnerable a new, but not updated, Microsoft Windows system can be. It took one official from the Serious Organized Crime Agency a mere 11 minutes to discover the target computer on a wireless network, crack into it using open source tools that are commonly available on the Internet, and steal password files. Read more →

The undocumented sp_MSforeachtable procedure

As database administrators or developers, sometimes we need to perform an action on all of the tables within a database. For example, we may want to disable check constraints for all tables prior to loading a bunch of data; or perhaps we need to run DBCC CHECKTABLE for every table in our database to ensure the integrity of all pages and structures that make up the tables. Read more →