SQL Server, PASS, and other data mishaps
Posts tagged tsql2sday
T-SQL Tuesday #19 Wrapup
Jun 20th
Huge Thanks go out to everyone who participated in this months T-SQL Tuesday. 
I apologize for the tardiness of this post, its been a busy week with PASS finalizing the Summit Sessions.
As always, there were some awesome posts this month! If youve ever wondered why you need to prepare to recover your databases, or your life for that matter I suggest reading through the huge amount of content below.
The good stuff
Rob Farley (B | T) Writes us a two part post with half being technical about migrations, downtime and high availability and the other half being personal with regards to dealing with and controlling life’s disasters. Hats off to Rob for pouring it all out there. (sometimes it just feels better to write it all down and put it in perspective)
Noel McKinney (B | T) recounts a bad situation where he played the part of message queue during a human disaster where a developers spouse unplugged the telephone in the middle of the night (surprising this didnt cost someone a job)
John Pertell (B | T) tells us about times where he learned lessons the hard way about backups and restores. His stories hit home for me and im sure they will for most other seasoned DBAs. Ive lost more SAN arrays over the years to firmware flashes than I care to think about, so much so that I cringe when the SAN admin calls and even utters the word firmware.
Robert Davis (B | T) writes about backing up system configurations in the case of a complete server failure. Good info in one place here about what you would loose if you lost one of the system databases.
Ricardo Leka (B | T) turns in his post letting us know that its important to have a backup plan but even more important to have a recovery plan! (his post was in portugese so if I’m way off I blame google translate! Thanks for the post Ricardo)
Merrill Aldrich (B | T) reminds us to be aware of blind spots in the recovery scenario of our companies. He shares some great info about cultures that can cause disasters to be unrecoverable.
Jack Vamvas (B) Shows us how he uses powershell to gather an inventory of SQL Server info that may be needed in the case of a disaster.
Mark Broadbent (B | T) Writes a post about how others mistakes can often become your problem when corruption lands in your lap.
Muthukkumaran Kaliyamoorthy (B) Goes over the various ways that you can build HA/DR system including Clusters, Mirroring, Replication, etc
Jason E Bacani (B | T) shows once again that backing up a database is important but making sure you are backing up what you think you are backing up is even more important
Bob Pusateri (B | T) recounts a story of a former employer and the resulting problems from having a “if it isn’t broken dont fix it attitude”
Chad Miller (B | T) writes about using powershell and CMS to inventory your SQL Servers
Ryan Adams (B | T) Writes some tips about using and configuring mirroring to prevent disasters
Gail Shaw (B | T) does her best to remind us that disasters arent just huge events in the world but rather most of them involve smaller more isolated events. Id agree with her analysis and I live in the bullseye of hurricane country!
Nic Cain (B | T) writes about a full scale disaster at a former place of employment. I see a running joke in these posts about san firmware upgrades being the cause of most DBA disasters.
Robert Pearl (B | T) shares his story of 9/11 and recovering from that disaster. Things have certainly changed in the years since then.
Amit Banerjee (B | T) gives us 10 key points to keep in mind when thinking about disasters and how to best deal with them
Pinal Dave (B | T) recounts his early days as a DBA and 4 pieces of wisdom that he learned early on
Steve Jones (B | T) Writes about small disasters that arent natural disasters. He’s right, these types disasters are considerably more likely than a massive natural disaster.
Thomas Rushton (B | T) Shared not one but two posts for this months edition of TSQLTuesda. He reminds us to test our DR plans and recounts a story of what was likely someone updating every record in a database with the same value. Which is a common disaster indeed.
Jason Brimhall (B | T) Shared a story of three personal disasters. included is a good tip about recovering the registered servers in ssms after a reinstall
Nick Haslam (B | T) wrote about an experience at a retail organization where a loss of power took out all of the systems. Seems its often the small things that get overlooked (not that power is small but, often taken for granted)
John Samson (B | T) shared links to his prior posts about DBA responsibilities in planning for recoveries
Nancy Hidy Wilson (B | T) who lives just up the road from me in Houston recounts her own personal story from Hurricane Ike. I learned I need a chainsaw and a tractor to recover from a hurricane. Also I was reminded just how far our modern jobs have come in that we can personally experience disaster and move a few hundred miles away and continue to work our day jobs since their systems *should* be designed for uptime!
Thanks again to everyone who participated this month!
Be on the watch for next months host and consider participating if you havent before!
Invitation for T-SQL Tuesday #19 – Disasters & Recovery
Jun 7th
Disasters
Its the first week of June and for those of us living along the Gulf and Atlantic coasts of the US, that brings the beginning of hurricane season. It also means its time for this months installment of T-SQL Tuesday.
This Months Topic
Disaster Recovery. This topic is very near and dear to me based on the fact that I live on a barrier island that was the site to the deadliest natural disaster in US history and more recently destroyed by the third costliest hurricane in history. Needless to say preparing for disasters is nearly instinctive to me which might explain why I’m a DBA but I digress. Anything you’d like to blog about related to preparing for or recovering from a disaster would be fair game, have a great tip you use to keep backups and recovers running smoothly, a horrific story of recovery gone wrong? or anything else related to keeping your systems online during calamity. We want to hear it!
T-SQL Tuesday info
Originally an idea dreamed up by Adam Machanic (Blog|Twitter), it has become a monthly blog party where the host picks a topic and encourages anyone to write a post on that topic then a day or 3 later produces a roundup post of all the different perspectives from the community.
Rules
- Your post must be published between 00:00 GMT Tuesday June 14, 2011, and 00:00 GMT Wednesday June 15, 2011
- Your post must contain the T-SQL Tuesday logo from above and the image should link back to this blog post.
- Trackbacks should work, but if you don’t see one please link to your post in the comments section below so everyone can see your work
Nice to haves!
- include a reference to T-SQL Tuesday in the title of your post
- tweet about your post using the hash tag #TSQL2sDay
- consider hosting T-SQL Tuesday yourself. Adam Machanic keeps the list, if he let me do it you’re bound to qualify!
Check back in a few days to see the roundup post of all the great stories your peers shared
Database Automagic
Feb 8th
This months TSQL Tuesday is hosted by a good friend Pat right over at SQL Asylum
For this months entry I decided to keep it short and sweet, following in my Bits N Bytes theme.
The Meta Script
In the true sense of the word automation, this really doesn’t fit but, in the terms of quickly getting something done that would otherwise be a mundane repetitive task, this can save a world of time.
Lets say we have a list of objects in the Sales Schema and we have a request to grant Select and Insert access to a user for those objects. There are two approaches, 1 is to grant select and insert to the actual schema like this
GRANT SELECT, INSERT ON SCHEMA::Sales TO BusinessUser
However you might decide that you only want to grant direct SELECT and INSERT on the tables that exist in the DBO Schema today not those tables which may be created in the future (auditors love to make us do this)
A simple way to automate granting these rights is by writing a script that writes a script like so
ON obj.schema_id = sch.schema_id
and obj.type = ‘U’
This should give you a result set that looks something like the following:
GRANT SELECT, INSERT ON Sales.People TO BusinessUser
GRANT SELECT, INSERT ON Sales.Sales TO BusinessUser
At this point, run the output in a separate command window and viola you’ve automated that grant of permissions
This may not be true “automation” in the sense that Pat was looking for but, perfecting the ability to write scripts that write scripts is a huge timesaver
This year I resolve to…
Jan 11th

