good sql question with answeres

Upload: gotiya2

Post on 08-Aug-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/22/2019 Good sql question with answeres

    1/7

    SQL Server File Layout Viewer 1.1 ReleaseBack in the Spring I released a 1.0 version of a utility that will show the structure of SQL Server files graphically. Today I have a new release that includessome fixes and updates based on user feedback, bug reports, and suggestions.

    In this release:

    The database scan is significantly faster because it now uses parallelism.Larger databases are supported, and files over 4GB are now read correctly but dont go too crazy. Really large data sets are not likely to work.SQL Server Auth is now available.Various bug fixes around pages that contained data at one time but are not currently allocated, and pages captured from other databases via instant file initialization.Fundamentals about the app are the same:

    The app will read a database and then present a color-coded visualization of allthe data by object and by page type.Mouse over the visualization to get details about the pages in a panel on the right edge of the app window.Use this in test, not production. Itll scan the whole database, which probably would be performance impacting.This is designed to study and learn about storage internals using modest data sets. Running it on a large warehouse, for example, is probably not going to work.

    Why We Write #7 - An Interview with Allan HirtFor today's entry (and after a brief side trip through my own experiences), I move just slightly out of the SQL realm to a Microsoft Clustering MVP. Ok, in reality he is very much a SQL Server expert/guru (having taught for the SQL Server 2008 Microsoft Certified Masters courses), and has been for many years. He just spends more of his (at least public) time working on failover clustering than hedoes in the more general type of DBA/TSQL/Business Intelligence role tasks thatmost of the people I have interviewed so far have been involved with.

    I have known Allan for quite some time now, and while we may not share a ton professionally in common (other than a love for SQL Server), I talk to him often about one of my favorite hobbies, going broke at Disney Theme Parks. His twitter h

    andle is @SQLHA, and his website/company website is http://www.sqlha.com/.

    Allan is a prolific writer, having written several books for Apress, including Pro SQL Server 2008 Failover Clustering and Pro SQL Server 2005 High Availability, and most recently a very soon to be out, self published book called Mission Critical SQL Server. His blog has a very steady stream of on average 4 or 5 entries a month that are very interesting and useful to read. Today, I ask Allan to answer my questions about why he writes to continue my quest to find out why other people are writing.

    ------------------------------------

    1. There was a point in time when you didn't have a blog, didn't tweet, and had

    no public presence whatsoever. And then, one day, you made the decision to putyourself out there. What prompted you to get started writing, and what was the first public work you produced?

    I cant ever remember not writing or doing something like drawing (little known fact: I designed the CD covers for all three of the CDs Ive released to date). Im inherently a creative type and very verbose. Ive never loved writing fictional things, though, so I wont be the next Clive Cussler or even Mark Russinovich. Ive always liked more factual-based writing.

  • 8/22/2019 Good sql question with answeres

    2/7

    Speaking to the public presence thing, its always been part of who I am. I thinkI had one going back to when I was a kid. Even prior to starting to play bass inthird grade with performing publicly and getting attention that way (I was already playing with high school kids I think less than a year after starting to play), I participated in services at our synagogue doing one thing or another (leading part of the service, reading Torah/Haftorah, whatever). In fact, during highschool, when the rabbi went away sometimes either myself or another friend of mine would lead the Friday night or Saturday service from time to time. So being out there and doing public speaking/appearances has always been a part of my oeuvre. I can remember one time where it was myself, my Mom, and a handful of other people in the synagogue. They were setting stuff up or cleaning something up. I went up to the bimah and started hamming it up over the microphone. I couldnt havebeen more than 5, if not younger. Funny how we remember things like that even later in life.

    I can also remember in high school when our jazz band made the finals for the Berklee Jazz Festival in Boston, we played the Berklee Performance Center. It wasntuntil years later when I went back and saw a concert there that I realized howbig that place is. I would say my experiences with music and in synagogue have certainly benefitted me later in life.

    What was the first public writing Ive done? Thats a tough one. It depends what youdefine as public work, because it would probably go back to elementary school.I was underclass editor for the high school yearbook as a sophomore, and editor-

    in-chief as both a junior and senior. I was the co-editor of our bus compendium for USY on Wheels (USY is a youth group). I have a very long history of doing things that paved the way to where I am today. I dont think anything Im doing today would be a complete surprise to those who knew me back then.

    The writing I had the most fun with was in the 90s when I used to do a bit of music journalism. I got to interview some of my favorite artists, including members of Styx, Genesis, Geddy Lee of Rush, and Howard Jones. That really paid poorly(if it was paid), but it was a blast. A running theme youll notice in this entire interview is Ive had a pretty good life to date and lots of luck.

    Funny aside even in elementary school I would be up at all hours of the night working on projects such as reports only to have to be up and out by 7AM or so. No

    t much has changed today.

    With regards to blogging and tweeting, its a matter of making sure you are putting yourself out there. I was very late to the club on both of these social mediaaspects. As an independent consultant and business owner, itd be just stupid notto have some sort of presence. I wont lie. But I tend to go into these things more reluctantly than people think since Im inherently a private person. Im a risk taker, but other things Im more conservative about. Im not about tweeting my life story, and I only blog when Im inspired quality over quantity. I dont schedule tweets or blogs. No slam on those who do, by the way. Its a perfectly valid way of doing things, its just not mine.

    2. We all have influencers that affect our trajectory as a writer. It may be a t

    eacher who told you that you had great potential, or another writer who impressed you that you wanted to be like? Or perhaps on the other end of the spectrum itwas a teacher who told you that you were too stupid to write well enough to spell your own name, much less have people one day impressed with your writing? Whowere your influences that stand out as essential parts of your journey to the level of writer you have become?

    Ive been tremendously lucky my entire life. Many people have championed me and pushed my potential along the way, and Im indebted to all of them. Those who have championed me have seen something in me going back to being a wee tot that they w

  • 8/22/2019 Good sql question with answeres

    3/7

    anted to help foster. I have no idea what it is. If I did, Id sell it and retire.

    I can remember being my usual precocious, outspoken self even in kindergarten. Here in the US, theres not too much deep learning going on in kindergarten at least thats what I remember. I think one day I raised my hand and said I was bored. The exact circumstances of what happened next are a bit fuzzy since were probablytalking about 1976 or 77, but they put me in an advanced reading class by myselfa few hours a week. I remember they had to throw my US History II midterm out of the grading curve since it covered more than we learned but I knew the answersanyway because I was a history buff. Ive been lucky like that my entire life; education was a positive, not a negative. This isnt meant to boast or sound cocky at all. Plenty of people know more than me.

    It was unprecedented to be a junior and the editor-in-chief of the high school yearbook; I was the underclass editor the year before including doing all of thelayout work. That particular English teacher who headed the yearbook, Mr. Schroyer who unfortunately passed away, was a great guy. All of my music teachers (Mr.Forte, Mr. Cohen, Mr. Schlenker, Mr. Peraino, Mr. Lesser, and a few others) inschool really helped me out, too. I never took a formal paid lesson; I had whatever I got in band or the brief lessons in school itself. I never really practiced. When Mr. Cohen came into our third grade class to try to talk band up, I toldhim I wanted to play guitar. I was insistent. He took me in the hall and told me there was bass guitar, and the rest is history. Im not always good at being subtle or taking no for an answer. I was first chair trombone in high school my sen

    ior year, yet I only really played the thing in band class and only took it up in fifth grade because a) I couldnt be in band and play bass since marching band was a requirement b) I didnt want to learn a new clef. Mr. Lesser drove me to audition for being in the state high school jazz band. That was over and above. I can remember making the all South Jersey jazz band five years in a row (grades 8 12). Mr. Lesser always helped me prepare. One year I beat someone more senior than me (I think I was in 9th grade at the time); the guy was pissed off and lookedlike he thought he deserved it because he was older. I never made state; whoever else auditioned was better than me. Thats the way it works. I took it all In stride, but he never stopped believing in me or my talent. I remember those yearsvery fondly.

    Its one reason I take mentoring seriously; the right person/people can really set

    you down the right path. A good mentor knows what buttons to push, and when toleave you alone and possibly even let you fail. But they know youll learn from the failure and be better for it. I think anyone who has had any kind of success also knows failure which makes you appreciate the success that much more.

    Another influence on me was my manager at a company called PC Docs (later boughtby Hummingbird), Bob Toth. I was the database and OS jack of all trades since our product needed to support Oracle, SQL Server, Sybase, and for a time, Informix, on a variety of platforms including Windows NT, Solaris, HP-UX, and Netware.It was my job to be the first person to run our product on these platforms evenbefore anyone else touched it. That meant I was figuring out how to get this stuff installed and working on the backend all the time. Sound familiar? When the NLM version of Oracle is your favorite of the Oracle flavors, you know youve touch

    ed too much stuff. As part of this process, I realized there was no roadmap; I needed to figure things out and make it simple as well as repeatable. So it was at PC Docs I started doing full instruction guides for internal use for getting the platforms up, but at some point some of our public guides were not up to snuff. I remember contributing some of that content to them. From a database perspective, that was my first formal public appearance with writing. I also remember speaking with Bob at Docsummit in Florida (Orlando?) around 1997 or 1998, which Iguess kicked off that aspect of my public speaking. Docs is also where I firstsaw Wolfpack, which later became the clustering we all know and love in Windows failover clustering. Docs was my second job out of college and lasted for about

  • 8/22/2019 Good sql question with answeres

    4/7

    3 years, but it was arguably three of the most influential of my formative yearsin the working world. It set me up well for working at Microsoft, and as they say, the rest is history.

    3. What would you say has been your greatest success story as a writer, even ifit was not a commercial success? And conversely, have there been any projects that were just complete disasters that you probably could have looked back and realized that before you got started?

    I think my biggest success is reflected when people e-mail me, come up to me ata conference or talk, etc. who tell me that something Ive done has helped them orthey like it. Its still odd to get comments on my 2008 book 4 years later! It shows all those hours put in were worth it even if others didnt agree with the vision. Its very humbling. Writing really isnt a vanity project for people just to recognize me since inherently Im a private guy who happens to wear things that are sometimes eye catching. (Wendy Pastrick likes to remind me of the purple cords Iwore at one Chicago SQL Saturday; I still have and wear them.) I mean, have youseen my mug? Modeling agencies wont be contacting me any time soon!

    As far as writing disasters go, I can think of one nightmare whitepaper which has since been published (wont say which one it is) that was pure hell. The contentowner had no clue what they wanted, but they did know it wasnt what I wrote. Bythe third complete rewrite (and were talking a whitepaper of 50+ pages not an insignificant amount of work!), I basically drew the line in the sand and said take

    it or leave it. Why hire a SME who knows the space if you dont either trust themor know what you want? That paper nearly ruined a vacation, too. My travel companion was not happy with me. In retrospect, I should have walked away. The situation got a bit ugly behind the scenes and its side effects lingered for quite some time.

    4. As I mentioned in the intro, you are a Disney fan. Does this or any pop culture affect your writing? I know I frequently want to infuse Monty Pythone-sque tidbits into my writing (even if the occasional editor strips it out as non-essential,) and my latest trend is to name my presentations like a Goofy cartoon, starting off all names with "How To".

    Ironically enough, I really dont use Disney in my examples. Its a bit too obvious.

    I have a whole blog post (http://www.sqlha.com/2011/10/19/fun-with-naming-conventions/) which talks about how I use bands and musicians for things like server and instance names. Its in all of my books. Some people get it, others dont. Afteryears of doing it, people have caught on. I like seeing the reaction of people when Im talking and say things like, So when you join Dennis and Tommy to the Styxcluster .

    Speaking to your Goofy How To point, if people havent seen the Goofy short made a few years back entitled How to Hook Up Your Home Theater (http://video.disney.com/watch/how-to-hook-up-your-home-theater-4be387e52d43da0e1266b068), go watch it. Itsfun stuff and was great to see them take the classic Goofy themes and update them for modern times. I also like the just released Mickey Mouse short Tokyo Go (ht

    tp://video.disney.com/watch/disneychannel-tokyo-go-4e09ee61b04d034bc7bcceeb). Since I love visiting Tokyo as well as like trains, that plus Mickey = winner. Nice nod to Walt at the end. Im glad theyre reintroducing Mickey to a modern audiencein a way thats not just for kids (i.e. Clubhouse) but in some ways, a bit more true to his early essence. Runaway Brain from 1995 was good, but nearly 20 years ago now! Nice seeing Mickey be more than just a character in a theme park since thats the way it used to be.

    5. And now for the silly questionAssume a time machine has been created, and youare allowed to go back in time to speak to a group of potential writers, in whic

  • 8/22/2019 Good sql question with answeres

    5/7

    h you and I are in attendance. What would be the most important point you want to make sure that we hear and follow up on? Do you think your advice would have help current you to do a better job? Or perhaps to do something els?

    Write because you are passionate, not for the payday. Some things may be more lucrative than others, but if you factor in the time spent into writing something,you really dont make a lot when all is said and done. I love doing it, otherwiseI wouldnt bother.

    Worry about quality and staying true to yourself, even if it means walking away.Look at what Im doing with Mission Critical SQL Server. This isnt some drama filled split with Apress; we just disagreed on what the book should look like so Im doing it the way I believe it needs to be done. Am I nuts for doing it? Ask me ina few months. Its certainly a lot of work and its stressful, but also very exciting.

    Ensure your personality shines through in your writing. For better or worse, people who know me say they can hear my voice when they read what I write. In other words, Im no different no matter what I do. That has led to some problems along the way, since I write in a way people can read and try not to create a dry, boring document. Some have a vision that a whitepaper or book cant have any personality or must be formal 100% of the time; I disagree. Sometimes its true, but most of the time theres some latitude.

    IP ownership is a huge topic that every writer today needs to think about and deal with. Data is a companys IP, and what I generate in terms of writing is mine.I do scrutinize the IP clauses of any contracts we sign. A big part of what I do(and why Im an MVP) is about giving back; what I give freely I do so with no remorse. However, that doesnt mean I think everything I do should be free. This is the art vs. commerce argument. Since Im a musician, this topic of free vs. paid also hits home. How many people pay for music today? A topic for a different time,but relevant here.

    My last book I know is up on torrent sites; I wish I could say it wasnt and people respected me not to do it. I really dont have that much spare time to write something as large as a book only for grins and yucks. I know some consultants whowont speak at a conference unless they are getting paid, let alone write a book!

    Despite what people may think, theres nothing wrong with that. Writing a book isa long, tedious, painful yet rewarding process those of us who write say well never do again, but we do it over and over. We must be masochists at heart. DRM isntthe answer to fight piracy I wish it was; its a gnat in the big picture. In theory DRM is good, but the practice causes other problems. I think I dealt with itin a decent way with Mission Critical SQL Server. Time will tell.

    I dont think I would have done a better job since my experiences formed who I amtoday, but things like IP ownership are things I never thought about until laterin life, whether you are monetizing your writing or not. Plagiarism where people steal whole blog posts and repost as their own is common; plenty of people have talked about their experiences. I wish someone had sat me down when I was younger about the business side of things. Writing is easy. Business, legal, and doi

    ng the right thing is apparently harder,

    6. Finally, beyond the "how" questions, now the big one that defines the interview series. Why do you do write?

    I think I have a somewhat insatiable quest for knowledge and I like to share that if I can in some way. Paraphrasing someone I used to work with years ago whenI worked at Microsoft: I came to Microsoft thinking Id find all the answers. Instead, I had to create them. Ive always been inquisitive. Most of what I do stems from wanting to truly understand what goes on as well as a frustration with most do

  • 8/22/2019 Good sql question with answeres

    6/7

    cumentation and how poorly it is done. Given what people have said about my books, I seem to have a knack of taking concepts that are sometimes difficult and explaining them in a way that they understand them. Some say its a gift. I dont knowwhat it is, but Im glad I have whatever it is.

    Earlier, I said I dont write fiction, but I do tell stories. Thats the one thingsthat frustrates me with most technical writing people dont have a story they aretrying to tell. Theres no flow, no purpose, no beginning, middle, and end. The writer meanders with no thought, leaving you more confused than if you never readwhatever it is you just digested.

    I also hate really dry reading. Something you read may be factually correct, butits impossible to get through because the author is a poor writer. I never wantsomeone to label me in that way. Im continually trying to improve. Im never satisfied with good enough if I can help it. And people wonder why I sleep very little

    I think the bad writing out there fuels me a bit, too, truth be told. And for heavens sake, the people who do text speak in writing drives me crazy. (Where r u going 2?) Id like to think Im keeping real words alive somehow ha ha

    Bonus Question: Are there any projects coming up that you would like to tell people about?

    The pre-release content for the first edition of Mission Critical SQL Server bestarting to roll out soon (see the intro for link), and I hope to have it competed (fingers crossed) before the end of calendar year 2013. I like the subscription model Ive come up with for providing updated content, and I hope others do aswell. Nothing ventured, nothing gained.

    Im starting to schedule a bunch of my 4-day mission critical class which has labs. I do it a lot privately, but Im getting more requests to do it publicly so Im dipping my toes in the water. Im going back down to Australia for two weeks to teach it at the end of October/early November in Melbourne and Sydney, and have a Chicago class in December. Yes, Chicago in December. Buy a coat and show up! See http://www.sqlha.com for more details on all of these and any other dates which may crop up.

    Ive got two upcoming online webinars with Penton the yearly SQL Server foundations one with Ben DeBow (my business partner in SQLHA) which is six sessions over two days (August 27 and 29; http://sqlmag.com/sql-server-foundations) as well a one day, three session one on SQL Server high availability coming up on September10 (details coming soon).

    Not surprisingly Ill also be at PASS Summit again. Ive got both a pre-con (sign up!) on clustering and a spotlight session. SQLHA along with a couple of other consultants will have a booth at Summit, so stop by. We may even wind up giving stuff out you never know! Its going to be a really busy fall.

    In the non-work world, Ive been working on my big band project since 2009 or slig

    htly before. Its on hold at the moment largely due to time issues since Im busy aswell as travel quite a bit. Most of it is recorded, and theres been a bit of pre-mix work. I still need to do a bit more writing and arranging. All of the arrangements except one are mine. The album will be a mixture of originals and my interpretation of some of my favorite tunes from artists like Styx (a medley Im going to arrange), King Crimson (Red), Rush (Cygnus X-1), and Genesis (Behind The Lineukes End) but with a jazz slant. Some of the arrangements are more literal, othersare not. Im hoping that after this falls craziness and the completion of MissionCritical SQL Server, I will get back to it.

  • 8/22/2019 Good sql question with answeres

    7/7

    I also have an upcoming gig with the big band I play with when Im home on September 1st down in Norwood, MA. Unfortunately, a sub will be filling in for me at rehearsals for much of the fall due to my schedule.

    ------------------------------------

    Big thanks to Allan for all of his great replies. It has been a few days layingin my email box, but Allan was *the* fastest in returning the questions, passingright by two other people who I am currently waiting on. Not that I mind peoplebeing slow, I know that it takes me longer to edit the questions for another person than Allan took to reply, and it took me nearly a week to finish my answersto questions I wrote! I sometimes wish I was a lot faster of a writer, but I spend a lot of time editing myself over and over to make sure I get it just right(or as right as I can be without going crazier.)

    One thing he mentions about writing is about his (and really pretty much any trade/tech book writer's) material being available on torrent sites. This one has burned me up for years, but it is something that even publishers have seemingly given up on. I think that they have given up, thinking that. 1. People who wouldn't buy a book at all might see your work and at least tell others. 2. People whowould buy a book might check out a book like this but they would actually purchase the book if they want to keep it. Stolen PDFs of books or not, there is noquestion that you will get a lot less coin for book writing than you could doingsomething else. But still to this day, having a book has enough prestige that I

    can minimally delude myself into thinking that it is worth it.

    Admittedly, as Allan says "I think my biggest success is reflected when people e-mail me, come up to me at a conference or talk, etc. who tell me that somethingIve done has helped them or they like it." I frequently say that a well thoughtout negative comment/review is extremely helpful, but for me, one "Thanks!" froma stranger I have never met is worth hundreds of dollars in terms of motivation. Just knowing that someone actually read the material and possibly applied it makes it all feel worthwhile. And admittedly, I have never asked to see verification that they purchased the book.