The Bit Bucket

Rett Syndrome Research needs help

Very proud of my daughters this week. As some of you will know, one of my daughters has Rett syndrome. It’s a rare chromosomal disorder that basically only impacts girls. (Boys can get it but they usually do not survive long after birth). Girls develop fairly normally up to about 12 to 18 months of age, then regress markedly. As it affects only about 1 in 10,000 girls, it’s not the sort of thing that gets much research funding.

2014-11-25

Allowing specific non-sysadmin users to query group membership for a login

I had a lot of good feedback about my post the other day about how to query group membership for a given login.

One tricky question was about how you could let a specfic user be able to find the group membership for another login, without the user being a sysadmin to run the code. Doing that is a bit trickier but can be done by creating a certificate, a login from the certificate, then assigning permissions to that login, and finally applying a digital signature to the procedure using the certificate.

2014-11-19

Identifying Columns with Out-Of-Row Data

In a previous post, I was talking about how changing data types from the older ntext, text, and image data types to the current nvarchar(max), varchar(max), and varbinary(max) data types doesn’t achieve the same outcome as having defined the tables that way in the first place, unless you subsequently rebuild the tables.

I also had a question about how you can find out which columns still have pointers to out of row data. Unfortunately, finding that out doesn’t seem so easy and it would vary row by row in the table.

2014-11-17

MVP ComCamp Round 2

The regional MVP folk have organised another MVP ComCamp event. Sessions are available in 5 different languages and many sessions are being broadcast. (Most are English) There are two tracks:

  • Enjoy the PC Life
  • Embrace Cloud and Apps

If you’d like to attend any of these events, you’ll find more detail here: http://mvp.microsoft.com/en-us/comcamp.aspx

The list of sessions is here:

Live Webcasts Nov 17 - Nov 21, 2014

56 live webcasts, in 2 tracks, featuring MVP speakers will be broadcasted during ComCamp Week, covering a wide range of topics about Office applications and Cloud.

2014-11-17

Table Rebuild Avoids Excessive Lookups After Data Type Change

I’ve run into a situation at a number of sites where the following occurs

  • An excessive number of logical page reads during query execution
  • Changes have occurred from ntext, text, or image data types have been replaced by nvarchar(max), varchar(max), or varbinary(max) data types, as part of a clean-up of deprecated data types.
  • Rebuilding the table greatly reduces the number of page reads and the customer is puzzled about why.

One of the causes for this situation is related to how the data in these columns is stored. The ntext, text, and image data types defaulted to having their data stored out of row. The row contained a pointer to where the data was located. By comparison, the nvarchar(max), varchar(max), and varbinary(max) data types default to storing data in-row where possible.

2014-11-17

Any Australian up for doing a short MVA course?

OK, been doing a bunch of MVA courses as part of the local Microsoft AU dev div heroes campaign. I need to find 5 Australian citizens who have done at least one of the courses below, and get their email addresses.

You don’t have to do the whole of any badge. For example, you could do SQL Server 1, SQL Server 2, or SQL Server 3.

Anyone up for it? Or do all of the ones for a badge for a figurine. They are cute. There are some t-shirts on offer too.

2014-11-16

Big Changes for Visual Studio and .NET–Where is the Ecosystem for SQL Server?

Lots of big changes for Visual Studio and .NET were announced today.

The biggest items are:

  • .NET becoming open source
  • Microsoft work to help move .NET onto Linux and Mac
  • Visual Studio 2013 Community Edition
  • Visual Studio 2015 Preview available
  • Lots of integration for Xamarin developers including Xamarin install from within Visual Studio

The one that I like most here is the Visual Studio 2013 Community Edition. We’ve had Visual Studio Express for some time but it was very limited. In particular, it blocked any attempt to extend it with plug-ins. Plug-ins are where the real creativity with the product can appear. The new community edition is full-featured and free for all except enterprise application development.

2014-11-13

Perth SQL Server User Group–November 27th–High Availability–Love to see you there

Looking forward to delivering another session for the Perth SQL Server user group. Will be the night of 27th November. Here’s the session details:

“Understanding SQL Server High Availability Options

While more and more systems need ever increasing levels of availability, many customers are confused about when to use each of the high availability options provided by SQL Server. In this session, Greg will provide a detailed overview of log shipping, database mirroring, failover clustering and availability groups, with recommendations on where and when to use each, and the pros and cons of each option. He will discuss all currently-supported versions of SQL Server from 2008 to 2014. If you are confused about SQL Server HA options, this session is for you.”

2014-11-13

Naming CHECK and UNIQUE Constraints

I’m not a fan of letting the system automatically name constraints, so that always leads me to thinking about what names I really want to use. System-generated names aren’t very helpful.

Primary keys are easy. There is a pretty much unwritten rule that SQL Server people mostly name them after the table name. For example, if we say:

image

A violation of the constraint will return a message like:

image

2014-11-12

RESOLVED: Missing Checkboxes in Table Memory Optimization Advisor in SQL Server 2014

I was teaching a SQL 2014 class yesterday and the students were using the current SQL Server 2014 Enterprise (on Windows Server 2012 R2) template.

We were using the Table Memory Optimization Advisor (right-click a table in Object Explorer within SQL Server Management Studio). I had several people in the class that reported that when they got to the primary key migration screen, that they couldn’t interact with the screen because the checkboxes were not present in the displayed list of columns.

2014-11-06