June 2009
Mon Tue Wed Thu Fri Sat Sun
« May   Jul »
1234567
891011121314
15161718192021
22232425262728
2930  

Month June 2009

July Presentations

I know of three presentations coming up in the next month that I thought I’d share with everyone, if only because I’m involved with all three.

The first is Andy Leonard’s presentation on Incremental Loads, Change Data Capture, and SSIS 2008 in scenic Columbus, OH. The event takes place at 6:30PM on July 9th at Battelle for Kids. Lest you think Andy will be in Columbus, he will be presenting via LiveMeeting. This means that you can attend via LiveMeeting!

Presentation the second is Aaron Alton’s presentation on Simple Data Change Tracking in SQL Server. This is a virtual presentation that is happening on July 15th at 2PM Eastern.

Finally, on July 23rd I will be presenting at the Central Ohio .NET Developers Group. The event starts at 6:00 PM and it located at Microsoft building on Polaris Parkway in Columbus, Ohio. My presentation is titled From Tables to Objects: Making Your Database Work With You – it’s all about using database features to enhance the quality of your ORM. There is no LiveMeeting available for this, but I will either be recording via Camtasia or else will record it after the fact.

Links for the week – 2009.06.26

SQL Server

Deploying Databases From Visual Studio Team System Database Edition Grant Fritchey has written an article about using Vistual Studio Team System Database Edition to deploy databases and database changes. If you haven’t taken a look at Data Dude, now is the time to do so, it’s a great product!

Declarative Database Development This is a nice introduction into how to develop using Data Dude (VSTS Database Edition).

Development

Fluent NHibernate And You Josh over at Computerist Solutions has a quick introduction via code snippets to Fluent NHibernate.

Stuff & Things

Implement Advanced “Siestas” for Improved Sleep I’m a big fan of naps. Any excuse to use them to improve my life is a fine by me.

Networking for the Shy Entrepreneur

Only 4 days left!

You know what? I don’t actually know how many days are left in the contest. All I know is that Bill Graziano just sent me an important email that I need to pass on to all 5 of my readers who aren’t my mom. (Hi mom)

There isn’t a lot of time left, but you still have a chance to win your PASS Summit registration, hotel, or one of a number of other cool prizes. If you don’t win, you can still go to PASS and spend time with me, or Brent Ozar, or Tim Ford, or Thomas LaRock or Blythe Morrow (Blythe is part of why PASS works). But, if eating waffles, bacon, or having treadmill races isn’t your cup of tea, there are a number of other reasons you might want to go to PASS this year.

Allow me to enumerate:

  • More than 160 top-quality sessions scheduled across 5 tracks and 14 pre/post-conference seminars (I’m an alternate presenter, bet you didn’t know that!)
  • Great chances to network with awesome people. There are even sessions to help you improve your networking skills like this one with Don Gabor.
  • A great lineup of top experts, authors, presenters, thought-leaders, and community influencers, including Kalen Delaney, Paul Randal, Kimberly Tripp, Itzik Ben-Gan, Kevin Kline, Greg Low, Louis Davidson, Steve Jones, Andy Warren, Brian Knight… and the list goes on and on (look, I stole that last line from some PASS copy, it’s 12:05 AM Eastern time, I’m not going to be all that original).

So, here’s how the contest works:

  1. Write 250 words or less about the best thing you learned at PASS.
  2. Send your submission or a link to your blog to contact@sqlpass.org with the subject line ‘Best Thing I Learned at PASS Summit

It’s really that easy. Check it out if you don’t believe me.

Point is, I’m going to be there.

Now, to find out how much time you have left, you need to

  1. open up SQL Server Management Studio (Express Edition works just fine).
  2. Open up a new window and paste the following code into the new query window:
    SELECT DATEDIFF(dd, GETDATE(), '20090701');
  3. Press F5 or CTRL + E or click Execute

You can enter three times, so enter three times. Three chances to win!

If you need help convincing your boss to send you, check out this great ROI or send them a letter or just send them the link to the conference agenda.

One thing I learned at PASS: it’s possible to include references to Krull, ballet, ice cream, and bacon in the same conversation.

Speaking in July

I’m presenting again! Woohoo!

On July 23rd, I will be presenting at the Central Ohio .NET Developer’s Group. The fun starts at 6:00 PM. I strongly suggest you bring large piles of money to throw at me.