If you hadn’t guessed, today’s post is part of this months TSQL Tuesday. This is an interesting topic for me since as a matter of principle I usually refuse to make resolutions and the like around the start of the new year. I like to set goals, and work towards those goals but, I think “resolving” to do something has this nagging way of never turning out how I’d like. It probably has something to do with the fact that I track goals but, typically only think about resolutions at a point in time.
So, this year Ill resolve to document a few of my goals for the year.
This year I only have a few professional goals. Actually, quite a few less than usual. I decided to trim down my professional goals this year to only a couple since they are quite large and very open ended.
- Id like to make PASS as responsive as possible to the needs of our SQL Community. This is simply to say that I plan to do what I feel I was elected to do. Of all the directors I am as well positioned as anyone to make real change that can be seen to the average user of SQL Server. I will need lots of help to make this happen, and I have no problem asking for that help (watch this space SOON for details)
- I want to learn to be a better “manager/leader” It takes a different set of skills to lead people than it does to be a DBA and do technical work. I love the technical work, actually more than the management stuff but, my current roles are requiring more leadership and less technical. I need to do better with the details of this and learn to inspire greatness in my teammates.
That’s it, 2 whole goals for the year, not much by count but, by effort I’d say these might be the some of the loftiest goals I’ve set in a long time…
We are the people our parents warned us about — T-SQL Tuesday
Dec 14th
Its TSQL Tuesday time again, and this month the topic is being hosted by Steve Jones ( Blog | @Twitter ) The topic at hand is related to interacting with business users or more Specifically, “What issues have you had in interacting with the business to get your job done”
We are the people, they couldnt figure out!
We are the people our parents warned us about — Jimmy Buffett
A Different Twist
What If you were the business user who had the business “issues”? I’ve been the business user that is the subject of every technogeek stereotype. You know, the one who doesnt really know what they want until they see it. Yeah, I was/am that guy. As a matter of fact, Ive been that guy recently. You see, I have two jobs that put me in that sort of position relatively often. In my day job I manage a team of Database Professionals (Excellent ones I’d add!
) In my “night” job, I volunteer for PASS. In both of these roles I often see the need to have something built and anytime something gets built by IT there can be issues.
Change
In order to succeed at completing your job/project/task its often easiest to go ahead and plan on change. Change is in my estimation at the root of 95% of all issues when dealing with business needs. Things change often and no matter how many times you think things are static on both sides of the project equation (requirements vs development) they will surely change again. Ive found that no matter how thourough I have been in coming up with a decent set of requirements before asking for work to be done, in the end something always changes. Often I will have no control over those changes but, many times something comes up that changes things and this always causes the “issues” between both sides of a project. Change is actually a good thing, If every project Ive been involved with were implimented exactly as first envisioned (no changes) I suspect things would be considerably different, and not in a good way!!
Communicaton
After sitting at both sides of the desk, you begin to realize the easiest way to eliminate issues between the people who have needs and wants and those IT Guru’s trying to make them a reality is a very open line of communication and trust. Once you succeed at opening that communication line, all tasks become easier. With open communication change becomes less of an issue and dare I say it: a bit more acceptable to everyone. This is the first line of defense in solving issues before they even become issues!
We’re not crazy
Despite rumors to the contrary the people who need work done AKA “business users” arent totally crazy and intentionally trying to make everyones lives difficult with constant changes. Often times we are just as frustrated that our needs (or requirements) are changing as the IT Gurus are for having to accomidate those changes. Once the communication lines are open between all parties, things get considerably easier and the impact of those changing needs can be efficiently weighed against the timelines, costs, etc of the task/project


