pointers, solutions and scripts for the SQL DBA
not intended to replace common sense

4/12/2010

LINQ doesn't like TINYINT PK IDENTITY fields

So, to save space (and it is a bit archaic, but why not) I sometimes use tinyint and smallint for the PK IDENTITY columns in small lookup tables.

For example, a list of counties or congressional districts for a state government project.  Will never be more than 255 or negative.  Tinyint.  1 byte instead of 4.

Yeah yeah, I'm aware that in the long run, that adds up to very little saved disk space.  Very little.  Still, I can't help but be tight with data type constraints.  Its not like I will be allowing every column to be declared varchar(8000), much less varchar(max), even when "disk space is cheap".  Its not like I'll be using bigint instead of int when I know I'll never get more than 2 billion records. 

Except that when your developers want to use LINQ, you can't use a TINYINT IDENTITY column. Stupid error.

Changed it, begrudgingly, to smallint.  2 bytes instead of 4.  Grrr...

Read more:
http://linqinaction.net/blogs/roller/archive/2007/11/28/linq-to-sql-doesn-t-support-identity-tinyint.aspx

4/09/2010

SSRS Web Site vs Web Service

Had an issue yesterday where installing Microsoft CRM couldn't find the reporting server.

The error was a 404, essentially, the CRM install couldn't see the Reporting server.

The issue was that we had copy-pasted the Reporting Services web site

http://domain.com/Reports

instead of the Reporting Services web service

http://domain.com/ReportServer


Duh.


In conclusion: don't do that.


"The best way to find yourself is to lose yourself in the [web] service of others." -Mahatma Gandhi [and this blogger]

4/05/2010

TFS Sidekicks

I've do a lot of DB Pro solutions and DBA code reviews at my office and on client sites. This free sidekick add-on for Visual Studio has been invaluable.

http://www.attrice.info/downloads/index.htm

Whenever I want to look at files included in a TFS changeset, or all files checked in to TFS for one work item, or comparison across changesets, I find this Visual Studio plugin extremely handy.

For example, I use it for Code Reviews, to compare changes across all Changesets for a given Work Item. It has a quick function to compare the latest version of a file to the latest version of a file before this work item. Ridiculously efficient, I've forgotten how I'd do this before.

Very quick install, low-impact. I imagine it could be very handy for lots of different Source Control-related sources and diffs in Visual Studio that you just can’t do with Visual Studio alone. Anyone else use it?

4/02/2010

Twitterpated

Follow this blog's auto-twits- @SQLTact
Follow the Baton Rouge SQL Server User Group- @BRSSUG
Follow Baton Rouge SQL Saturday (August 14, 2010!)- @SQLSatBR

"Whoever said that things have to be useful?" – Evan Williams, co-founder of Twitter