What will I be speaking about, you might ask? (You’re probably not asking yourself this question because you already know I’m going to tell you.)

From Tables to Objects: Making Your Database Work With You

Time & Location

July 23rd at 6:00 PM, at Central Ohio .NET Developers Group located at the Microsoft building on Polaris Parkway in Columbus, OH

Abstract

A database is far more than a persistent object store for your application; it is capable of data validation en masse, aggregations, and creating different projections of data. By working with your database, rather than against it, it is possible to leverage all of the capabilities of a relational database to provide rich, high performance interaction with your application through an ORM. This presentation will discuss the finer points of building a full-featured data access layer using an ORM and the features of a relational database.

Goals

  1. Teach attendees about database features that make development easier – including views, sparsely populated tables, and user-defined functions and types.
  2. Empower the audience to solve object relational impedance mismatch using data modeling techniques and database features.
  3. Demonstrate how to integrate the database and object oriented software using a custom designed data access layer.

CBusPASS Meeting – July 9th, 2009

In two weeks, Andy Leonard will be presenting remotely for CBusPASS, the friendly Columbus PASS chapter.

Come pay us a visit. It will be a good time.

Here is the information from the CBusPASS website:

Topic
Incremental Loads, Change Data Capture, and SSIS 2008

Abstract
Change Data Capture is a new SQL Server 2008 feature. One benefit of CDC is data filtering for Incremental ETL in SSIS: only touching rows that are new, updated, or have been deleted! In this presentation I walk through enabling Change Data Capture in SQL Server 2008, then present an overview of an SSIS package that utilizes Change Data Capture to perform Incremental ETL.

Presenter

THE Andy Leonard

THE Andy Leonard

Andy Leonard is an Architect and manager with Unisys Corporation, SQL Server Database and Integration Services developer, SQL Server MVP, PASS Regional Mentor (Southeast US), and engineer. He is a co-author of Professional SQL Server 2005 Integration Services (Programmer to Programmer), Professional Software Testing with Visual Studio 2005 Team System: Tools for Software Developers and Test Engineers (Programmer to Programmer), and MCITP Self-Paced Training Kit (Exam 70-441): Designing Database Solutions by Using Microsoft SQL Server(TM) 2005 (Self-Paced Training Kits). Andy founded and manages VSTeamSystemCentral.com and maintains two blogs there: Applied Team System and Applied Business Intelligence . He also blogs for SQLBlog.com . Andy’s background includes web application architecture and development, VB, and ASP; SQL Server Integration Services (SSIS); data warehouse development using SQL Server 2000, 2005, and 2008; and test-driven database development.

Why are you going to the PASS Summit?

Colin Stasiuk asked a great question: Why are you going to the PASS Summit? But, more importantly, Colin hits on the all important question: how do you decide which sessions to attend?

This is going to be my second PASS Summit, so I’m not an expert on picking sessions, but I have an idea based on what worked well last year. Last year, I had an exhaustive list of sessions picked out. Then, when I arrived at the Summit I marked them all on my program, which I promptly lost. Brent was kind enough to give me his program. I drew stick people on it. I also didn’t attend a lot of the sessions I was planning on attending.

  1. I grossly underestimated my own abilities and ended up leaving sessions because I thought I could gain a lot. Don’t underestimate yourself. Challenge yourself. Pick sessions that you think there’s no way you can understand them. I attended Jimmy May’s presentation on Disk Partition Alignment with Brent. I thought I would be completely lost. Then I realized that a lot of the low-level disk information bore at least a passing similarity to inode structures in the ext2/ext3 family of file systems on Linux systems. Once I translated that knowledge I was able to follow along, roughly, and be challenged in my thinking.
  2. A lot of very smart, really great people gave me suggestions on sessions to attend. The friends I made at PASS helped me find sessions that would better fit what I wanted to learn about. They were right.

What am I going to different this year to make sure that I get the most out of the Summit? How can you do the same?

  1. Ask someone who has the job you want. Say you’re a database developer and you want to be a database architect. Find one. Ask them which sessions you might benefit from. Better yet, ask them “I want your job. Which of these sessions will help me get there?”
  2. Pick something you don’t know anything about and attend it. If you want to learn about something, learn through a trial by fire. But, like I said earlier, don’t underestimate yourself. If you know even the slightest bit about SSRS, an introduction to Report Builder 2 is probably going to bore you. Take a gamble and go to an intermediate session.
  3. Make a back up list. Make a list of sessions that sound like they would be very valuable to advancing your career path interesting. Pick things that sound cool. Pick features you haven’t played with. Learn some Business Intelligence mojo.

