RML Utilities and SQL Server 2012

T-SQL
I'm working through some code that I haven't touched recently and I'm running it for the first time on a SQL Server 2012 server. The code is a way to load information into the RML utilities and I started hitting errors. First, I hit an error that my server couldn't be connected to, but thanks to Erin Stellato (blog|twitter), I was able to quickly fix that. Then I hit this: Number of processors: 2 Active proc mask: 0x00000003 Architecture: 9 Page size: 4096 Highest node: 0 Package mask: 0x00000001 Processor(s): 0x00000001 Function units: Separated Package mask: 0x00000002 Processor(s): 0x00000002 Function units: Separated Processors: 0x00000003 assigned to Numa node: 0 -Ic:\performancetuning\rml.trc -oc:\bu -SDOJO\RANDORI Using language id (LCID): 1024 [English_United States.1252] for character formatting with NLS: 0x00060101 and Defined: 0x00060101 Attempting to…
Read More

Why Tune Queries?

PASS, T-SQL
It's just a query against the database. If things are running slow, buy some more memory, a faster CPU or get a few more disks. Right? Seriously, tuning queries is just a pain and there's no clear evidence that writing them correctly or tuning them has a major impact. Right? Yeah, I'm being facetious. I've spent a considerable portion of my career  trying to make T-SQL code run faster. The fact is, throwing moneyhardware at the performance problem can fix it in many instances. At least temporarily. But let's face it, you're constantly changing the code. There are new queries, changes to old queries, it's always changing. The code is probably the most volatile aspect of a database system because it is the easiest to change. So, you may think…
Read More

Interviewing a DBA

PASS, SQL Server, T-SQL
I'm not a fan of trivia style interview questions. Yes, I ask a few because you have to in order to immediately eliminate the completely unqualified applicants. Even those types of questions, in my opinion, need to be focused on concepts and not syntax. The reason we have the Books Online with SQL Server is because you shouldn't have to memorize every possible command along with all their parameters. Want to know how to write a MERGE query? Look it up. What does a MERGE query do? That you ought to know. I think concepts are important. Questions about the recovery models within SQL Server aren't trivia about the system, they're trying to get to your understanding of how point in time recovery works. I don't really like posting interview…
Read More

PASS Elections 2012

PASS
Yeah, it's that time again. And we have a magnificent slate of people running. I mean truly amazing and wonderful people. I personally know each and every one of them. I've worked with them or watched them work on projects over the years. PASS has a true embarrassment of riches this time. Which... is problematic for me. I know them all. I respect them all, but I have to pick and choose... I can't do it. I really can't. Yeah, I'll finally vote. I ultimately put pen to paper (or, really, click on some boxes on the screen) and make my mark. I believe in democratic processes and every vote really does count. And if you're voting, regardless of who you vote for, your vote is not "thrown away." That only happens…
Read More

Conference in Florida: SQL Server Live

Misc
This conference is new to me. In case it's new to you, I thought I'd take a moment to point it out. Mostly because I'll be presenting there and I love talking to anyone who has actually read any of the blather I post on my blog. If you want to get together in the land of sunshine in December (don't tell Mrs. Scary but I'm looking forward to this one, winter in New England is awful), then click here to register. If you do it now you save $500, so it's a good time to take care of it. I'll be presenting two different sessions. One is on backups and restores for the accidental DBA. I'll go over the important stuff to get you started protecting your company's data…
Read More

SQL Server vs. Oracle

PASS, Redgate Software, SQL Server, T-SQL
Just so we're clear, I use SQL Server. I like SQL Server. But, this doesn't mean I have anything against Oracle. It's fine. It's good. But, I know very little about it. However, throughout my career I've found myself needing to understand it better. Either because I'm trying to train Oracle people to better use SQL Server and I need to be able to speak a little of their language to facilitate translation. Or, because I'm defending SQL Server on some technical point that the Oracle people don't completely understand. Or, because I've said something stupid about Oracle in my ignorance. Now, you know how busy you are, and I know how busy I am, so I doubt either of us has the time we really need to learn Oracle…
Read More

These People Are Exceptional

Professional Development
I should know. I was one of the judges of this year's Exceptional DBA of the Year award. I had to read through tons and tons of submissions and help to arrive at a final list of people who truly personify the concept of both the DBA and the exceptional person. They are all worthy of your votes, but you can only pick one. Today is the final day to make your voice heard and get your influence in. Please, let us know who you think the Exceptional DBA of the Year is by clicking on the link, now, and voting.
Read More

Please, Call Me Richard

Professional Development, T-SQL
I presented a session at the SQL Saturday event in Oklahoma City last weekend. The event itself was pretty good. The organizers put everything together pretty well and the venue was quite nice. Plus, since I grew up in Oklahoma (Tulsa), it was a chance to go home. The event was good, but my presentation went a little downhill. The name of the session is "Top Tips for Better Stored Procedure Performance." I should rename it to just say "T-SQL Query Performance" because it's not focused on stored procedures, but on queries. The presentation is 1/3 talking about how you write your queries, naming syntax, formatting, etc. The second 2/3 is all about common mistakes made in writing T-SQL such as using NO_LOCK everywhere, nesting views, joining and nesting multi-statement…
Read More

24 Hours of PASS, Fall 2012

PASS, SQL Server, T-SQL, Tools
It's time to get your learn on again. The schedule for the Fall 24 Hours of PASS is up and ready for registration. This is the Summit preview session, so many (most, all) of the speakers are showing off some of what you can learn at their sessions at the PASS Summit 2012 itself. It looks like a pretty exciting bunch of topics given by some of the best professionals in the industry. I'll be presenting Three Ways to Identify Slow Running Queries on September 20th, 1400 GMT. This is just a sub-set of the information that I'll be presenting during my all day pre-conference seminar, Query Performance Tuning: Start to Finish. The full seminar I talk about how to measure the performance of your systems, identify which queries are…
Read More

Another Execution Plan… In the Cloud!

Azure
A couple of weeks ago I posted about how different execution plans look when using the Azure Management Portal. I promised to look at a more complex plan and here we are. The query looks like this: SELECT * FROM dbo.Agent AS a JOIN dbo.Resource AS r ON a.AgentId = r.AgentId JOIN dbo.MovieStageResource AS msr ON r.ResourceId = msr.ResourceId JOIN dbo.MovieStage AS ms ON msr.Movieid = ms.MovieID AND msr.MovieStageDefinitionId = ms.MovieStageDefinitionId JOIN dbo.Movie AS m ON ms.MovieID = m.MovieId WHERE a.AgentId = 42; I didn't go nuts in creating a crazy complex query. I just wanted to see a standard set of different operators to see how things changed. As before, I'm working off a controlled database that has identical structures and data in both the Azure database and my…
Read More