Mirroring Aignt Easy
Chris Shaw has a new nickname. I here by dub the “Meme”. He has a new quiz out. Meme tagged Brent Ozar(WWW, Twit) who tagged Thomas LaRock(WWW, Twit) and Tim Ford(WWW, Twit) as well as myself. Boy did he open a can of worms. Meme called out Brent who has awoken the blogtacular members of the now defunt Bacon bits and bytes. If you don’t know, you don’t need to know.
First Question…
1. Do you feel that you have a reliable SAN Solution? If so what is the secret?
Yes, I have an awesome SAN team that transparently produces 1’s and 0’s faster that a hound dog could eat a pork chop. Faster than a catfish bites stink bait. They are hillbilly as hell good southern folk.
On top of that, I run SQLIO as soon as a new SAN is up and I know what throughput should be. I demand 1ms latency(AVG Disk Sec\Transfer). I am ready to pounce on a SAN admin as soon as I can prove that my slow clunky queries are being held back by the SAN. They know this too. However, I have yet to run into a problem where I could rightly demand my pound of succulent SAN admin flesh. Not even on RAID5 and *gasp* RAID6.
However, the most important thing that my SAN admin taught me is this. It is not the banjo that makes you slap yo knee, it is the banjo player. Same goes for your SAN. Yall come back now, ya hear.
2. I was recently asked to describe SQL Server Database Mirroring. The client that I was answering the question for was trying to use database mirroring for a reporting server. When I explained to him the issues around this he asked me to describe in laymen’s term what database mirroring was.
Describing Mirroring is easy.
Well, maybe I shouldn’t…
You never know when the words you utter on the innerwebz will come back to haunt you.
Aww hell…
Here comes a CLM of epic proportions all over the tubes.
Lets do this!
Database Mirroring is just like pimpin’. Yah, you heard me, playa and playettes. Mirroring is all about transactions just like the pimp game. The primary is the customer and the mirror is the pimp. Mirroring(The Prostitech) performs her service on the primary’s log and delivers the transactions to the mirror(AKA Me AKA Dig Daddy J). Faster the better. I will leave it at that but you best recognize, yo. “Mirroring Aign’t Easy” and you can quote me on that.
I am going to pimp check SQL Server Sleuth(WWW, Twit), Jonathan Kehayias(WWW, Twit), Paul Randal (WWW, twit)
Here on Gilligan’s Isle!
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:
Grant Fritchey(Twitter)
I am tagging the following:
Things you Know Now…
There is a new meme started by Mike Walsh (Twitter, blog). He tagged Brent Ozar(RSS, Twitter) who tagged me amongst other.
Here is the the basis of the meme to quote Mike.
When I wrote about empirical evidence and learning through trying (instead of asking only), I got thinking about things I wish I knew when I was a Junior DBA that I know now.
So here is what I know now that I wish I knew then(and usually learned the hard way).
Microsoft Project is your friend.
I have written about this before but it is worth it to revisit. I started out making big production changes to mission critical systems with nothing but a task list in my head. I evolved to notepad and then excel. My success % improved with each jump. Now, I can floor my boss and customers with downtime estimates accurate the minute. On top of that, I can establish doable timelines and get more resources if my time line does meet expectations.
You can be your worst enemy.
Ego can make a brilliant employee a liability. It manifests is several ways( at least for me).
- Jump on the new groups sporting all your brand new certs in your sig trying to “help”. However based on attitude, it is clear you are there for the wrong reasons usually attention.
- Bogarting knowledge. So you know something someone else does not, teach them instead of holding it over them. Help out he jr guy. He may be your boss someday.
- Ego can keep you from asking for help when you are clearly in over your head. I still struggle with this one.
Life is so much better when you are modest rather than smug.
If the hole is round, a square peg may not be the best fit.
I have officially become platform agnostic. SQL Server will always be my first love and what I am best at but there are other products out there. Not that I know everything there is about SQL but I don’t learn 10 new things about it everyday like I used to. As a n00b, I learn 30 new things a day about MySQLOracle. There are valid reasons to go MySQL or Oracle over SQL Server. That is just the way it is. Imagine rewriting the DAL layer for Wiki or Wordpress just because you had to run it on SQL Server. If you drink that much koolaid, more power to you. I think knowing the features and limitations of other platforms helps me as a SQL Server DBA as well.
The GUI is not your friend.
I used to be an enterprise manager DBA. When I learned how to admin from TSQL, that is were the Senior DBA level skills came in. I still use the GUI if it a click or two vs. several lines of code but I know how to write it and, if need be, automate it. If you can’t, learn.
Know X as good or better than the subject matter experts
Where X is technology that interacts with the database: The OS, hardware, SAN, network, and application code. Of course, this is not always feasible. I have never jumped on a switch to prove it is not a SQL Server problem but I have gotten pretty close. Once when all fingers pointed at SQL Server, I had them check the switch for errors and sure enough the firewall was set 100/half duplex. If nothing else, learn the hardware and OS inside and out.
Next Victims
Jonathan Kehayias(RSS, Twitter)
Tagged: New Year’s Resolutions
David Stein started a new and timely thread. He tagged me.
This article is about the professional resolutions for improvement that I intend to make in the new year and I will tag a couple other people to do the same.
- Learn enough linux to manage a database on that platform.
- Become an orange belt(or better) on Oracle and MySQL
- Master Inbox Zero.
- 2.5 technical blog posts a week in addition to the useless blabber and failed humor attempts.
- Maintain balance between work, family and community.
Next victims:
Denis Gobo(Twitter, RSS, LessThanDot)
P.S. Exercise 4x a week and make it back down to size 32’s.
Tagged – Career Challenges
Got tagged again. Here are the details:
So here are the rules, please answer the question with at least two answers, once you have completed the answer please tag 2 people that you know to answer the questions as well. If you get tagged by this Quiz please let me know I would like to add all the results to the bottom of this blog so all the answers are in one place.
The Questions for this quiz…
What are the largest challenges that you have faced in your career and how did you overcome those?
1. OJT
I did not always used to be an uberguru SQL ninja expert googler. I learned SQL the hard way. I broke production stuff and learned how to it really quick. I didn’t always break but if it was broke, I had to figure out how to fix it fast. It was challenging but a good way to learn. I try to avoid that most of the time now. It is bad for customer satisfaction.
2. Evolving beyond an “enterprise manager DBA”
A really smart DBA way back when told me to get out of the GUI and learn how to administer through TSQL. Meh, EM is just generating the TSQL commands, right? It happened slowly over time. I think after I discovered sysprocesses and some of the other system tables, I realized that the GUI wasn’t all that. Picture giving execute permissions to a user on 50 stored procs through the GUI. Yup, I was that guy. Now, I highly recommend doing most everything through TSQL unless it is a couple clicks and even then know what SQL is running.
So who else has responded:
Who am I tagging?
Well, I’ll tag Kalen Delaney now that I know she reads my blog.
Louis Davidson(@drsql) since he squeeked by the first one.
Jeremiah Peschka(@peschkaj) since he was gloating about slipping through the cracks.
K. Brian Kelley (@kbriankelley)Just cause.
A SQL Quiz – Calling you out!
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>
Before I start, let take this opportunity to look at what could result from a DBA’s mistake.
- Loss of data
- Downtime
- Exposing sensitive data
- Performance Degradation
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:
- Not backing up the “mission critical” database tmpTest.
- Checking that “Boost Priority” box.
- Not adding a local account before messing with the machine account. Locking myself out of windows on a critical SQL Server.
- Adding columns through the GUI. Don’t. Just don’t.
- Adding a duplicate clustered index because I could not figure how to change the primary key from nonclustered in the GUI.
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.
I was also asked to plug, http://sqlfool.com , by someone other than Michelle so I will call her out too.
SoftDev Meme Casualty
For more info see the wikipedia entry on meme’s. Denis Gobo called me out. I think it goes back like this: Denis Gobo > Andy Leonard > Frank La Vigne > Pete Brown > Chad Campbell > Dan Rigsby > Michael Eaton > Sarah Dutkiewicz > Jeff Blankenburg > Josh Holmes > Larry Clarkin
How old were you when you first started programming?
I wouldn’t call myself a developer but I walk the grey line that all DBA’s must. IMO, a good DBA usually has to administer the OS, write code and troubleshoot the network when the finger is pointed at SQL.
How did you get started in programming?
I really not old(school) like some of these that I have read.
My first programing was space invader like program that my lab partner and I wrote(mostly copied from the book.). I don’t remember the hardware. The year was ‘82 – ‘83 and I was in 3rd grade. I slept through most of my other computer ed classes. I didn’t get my own computer until ‘95.
What was your first language?
BASIC what else?
What was the first real program you wrote?
An online ticketing application in classic ASPSQL. I wrote it from the ground up in my free time. It was going to be the next ticketmaster.com but after I wrote it I got bored with it. I would rather geek out than market and manage. lol
What languages have you used since you started programming?
BASIC, SQL, VB6, VB Script, ASP, VB.net, powershell
What was your first professional programming gig?
I have never had a proper programming job. I started off doing tech support for Windows 95 and IE34. I have been in multiple positions at my current company for the last 9 years. All have been SQL related.
If you knew then what you know now, would you have started programming DBA’ing?
Hell yes. There is no way I could not do it.
If there is one thing you learned along the way that you would tell new developers, what would it be?
The only stupid question is the one you haven’t google’d before asking.
p.s. Learn the command line.
What’s the most fun you’ve ever had … programming?
Using @assmilk for a variable. P.S. http://www.thewebsiteisdown.com/
Who are you calling out?