Honestly, I’m going to do all three of these things. There’s a lot that I want to learn. I know people who are already there. I’m going to pick their brains for how to get there. Just remember that you’re going to the Summit not just to learn, but to interact with your peers. Make sure you socialize, too. I still think I learned more sitting on the floor talking to Brent Ozar, Donald Farmer, and a few other people than I would have if I had gone to whichever session I originally planned to attend.

Links for the Week 2009.06.19

SQL Server

Why Object Databases will always be Tomorrow’s Technology Tony Davis (editor at Simple-Talk) writes the guest editorial over at SQL Server Central. He makes a great case why object databases don’t fit with most business needs (and why they likely never will). (Thanks to Grant Fritchey for finding this one.)

East Iowa SQL Saturday – Call for Speakers! That’s right, the East Iowa SQL Saturday is coming up and they need speakers. I shall be making the trip out there, and you should too. Submit sessions!

Free stuf SQL Server Courses & Software Free Stuff. Free Training. Free. Free.FreeFreeFreeFreeeeeeeeeeeeeEEEEEeeeee

Development

Top 10 Developer Interview Questions About SQL Server Brent Ozar put get together his top 10 list of questions to ask a developer about SQL Server.

Documentation is a necessary evil. Mike Walsh talks about the necessity of documentation while considering his shower soap.

Life After Loops Once I found how easy it was to do things with set-based operations in SQL, I found loops to be more than a little bit annoying. Well, Justin Etheredge has taken the time to show how this works with lazy evaluation and how this will work in the future (.NET 4.0) with parallel even lazier evaluation! Good times.

Stuff & Things

Thinking Differently Thomas LaRock, formerly known as SQLBatman, opines on problem solving and how, sometimes, you have to look at things sideways to find the easiest solution to the problem.

Andy Warren in his Tips on Getting Hired Part 1 Part 2 and Part 3 puts together some great… tips on… getting hired. The advice in here is job hunting gold. If you’re in the market for a new career, or just keeping your options open, there are a lot of great things to keep in mind.

Lifehacker Pack 2009: Our List of Essential Free Mac Downloads Free crap for the mac. ’nuff said.

Beer cart? Yes, beer cart.

When Less Reading is a Good Thing

Less reading is a good thing when you’re reading from a physical disk.

During some recent performance tuning, I stumbled across a little gem of a stored procedure that was producing between 4,000 and 11,000 physical reads every time it was called. The name? GetStateList.

It returns a list of state abbreviations. I’m not proud to say that I wrote it, but I have to come clean: I wrote it.

So, how did I fix this travesty of my youthful ignorance?

Well, it’s just a list of states, right? And it’s just all of the states from a couple of different tables. So, the easiest thing to do was to create an indexed, or materialized, view. Basically an indexed view is a view with a clustered index. Since a clustered index defines the physical order of data on the disk, the view is persisted to disk. When the underlying data changes, the data that is persisted to disk will change. Plus, you can supply other indexes on the view, just like it’s a table, which can make your queries run even faster.

Imagine, if you will, that you have a Location table full of data, as opposed to the empty one that we’re about to create.

CREATE TABLE Locations (
  LocationID INT NOT NULL IDENTITY(1, 1) PRIMARY KEY,
  ClientID INT NOT NULL,
  Name VARCHAR(34) NOT NULL,
  State VARCHAR(2) NOT NULL
);

So, we have a lot of locations. Each location is belongs to a client. Each location has a state. I want a list of allowed states for each client.

SELECT l.ClientID,
       l.[State]
FROM Locations AS l
GROUP BY l.ClientId, l.[State]

Well, that’s great, but that’s also the query that results in WAY too many reads. So, how do we go about fixing this situation?

The indexed view that I mentioned earlier, that’s how!

CREATE VIEW dbo.LocationStates
WITH SCHEMABINDING -- you need this, can't very well persist changes if the table changes
AS
SELECT l.ClientID,
       l.[State],
       COUNT_BIG(*) AS the_count
FROM dbo.Locations AS l
GROUP BY l.ClientId, l.[State]
GO

CREATE UNIQUE CLUSTERED INDEX CIX_Locations_ClientID_State ON LocationStates (ClientID, State);
GO

