LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Checking for NULL values in all columns that allow NULLS in all the tables

This post is based on a question I answered earlier today, someone wanted to check all columns that allow NULL for NULL values in all tables. The reason people might want to do this check is that they want to make all the columns not nullable in a database (after all we all know that developers hate NULLs). The Stored Procedure below is based on the code that George Mastros wrote for the following blog post: Search all columns in all the tables in a database for a specific value

Read More...

SQL Server Forums – Helping to build a knowledge base

Welcome to another day of the Community Service week for SQL University. Jes Borland (Blog | Twitter) wrote an excellent class yesterday on the SQL Community and areas that help connect us all. Today we’re going to move on into the service parts of the SQL community and show how we can keep building the community. I’d like to thank Jes again for helping author todays topic on technical forums.

Read More...

Review: NHibernate 2 – Beginner’s Guide

The people at Packt publishing asked me to review NHibernate 2: Beginner’s Guide by Aaron B. Cure. This book is for anyone who uses NHibernate. Who this book is written for This book is for new and seasoned developers of .NET web or desktop applications who want a better way to access database data. It is a basic introduction to NHibernate, with enough information to get a solid foundation in using NHibernate.

Read More...

SQL Server and the Auto Close Setting

Today I woke up to a little over a hundred emails from one of my database servers letting me know that my resources were jumping around like a kangaroo. Actually, more like a boxing match with one… In the mix of those emails I also had alerts thrown stating, _[database_name_withheld] has a status of Suspect, Cleanly Shutdown_ I actively monitor the state of the database being open or closed (which also shows status of suspect, recovering etc…) I recommend the same so you catch these situations.

Read More...

SQL Server and High Availability

Welcome to the last class of HA / DR week for SQL University. It has been a great week discussing these topics with all of you. We recapped those classes in order to highlight the key points over the week yesterday. So far we’ve covered a great deal but really have only scratched the surface of SQL Server features for HA and DR. Today will be another scratch in the surface regarding the High Availability points for SQL Server.

Read More...

How to clean a table from badly named column names

Someone gives you a backup of a database, you restore it and the first thing you notice is that the column names have percent signs and underscores in them. It would be easy to fix this if it was one table but in this case there are hundreds of tables. The solution is to loop over information_schema.columns, find all the columns that have those characters and then rename those columns by using the sp_rename procedure.

Read More...

SQL University – Recess time!

The recess bell just rang for SQL University HA / DR classrooms. While all of the SQL kiddies are running around the playground and playing with the things they have learned over this semester, the chalkboard is going to get a workout. Image courtesy of Bart Simpson Chalkboard Generator and linkback to Jeff Smith excellent article Over the last week we’ve gone over a lot regarding HA and DR. The first day we defined situations and the key factors that are needed to be successful in obtaining secure data services and high availability of those data services.

Read More...

Using Multiple jQuery UI Sliders on a Single Page

I had a bit of frustration lately when dealing with jQuery UI’s slider widget, more specifically when trying to deal with many on the same page. I wanted to follow the same pattern shown in the example for snap to increments where I have a div for the slider, and the value is actually set to a text input for easy form submission. The individual elements look something like this:

Read More...

Log Shipping for cheap DR

Welcome to day three of HA and DR week of SQL University. Today we are going to look at cheap DR. Yes, setting up DR can be inexpensive. The best part of this strategy is it comes along with most of the editions of SQL Server. The method is Log Shipping. Log shipping (LS) has a bad name in the Disaster / Recovery (DR) world. There are concerns with the ability to fail back to primary sites in the case of disasters, and LS is often thought of as a maintenance intense setup along with file mess.

Read More...

T-SQL Tuesday – Give me my cores SSIS 2008!

I’m jumping into the T-SQL Tuesday fun this week. The very well known, Jorge Segarra (blog | twitter) is hosting the fun this time around. It is a busy week at that with SQL University writing and everything going on in the SQL Community. The SQL Server 2008 (R2) hottest, most favorite new feature topic had me wanting to throw SSIS out there once more and show off the Data Flow Engine changes.

Read More...