Tim Ford(WWW, Twitter) tagged me. This meme is all about what you would do if you were trapped on a deserted island with nothing but a laptop and aircard. Here is an excerpt:
So You’re On A Deserted Island With WiFi and you’re still on the clock at work. Okay, so not a very good situational exercise here, but let’s roll with it; we’ll call it a virtual deserted island. Perhaps what I should simply ask is if you had a month without any walk-up work, no projects due, no performance issues that require you to devote time from anything other than a wishlist of items you’ve been wanting to get accomplished at work but keep getting pulled away from I ask this question: what would be the top items that would get your attention?
Well, first I would have to set camp, kill The Others, and salvage the wreckage of Oceanic Flight 815. But after I would ferment coconut juice so I could have drinks on the beach. Priorities, right?
So after a couple of months of drinking, surfing(waves and pr0n), fishing, and basically being an all around beachbum I would do this:
Study up for the Oracle Certified Professional exams.
I should be doing this now but I have trouble finding time and motivation. I have the books, study material, and an Oracle lab environment in the cloud. I have been pondering why I find it easier to put my head down and learn the new versions of SQL Server but procrastinate on Oracle. I have come to the conclusion that it is the fact that I do not use books with SQL Server. I usually learn all of the new engine feature before any books are written. I guess I just need to get more hands on with Oracle.
Design a set of default policies for new SQL Server 2008 installations.
In SQL Server 2008, we have policy based management. I want a set of default policies that guide people into best practices. For example, preventing a new database from being created with 1MB autogrow. The policies should mostly cover server and database settings. Schema oriented policies could vary between dev teams and should be handled by them.
Powershell as my default administration method.
I got into a powershell kick for a while but I lost interest. I need to give up the whatever GUI and do all administration through powershell. That is how I learned TSQL. Today, I use the GUI when it is a couple of clicks versus lines of TSQL but I could do it if I needed to. If I give up all MMC snapins and other GUI’s, I might spend a little extra time with powershell at first but it should pay big dividends in the long run.
The Others:
Brent Ozar(Twitter)
Grant Fritchey(Twitter)
Thomas LaRock(Twitter)
I am tagging the following:
SQLChicken
SQLFool
Jeremiah Peschka
I didn’t say it. :) However, I must say it is interesting prose. You can visit the site here and read up on her, Visual Studio Guy, Windows Master and the other members of “The Source Fource”. Might I add that Capt. Varchar made it to 2nd base but she won’t call him back.
Oh well, it is all her loss.
A keen motorbike enthusiast, SQL Server Gal spends her free time and energy looking after her beloved Harley Davidson, called Data Drive. She spends Sunday afternoons challenging the speed barrier and enjoying the natural beauty of the countryside. But with her feisty, alternative take on the world, SQL Server Gal is a biker chick with a difference. Her vast knowledge and language skills mean that she has an answer to every question. And despite her glitzy life as a member of the Source Fource, she still uses her extraordinary memory skills to help others realize their ambitions.
Read more.
Control Z
This post is inspired by the #famouslastwords thread on twitter today. If you are doing a major, minor or any change on a production system, have a rollback plan. This will probably go beyond restoring from backup especially if the data is large. From someone who has put in 24 hour+ shifts, plan and test as much as possible.
I am not NULL!
Adapted from OfficeOFFline.
You might be a geek if…
The stole this from the #youmightbeageek conversation going around twitter yesterday. Funny stuff. The original post is here.
The T’aint
If you don’t get it, bless your heart. If you do, don’t cry foul because you do not learn this phrase in Sunday School. Besides, it is ALWAYS the network!
Quick and to the point. This is a satirical and risqué blog on technology\gadget\microsoft\RDMS. Heck, anything is fair game. Some have already been offended but the great thing about the internet is you can click “back” and never return. To quote Brent, “Some people like Bill Cosby, some prefer Eddie Murphy, and a few like both.” You like it or don’t, we are just going to do our own thing.
Remember everything we post is NSFW in some corporate environment but a lot of it will fly in laid back shops. All posts are meant to be humorous though they may be crude or juvenile. Some funnies just out right fail.
The chefs include:
Mystery man extraordinaire: Wilbur Applewood, aka BaconBitsNBytes on Twitter
Brent Ozar, aka BrentO on Twitter
Jason Massie, aka StatisticsIO on Twitter
Tim Ford, aka SQLAgentMan on Twitter
Tom LaRock, aka SQLBatman on Twitter
Brent and SQLBatman both have posted better run downs.
So if you are feeling adventurous, check it out(Post RSS, Comment RSS, Subscribe by email, Twitter).
Technical post on SQL Server and related topics will resume here.
What happens in Seattle doesn’t stay in Seattle. I could not take pictures during the day because <nda> and <nda> cannot be announced yet. However, database diapers is fair game.
Anyway, here is part 1. Video next.
Click.
Here is the link the the original post if it doesn’t syndicate right.
Ninja Fog
The cloud has been all the buzz this week. Paul makes a prediction, Denis talks about the challenges, Steve chimes in and the register reports that Microsoft plans to release a full featured SQL Server to cloud. I have talked about this before but I got nothing but ninja fog today.
This comic was adapted from OfficeOFFline.
The Senior DBA
I am astounded by how often I see a problem that I know nothing about but fix it after finding the answer in a search. I get more high fives for being a good search engine user than a good DBA. On the flipside, I learned this by asking dumb questions and getting sent back a google search link.
The comic was adapted from OfficeOffline.
The Interview Question
Yes, this really happened. He didn’t say “Duh” but he was so confident that he might as well have.
I got a nice little surprise in my inbox today: The first reader submitted Captain Varchar comic from Rod Colledge of SQLCrunch.
I have written about this twice. I pushed it here and I toned it down after the facts came in from PDC. TJay Belt also had some commentary on it here today.
The comic does raise another off topic but interesting point. Apple’s desktop market share has been gaining ground. What happens when SaaS makes the browser the OS? Yes, another stretch but that is where some “experts” think we are heading.
Check all the other geek graffiti @ oddee
Guess who the victim of this deadlock is?
On the technical tip, the "end all be all" of deadlock troubleshooting can be found here.
This post was inspired by the SQL Quiz going around that that Chris started, while humorous, can help us learn from each others mistakes.
Over the years, I have gone from a mental project plan to notepad to excel to MS project. My success % has increased and fire fights have decreased for major changes. I recommend it.
A Mental(ly Disturbed) Note
The comic template was adapted from OfficeOFFline.
So Chris Shaw called me on a SQL Quiz. I like it. It is so much less painful to learn from someone else's mistakes than your own. Here are the details.
<snip>I started to think about this and I am going to try to start a game of tag. So here is the way it works, for many new DBA’s they may not realize that all of us have made mistakes and that our mistakes can be… rather stupid. I challenge each of the people I tag in my blog to post as least one mistake that they recently made I will start by describing 2 mistakes that I made. One of my mistakes was as a junior DBA and one about 6 months ago. The point of this game is to in no means embarrass ourselves or discredit ourselves. But more of a learning experience from our mistakes type of a deal.</snip>
<snip>
I started to think about this and I am going to try to start a game of tag. So here is the way it works, for many new DBA’s they may not realize that all of us have made mistakes and that our mistakes can be… rather stupid. I challenge each of the people I tag in my blog to post as least one mistake that they recently made I will start by describing 2 mistakes that I made. One of my mistakes was as a junior DBA and one about 6 months ago. The point of this game is to in no means embarrass ourselves or discredit ourselves. But more of a learning experience from our mistakes type of a deal.
</snip>
Before I start, let take this opportunity to look at what could result from a DBA’s mistake.
No pressure, right?
1.
The first big mistake I made was pretty bad. I almost gave up SQL Server. It was right after SQL Server 7.0 came out. A new customer was trying to move there data to their hosted application. It was a few tables. <Lightbulb> Hey, that sounds like a good use for that new DTS thingymabobber <Lightbulb /> So I go through the DTS wizard and it fails after creating the schema. I run the wizard again and it works EXCEPT I got the source and destination backwards. Now, they have empty schemas on both sides. Since the source was their development environment, they didn’t have backups. Of course.
What I learned: Always check for backups. No matter what you do, have a backup you can trust. That goes beyond disk backups sometimes. Copy them to somewhere on the network if you are working on the storage. Do a SELECT INTO before you do that adhoc DELETE. Srsly, don’t be that guy.
2.
We were having ongoing disk IO issues. Later on that night, I am adding a disk array. However, while poking around I discover that the stripe size of the existing data drive is 8k. It looks like I can easily “migrate” it to 64k. I quote migrate because that is what it says in the HP management software. That doesn’t sound destructive does it? Psst, it is. A few hours later, the database had been restored but we were sector aligned and had a had a 64k stripe size. That doesn’t sound so bad except the application cannot afford a couple hours of down time even for a free 10% of disk performance.
What I learned: Don’t be a cowboy. Up until then, it was on the job training. I learned it as soon as it broke and I had to fix it. It is a good way to learn but a bad way to DBA. All changes should be planned, tested, executed or rolled back. A cowboy DBA may shine 99% of the time but that one time can blow the SLA for the year.
Runner ups:
Who am I calling out? You. If you are reading this, I am throwing down the gauntlet. I shall name names too by picking on the recent commentators.
K. Brian Kelly
Marlon Ribunal
Mladen
Ted Malone
Rhys
Tom
Jimmy May, Aspiring Geek
Michael O'Neill
Ludovico Caldara
Adam Machanic
Aaron Lowe
I was also asked to plug, http://sqlfool.com , by someone other than Michelle so I will call her out too.
Once again, I was struggling for a Varchar(MAX) topic and twitter came through. This comic is based on these two tweets.
Update: Anarchy has erupted on twitter. Brent blogged it here.
BrentO If yo momma was a table, she'd be a heap. #SQLputdownsFri, Oct 31 12:31:24 from mobile web
jeffrush @BrentO If she was a datatype, she'd be a BLOBFri, Oct 31 12:37:41 from OutTwit
Yo Mamma is a SQL Server
This template is based on Office OFFline.
Disclaimer:
Just because you can does not mean you should and even if you should, use with care. For example, you will have no friends after a day or so of updating your facebook status every time a tlog backup runs on your farm. There are also many security concerns to consider. That said, I can think of a few uses for SQL Server Web 2.0 mashups and I am not all that creative.
How it works
Sign up at http://ping.fm and then sign up at whatever services you want to update from SQL. Here is a list of what they currently support. From SQL, we could send a message to twitter or even better, yammer via database mail. Here is the obligatory, “Don’t send anything confidential over email”
Possible Uses
Augmenting your monitoring – The keyword is word is “augmenting” except for the smallest installations. For the crown jewel of the company, you might get a call from the 24/7 staff and an email. Why not a tweet too especially if it can add SMS functionality that you may not currently have?
Turn X into an RSS feed – Where X could be, all job executions, any SEV error messages, any trace event or DDL operations, or [your idea here]. You can funnel the RSS into the intranet, your reader or [insert creative idea here].
An insert trigger on your press release table – Blast it to the world. Some companies are already doing similar things http://dell.com/twitter.
Personal updates from the SQL Editor – I don’t know about you but I have spent weeks on end in tsql. Some deadlines don’t allow for time to come up for air. It would pretty cool in a geeky way to tell the world that I just replaced 500 lines of cursor code with a 10 liner or whatever without leaving SSMS.
Example Code:
sp_configure 'show advanced options', 1;GORECONFIGURE;GOsp_configure 'Database Mail XPs', 1;GORECONFIGUREGOEXECUTE msdb.dbo.sysmail_add_account_sp@account_name = 'Ping.fm demo', @description = 'Mail account', @email_address = 'jason@statisticsio.com', @replyto_address = 'jason@statisticsio.com', @display_name = 'Jason Massie', @mailserver_name = 'mail.statisticsio.com' ;-- Create a Database Mail profileEXECUTE msdb.dbo.sysmail_add_profile_sp@profile_name = 'MailAccount', @description = 'Profile used for administrative mail.' ;-- Add the account to the profileEXECUTE msdb.dbo.sysmail_add_profileaccount_sp@profile_name = 'MailAccount', @account_name = 'Ping.fm demo', @sequence_number =1 ;-- Grant access to the profile to all users in the msdb databaseEXECUTE msdb.dbo.sysmail_add_principalprofile_sp@profile_name = 'MailAccount', @principal_name = 'public', @is_default = 1 ;
-- here is the magic blasphemy. EXEC sp_send_dbmail @profile_name ='MailAccount', @recipients = 'YourUniqueEmail@ping.fm’, @subject = 'Blogged:', @body = 'This update came from SQL Server http://ping.fm/XiEkj'I just updated twitter, linkedin, facebook, plurk, rejaw from SQL!
EXEC sp_send_dbmail @profile_name ='MailAccount', @recipients = 'YourUniqueEmail@ping.fm’, @subject = 'Blogged:', @body = 'This update came from SQL Server http://ping.fm/XiEkj'
In closing
One more time, pay attention to security. There are a few commercial products on the horizon. http://ping.fm and most of these service also have API’s that may be a better alternative than database mail. Finally, database mail was meant for administrative alerts and I suggest you stick with that mindset..
The SQL Heroes contest is wrapping up. I got a kick out of making QPee just by learning the best SQL 2008 feature that you've never heard of. I thought it was cool I made the finalists but I thought I would actually have to win to get anything more than personal satisfaction out of it. The competition is stout. It turns out, I actually only have to make the top 5 to win a Windows Home Server. 50-50. Those are my kind of odds. :)
Vote.
I am Jason Massie and I approve this message.
This post was inspired by a twitter conversation between @SQLCraftman and @Joewebb.
joewebb @SQLCraftsman TVF's don't kill servers, developers with TVFs kill servers. :) Fri, Oct 17 13:42:42 from twhirl
SQLCraftsman Still recoding bad T-SQL. Table-Valued Functions are evil.Fri, Oct 17 13:16:43 from web
For further information, I suggest reading my favorite whitepaper especially the best practices section.
Here are some choice ones:
jessicammoss Developer writes SQL Update statement and forgets the Where clause. Doesn't test code. Runs statement on production. #ITbooTue, Oct 14 15:55:14 from BeTwittered
tjaybelt #ITBoo User stops by and says his process is slow. Can i speed it up in the Database somehow? o, its friday, and its 430pm and he has to goTue, Oct 14 15:41:27 from TweetDeck
sqlagentman #ITBoo "Oh I can take care of this for you, I used to be an Access DBA..." DELETE * FROM sysobjectsTue, Oct 14 15:02:54 from TinyTwitter
cfrandall Her locks failed. Records she thought were dead were restored to life - there were new rows where only secs before there were none! #ITbooTue, Oct 14 14:17:17 from web
I guess you can haiku for bonus points but it is not required. Follow along here or chime in your #ITBOO.
I am out of town. Look for it Monday or before. Until then I give you:
But hey if it works, then Darwinism is kinky… Maybe this is how cowboy hats evolved.
Was struggling for some comic fodder today. Like for at least 7 minutes. Then I remembered a blog post that BrentO wrote yesterday and blam. Humor(or lack of) aside, test your fracking backups.
This template was adapted from Office OFFline.
I know there are a few poker playing DBA’s out there. Andy, Chris and Peter to name a few. I have uncovered what would be equivalent to unmasking batman.
The mild mannered SQL Server Ambassador,Kevin Kline, is really Daniel Negreanu, the high stakes Vegas hustler.
SQLOS uses a cooperative scheduler. They actually wrote it from the ground up because it performs better than the Windows preemptive scheduler. KenH(R.I.P.) describes it way better than I can here. It was written for SQL 2000 but is still pretty applicable.
Less Signal Wait. More CPU lovin’
Maybe I will come up with something funny next week. Happy Friday!
This comic was adapted from Office OFFline.
How many times have you heard “Cursors are evil”? Well, +1.
A cursor vs. set based solution
Happy Friday.
I have be running into this problem more often. The exact error message is "A significant part of sql server process memory has been paged out. This may result in performance degradation". It is usually easy to work around if you are on Enterprise Edition but on standard edition, you have to actually fix the problem. :) I have actually had to to do a couple of edition upgrades because the customer could not fix the root cause.
Random Access Memories
Template courtesy of Office OFFline.
This is my humble follow up to the, now classic, xkcd strip on little Bobby Tables.
This post was inspired by this MSDN forum question and with nudge from BrentO.
WordPad FTW!
To go a long with my previous post, I give you a Friday funny.
Intelligent Design?
Time for TRY\CATCH in politics?
Phantom Records
I have been wanting to do a SQL comic for quite some time. The problem is I really suck at art. My 4 year old laughs at my stick figures. However, @DavidSalaguinto does a comic on MSDN and has shared the Visio template. Thanks David!
I have a post half written on the perils of SQL Profiler so I thought I would drop a prelude to it. If you are asking yourself what is wrong with profiler, keep coming back.
The Technical Interview