What’s up with that COUNT_BIG(*) in there? Well, any time you use an aggregate function, or aggregation, in an indexed view, you also need to make use of COUNT_BIG(*) (see the MSDN Link above for more info).

Once I created the indexed view, I changed my queries to use the indexed view:

SELECT State
   FROM dbo.LocationStates AS x WITH(NOEXPAND)
  WHERE ClientId = @client_id;

The WITH(NOEXPAND) hint forces SQL Server to use the indexed view. As I understand it, this is not necessary on Enterprise Edition. Since I’m on Standard Edition I cannot verify this, but I can verify that SQL Server would not use the indexed view until I supplied the hint.

What was the outcome of all of this? Well, instead of several thousand reads, this ended up taking 2 reads. Considering that this stored procedure gets called thousands and thousands of times a day, that’s a HUGE savings.

The downside to using an indexed view is that if the underlying data changes, the persisted view data has to be updated, so it’s best to avoid using indexed views on queries that change constantly.

Recent PASS Happenings

What’s new in PASS? Okay, that’s not truly what this is about. This is about what’s new in my little corner of PASS.

CBusPASS Meeting, June 11th

Last week the local PASS chapter met and Brent Ozar and I gave a recap of our Pain of the Week presentation – Developing Something for Nothing (SQL Server Express Edition and SQL Server Management Studio Express). The presentation went very well despite some bandwidth problems with LiveMeeting – audio glitches led to Brent sounding like a crazy evil robot a few times.

After the presentation, a number of local chapter members sat around and talked about what we have been working on and the things that we’d like to see presentations about in the future. It’s nice to take the time and connect with the local SQL community. I think, too often, we focus on getting a solid presenter and pulling everything off without a hitch rather than encouraging a sense of community. Last week’s meeting definitely had some hitches – pizza was late due to outside causes, there were Live Meeting audio issues due to bandwidth, we were in a different room due to scheduling conflicts. But, despite all of that (or because of it) we had a great meeting with a lot of interaction and community building. And, at the end of the day, isn’t that what having a user group is all about?

PASS Application Development Virtual Chapter

Yesterday, June 16th, the Application Development Virtual Chapter had its monthly meeting. Mladen Prajdic, author of the SSMS Tools Pack was kind enough to speak. The presentation was a huge success and we had 27 attendees tune in virtually for Mladen’s presentation: SQL Server 2008 for Developers. The presentation was recorded with LiveMeeting and will be available online for download in the next week.

Upcoming Presentations

CBusPASS

Next month, Andy Leonard will be presenting, via LiveMeeting, at CBusPASS. The topic of the presentation is Incremental Loads, Change Data Capture, and SSIS 2008 – Change Data Capture is a new SQL Server 2008 feature. One benefit of CDC is data filtering for Incremental ETL in SSIS: only touching rows that are new, updated, or have been deleted! In this presentation I walk through enabling Change Data Capture in SQL Server 2008, then present an overview of an SSIS package that utilizes Change Data Capture to perform Incremental ETL.

App Dev Virtual Chapter

Aaron Alton will be presenting for the Application Development Virtual Chapter about Simple Data Change Tracking in SQL Server – For many reasons, it is often advantageous to be able to track data modifications in SQL Server applications. Some businesses require change tracking for audit purposes, and application administrators often desire change tracking to maintain visibility into application interfaces.

In this presentation, Aaron Alton will look at the two most common methods of application data change tracking: DML triggers and SQL Server Change Tracking. Aaron will review the strengths and weaknesses of each method, and demonstrate the ease with which data changes can be recorded and retrieved.

Hope to see you all there!

PASS App Dev Virtual Chapter IMPORTANT UPDATE

Important update!

Due to several things, including my inability to calculate time zone differences that involve UTC and the vagaries of daylight savings time, the App Dev Virtual Chapter Live Meeting is going to occur at 2PM Eastern Time. That’s 11AM Pacific, 6PM UTC, and 8PM Central European Time.

If anyone is still confused by this, you are not alone. Wolfram alpha can help you. (Google can’t help you on this one, it gets confused.)

You can join the meeting at the appropriate local time and take part in the festivities.

Second important note: audio will be provided via computer, not telephone. I will endeavor to record this presentation and put it online for all to see.

This site is protected with Urban Giraffe's plugin 'HTML Purified' and Edward Z. Yang's Powered by HTML Purifier. 219 items have been purified.