T-SQL Tuesday 108 – Learning R

SqlTuesday

I am the proud host of TSQL Tuesday for the month of November 2018.

My call to post entries is here . I wanted to know from community on what are the non sql server technologies they are dabbling in, to keep up with the rapidly changing data world. This is my own humble contribution to the collection.

I am a math/stats graduate. It has been a good amount of time though since I did anything with what I learned in school for this. I never really thought it would be of any use to me career wise. I’ve always loved math, just never found time or opportunities to play with it further, and definitely not in the IT world. Until now. For the past 5 years there has been a great deal of focus on statistics, machine learning and data science – by companies to put their collection of data to better use. Majority of people really do not know more beyond the buzz words, and few companies are doing data science related work in a serious way. But the increased focus has certainly led to many of us digging out what we knew or renewing our interest in math as related to today. I’ve always also wanted to get back into programming – learning languages like C Sharp or .NET seemed the easiest route to go, but I do not want to discard my two decade DBA experience and plunge headlong into becoming a full time programmer with any of that. I wanted something that I could use to play with data. After the SQL Server integration with R came out – learning R seemed most logical to do. I started learning it by brushing off some of the concepts around statistics that I have known a long time, and learning each of those with appropriate R constructs to go with them. I’ve written several blog posts in this regard. I had to stop blogging on this due to some changes in life but plan to get back to it as soon as i can. What I have gained from learning R –
1 Concepts of statistics and how to apply them to real world data
2 Differences in data constructs outside of relational model
3 Difficulties faced by data scientists/R programmers in implementing their models to run consistently (there are shops converting R code to T-SQL and .NET for this reason).
4 How to provide added value as a DBA to R programmers/data scientists who work at your shop by setting up SQL Server to talk to R, setting up R server, processes to run their code and so on.

I highly encourage anyone who is a DBA and has similar interests as me to try this out, you will not regret it!

 

PASS Summit 2018 – Day 1 – 11/7/2018

I am proud and fortunate to be sitting beside stars of the community at the blogging table this year. I will be updating this post with details of the keynote as we go along here…a chilly fall morning in Seattle and day #1 of the PASS Summit. Some highlights of typical day #1 keynotes are announcements about the summit, giving thanks to volunteers/PASSion award announcement and keynote by microsoft. This year’s day 1 keynote is by Rohan Kumar, corporate VP of Azure Data – details here.

8:20 AM: Grant Fritchey, PASS President is up on stage thanking volunteers. Grant is talking of 20 stories selected from community. 19 stories have been posted – new one is ours. Balloting for elections opens today. PASS wouldn’t be here without volunteers. 30,000 data professionals in over 100 countries around the world are part of it. PASSion award winner is the yearly spotlight on an exemplary volunteer. Leader and organizer of local/virtual groups, from Johannesburg, expanded community in Durban, takes many hours to expand and serve community – Michael Johnson of South Africa.

8:30 AM: Rohan Kumar calls himself a ‘sql loving developer’ at heart. It is the 25th anniversary of SQL Server. Azure has helped them understand how customers use products and services better than before. Azure has helped innovate across a hybrid data platform. More than 80% of customers have hybrid data platform. More than 90% of them believe they need it. They are very clear that some things they have will always be on prem but hybrid is largely the way of the future. Customers get to decide what stays private and what moves to the cloud. Consistent experience wherever it is deployed. Customer data can be joined or merged with data across platforms. Along with Tools this makes hybrid data platform very attractive. Hybrid enables comprehensive AI and Analytics. SQL 2008/R2 are reaching end of support in six months. Lots of customers are expecting to upgrade to the cloud – Azure SQL managed instance with migration service and SQL 2017 are two great options to modernize.

  1. Modernizing on prem.
  2. It is expensive to upgrade tier 2 and 3 applications.
  3. Building applications ground up.

Analytics and AI availability on cloud

SQL Server 2019 supports Spark and HDFS, SCala and JAva native support. SQL server has minimal # of bugs. PowerBI is an excellent choice for visualisation and tooling.

1 Mission critical availability and performance – Automated query tuning
2 Security and Compliance – always encrypted with secure enclaves to allow advanced operations on encrypted data
3 Management and development – In database java language support to exent TSQL , Machine learning services in Linux
4 Big Data and Analytics – support for data lakes – data virtualization across Oracle, Teradata, D2 and MongoDb. HDFS  support natively.

CTP 2.0 is being released today. NEw CTP will be released every month.

8:47 AM: Bob Ward and Conor Cunningham take stage for demo. System tables implemented as hekaton tables and no page latch contention, just wow!

8:53 AM: SQL Server 2019 is the hub for integrating data. Support high available sql server inside Kubernates. Can also run Spark for distributed data management. Single node hosting spark, sql – Unified data platform for all your data platform needs. Join data stored in hdfs with data stored on your master instance to gain intelligent insights – scale out architecture in SQL 2019. Azure data studio is a cross platform single pane of glass that manages all sql server, azure/managed instance, notebooks integrated for data scientists.

9:00 AM: Demo 2: Can use tsql as well as spark to create ‘notebooks’ to query data

1 SQL now natively big data queries
2 Apache spark ships with 2019
3  Support for java language

9:00 am: Azure Database Migration service – near zero downtime, migrate at scale, optimize IT infrastructure. Business Critical sku of managed instance is available – local ssds for performance ,significant compute capacity. Storage and compute scale independantly. Azure SQL DB Managed Instances general availability will be on the 1st of December. Recovery happens in record time (same time) no matter ‘what’ happens to your database.

9:09 am: Lindsey Allen showing new features of Azure – high availability. ‘Doesn’t matter what partition key you choose it is never right’. BEfore ‘accelerated database recovery/ADR’

9:20 am: Building cloud native apps with Azure Cosmos DB. Globally distributed, massively scalable and multi model database service. Your app can read and write via cassandra ap. Adding multi master capabilities to cosmos db – single digit milli second latency for both read and writes. Choose strong or eventual consistinecy – five consistency levels – navigating the portal, choosing the one for your account and choosing scale. apps can read and write from any azure region with millisecond latency with cosmosdb and cassandra apis.

9:29 am: Azure SQL Datawarehouse improvements – row level security, workload management, accelerated database recovery, cicd with ssdt.

Partnerships – informatica ipaas, intelligent cloud services, tableau connectors, dell fast track RAs. Azure event hubs for Kafka now available.

 

 

 

 

 

 

 

 

 

 

 

T-SQL Tuesday 108 Invitation- Non SQL Server Technologies

SqlTuesday

I am proud and honored to be hosting T-SQL Tuesday again. This monthly blog party started by SQL Guru Adam Machanic since 2009 has completed 100 months this year and am the lucky host of event #108. If you are participating in this month’s party (kindly coordinated by my dear friend Steve Jones (b|t) – please be sure to read the housekeeping rules all the way below that are necessary for participation.

This is also the week of the PASS Summit – the one conference that is still the largest gathering of folks active in the SQL community.  For people like me, who have done the yearly trek to the summit more than a dozen times, it is literally like a family reunion. Aside from these sentiments – what has changed significantly about PASS Summit is that it is no longer a conference entirely dedicated to just SQL Server. There is so much more there – DevOps, Data Science/Machine Learning related, CosmosDB, PowerBI/data visualisation, Entity Framework, Micro Services, on and on. What it indicates is how much data world is expanding and how necessary it is for us to keep up with that. There was a time when I personally wanted to do MCM and retire a SQL Server guru – the MCM went away and right now I know for sure that just insisting on being a SQL Server Guru will not take me very far. I am actively learning how to work with DevOps, PostGres, ElasticSearch, and a number of other things.

So the challenge for this T-SQL Tuesday is – pick one thing you want to learn that is not SQL Server. Write down ways and means to learn it and add it as another skill to your resume. If you are already learning it or know it – explain how you got there and how it has helped you. Your experience may help many others looking for guidance on this.

Below are the rules of the game when you are ready:

  1. Write your post.

  2. Schedule it to be published at some point on Tuesday, November 13th (UTC calendar day).
  3. Include the TSQL Tuesday logo in the top of your post.
  4. Link your post back to this one. Trackbacks should work, but it is a better idea to write a comment with the link on this post. Please give me some time to moderate your comments.
  5. If you are on twitter, tweet a link to your post, adding the #tsql2sday hash tag. Most people filter by hashtag and it increases the visibility of your post by quite a lot.

Look forward to reading your goals and learning from them!! I will publish the summary during the week following the summit. Thanks in advance for participation.

 

Data Professionals at Work – a book-writing adventure

book

I love to write. It is how I express myself best. During the last fall I was pondering starting on a book, my first one. I’ve heard many people talk of the experience. Some enjoy it, others think it is too much work in return for too little. (We don’t need a lot of intelligence to figure out that writing books does not yield a lot of money). I wanted the experience, not the money. I was also a little afraid of over committing to a solo-writing project – mostly because of the many other commitments I had. I wanted something relatively light that would get me started as an author, and if it was something I enjoyed doing – I could take up more projects going forward. Last fall was also a time when I was going through some serious decisions with my career – I was not sure I wanted to remain a pager-carrying operational DBA for longer than I already have. I knew many people in the community – so I could talk through my needs with them and figure out what to do next – but, what if I didn’t? What if I was one of those many people who really didn’t have a ton of contacts or friends and was unsure of where to take his/her career next? We all need to read stories of others to form our own – noone is entirely on a solo journey. We need to know what is out there, how to make ourselves seen/heard and find out what worked or did not work for others like us. And most importantly, we are at a juncture where then are a flood of new technologies, hundreds of different ways of doing the same thing – we need to know what to learn that is likely to be the best for us. It occurred to me that I would personally benefit from a book that talked to a lot of successful people in the data profession and made me understand how they dealt with their career and how they got to where they were. There are a lot of podcast interviews available..so why a book though? This occurred to me too – I am a huge fan of podcasts and listen to as many as I possibly can during my daily walks. But here was what I found – it is hard to find specifically who you want to listen to and when. You have to be ok with subscribing to what the podcast channel puts out there, and many times the questions are not about any career direction, they are an in depth discussion of the technologies the person has been working on. I did not want this to be a technology discussion – there will absolutely be some of that as most people here are gurus at what they do, but it had to be more around providing people direction.

This is partly what got me attracted to the ‘at work‘ series of books that Apress has – I thought an addition to this with the data profession as focus would be useful to many people.

After my proposal was accepted – I had to do the hard work of finding the people to interview for this. My publisher and me agreed that we wanted a blend of data folks – DBAs, BI/Analytics people, Product Managers, Technical Editors and such. I wanted people who did not have books to their credit, as it would be a joint launch pad for me as well as them – but we decided that we’d need a few known names there too, just to make the book attractive to people who read often. So most of people chosen here are those who have not written books before, but a few aren’t. This worked fine. A few other things did not work as I thought they would-  as below.

1 My initial decision to go for a cross cultural blend of people did not work out well. The process for this book involved interviewing the person, transcribing the interview using a third party transcriber service and then editing it for the book. I discovered the hard way that american transcriber services did not do foreign accents well at all. They even had trouble with various american accents such as strong southern ones. So I had to restrict myself to local people to interview and work with.
2 As the book matured I found it easier to work with a blend of verbal interviewing and letting some people write their answers down. This again was not something I knew at the start of the book and was a learning experience. By the time I got here I had very little time left – so interviewing people across time zones or countries became very difficult to do. I am explaining this in a lot of detail because I sincerely did try to get a diverse group of people on board and that became very difficult to pull off.
3 A third lesson was this – this was a fairly time consuming project. It did not take a *lot* of time, but it did take time and commitment from people involved. Some people committed but did not have time for the follow up and for making the corrections/changes needed. I had to replace them with other people and move on.
4 The last lesson was also this – some people just did not have much to say although they seemed very skilled at what they did. It could be that their experience was limited, it could also be that they are not used to talking much about what they do at all. Talking about myself is still a difficult thing for me. I could understand that. But a book needs content to fill a few pages – so my understanding of that was not sufficient to push it forward. I had to leave those people out too.

I want to apologize in advance for any hurt caused to any of these people – it was not intentional and absolutely nothing personal.

That said, below is the star-studded list of people who are featured in this book. My long time dear friend/mentor/guide Kevin Kline has written the foreword.
I am insanely honored to have my name out there with them. I hope what they say will help you – it helped me in getting to where I am, and still does. The book will be out in October 2018, and will be available at the PASS Summit as well. I must mention special thanks to Jonathan Gennick of Apress for supporting and encouraging me, and to Kathi Kellenberger, who did the introductions and has been a friend/mentor to many in the community.
(Footnote: I tremendously enjoyed the experience and am already planning on another book).
Edited: The book is now listed on Amazon.com here. Am working on changing the category from Oracle(?!?) and adding list of interviewee names. Watch this space for updates.

Chapter Name
1 Mindy Curnett
2 Julie Smith
3 Kenneth Fisher
4 Andy Leonard
5 Jes Borland
6 Kevin Feasel
7 Ginger Grant
8 Vicky Harp
9 Kendra Little
10 Jason Brimhall
11 Tim Costello
12 Andy Mallon
13 Steph Locke
14 Jonathan Stewart
15 Joseph Sack
16 John Martin
17 John Morehouse
18 Kathi Kellenberger
19 Argenis Fernandez
20 Kirsten Benzel
21 Tracy Boggiano
22 Dave Walden
23 Matt Gordon
24 Jimmy May
25 Drew Furgiuele
26 Marlon Ribunal
27 Joseph Fleming

 

 

10 SQL Saturdays – and a personal parting of ways

I’ve written many posts on SQL Saturdays , especially the one at Louisville. This one is a  bit different. This is my last time co running an event and also marks my move from the town I lived in for almost two decades. This is a story of my personal growth along with the event. Read on if you don’t mind a bit of rambling 🙂

I’ve had a mentor/coach for many years – he has told me about two key challenges in life that I would have to deal with on an ongoing basis. These are different from person to person – in my case they happened to be dealing with chaos and being able to let go.

Dealing with chaos – I’d say, is a challenge with most people who end up being DBAs. We want to bring order and structure into chaotic situations. We love to automate, love to be cautious so that nothing falls apart and structure things in neat little boxes. But life happens to be quite the opposite many times, and there is no automation available in dealing with that.

I didn’t quite realize that running a SQL Saturday would be the perfect example of learning how to deal with chaos. It is. Nothing about running an event is predictable. Funding is not, venue is not, volunteer availability is not. You can plan and structure things but most things only fall into place at the very last minute. And as far as people go – you have to be willing to do the triple W – as I call it. ‘Work With Willingness’. They have no obligation to do anything for free. You can fire them but you will learn, as I did, that willingness is actually pretty darn hard to find. You have to work with the fact that people will do what they can, and the rest is on you to handle. It is actually an invaluable lesson for life and will get us through most people issues – be it family or work. Most people do what they can, and the rest is on us to handle.

The next lesson – on letting go. Am hardly the first organizer struggling with this. A lot of us get seriously attached to our events or running user groups or doing anything that gives us pride and ownership. It has given us visibility as committed, hardworking people who care for others, it has helped us find jobs, and make friends who are just not professional contacts but soulmates in a way, on our life journey. To me – in Louisville, running sql saturdays made me known to most businesses in town. I’ve been hired without tech interviews because they were so impressed I did that. And, it was my baby – I loved and relished every part of it, from ordering shirts to food to everything. So..how does one let a ‘baby’ go? I considered two things that were not pleasant to think about but are necessary.

1 It eats into a considerable part of your life even when it is not happening. As I was telling another friend in the community – anything in excess can cause issues, and that includes volunteer work. It is the same 24 hours all of us have – to do certifications, trainings, spend with family, and take care of ourselves. There are times when this has a slice of that time, there are times when other things can/have to take that place.
2 You’ve done enough of it for people to know who you are – it is time to move on to doing other things. SQL Saturdays were at their peak when Andy Warren/Steve Jones sold the brand to PASS. They were also doing great when Karla Landrum stepped away to other things…all these people knew they had given it what was needed, and it could be handled now by others. They are people I look up to, and I considered their example worthy of following.

There is a third cause too. I had some personal values I bought to the event. Different people value different things as organizers – and these are mine. I believed, very strongly, in three things.
1 I had to be transparent about finances to everyone on the team.
2 The event was primarily about training and other things like big swag or grand parties were secondary or even not needed,
3 We had to treat volunteers with courtesy, love and respect and not just as task doers. We had to give them what they enjoyed doing, respect their feedback and value their personal situations if any.

I saw these values reflected in John Morehouse and Chris Yates who took over the team from me. I was very impressed by how they treated my team and their ethical values with regards to finances.

Given all this coming together, I decided to let the baby go. It was still hard – but it was time and it was necessary.  The saturday evening after the event and after the post event social – I was looking out my hotel window at the venue. We had done five events there.

My grandmother used to say that you don’t just let go of people, you have to let go of places and anything that carries memories to make peace with it. There were lots of memories around this venue – our volunteers showed up at 5 am to put out signs on the highway, there was a flutter sign proudly waving around telling the world we were there, hundreds of people can come and gone over these years, one volunteer had sadly passed away, many people have thanked me (and many speakers) for bettering their careers doing this. Lots and lots of memories, happy and sad. I took my umbrella out and went for a stroll in the summer rain, slowly savoring all this. There is a road right opposite the venue. It is a little hill and you can’t really see what is on the other side. If you walk over the hill , it leads to a busy highway with lots of buzz. But you really can’t see that from where you are. My life as of now is on this side. And it was the same way 20 years ago. It has taken time, hard work and patience to get to the busier side and the same is true now. And to get there, I have to leave this behind. Savor it and leave it behind. Which is what I finally did. So long and good luck, SQL Saturday, and the little town of  Louisville – the team, and the town – thank you for the gifts and lessons you bought me.

IMG_20180721_202314290

 

Lessons on relocating – from running SQL Saturdays

I recently accepted a job offer in another town and relocated from my base of Louisville, KY. I have not relocated in 18 years, and had several lessons to learn in this process. Some lessons I had learned from 10 years of running SQL Saturdays came in handy for this…as below:

1 Plan: A SQL Saturday event takes months of planning. Typically we start with booking a venue at least a year before..then, depending on how funds come in, we put in pieces of the event in – such as shirts, swag, any other items needed to run the event, and so on. A move takes pre planning too, the earlier you start the better, and the more you plan for the better.

2 Get more than one quote for anything: Be it food, or shirts, or anything you need – get several quotes and weigh them against each other for what works best. This is the same – I spent hours poring over quotes from many different vendors before I found what suits my needs.

3 Logistics and convenience matter more than cost: Our SQL Saturday venue is not cheap. But, we have our logistics together here – we can go in the previous evening, get our tables and signage up, dump our swag somewhere – be ready for the next day. We are close to hotels and it is driving distance to many places – we may get a cheaper location but the logistics around this is a huge driver for us. While moving too – I got cheaper quotes but settled for one that met my logistical needs best. A place that would cart my stuff away, keep it in storage and deliver it when am ready – that was more expensive but it met my logistical needs better than cheaper places.

4 Some chaos cannot be planned around: There will always be things you don’t anticipate. The storage place I used for relocation expected me to bring my own key to lock up my stuff, at the very last minute. The SQL Saturday venue has a new manager who will open one hour later than the older one. At one SQL Saturday the caterer had a new driver who went to the other end of town and did not deliver coffee/breakfast. There is no way one can plan for things like this – they happen, we have to cope the best we can with it.

My dear friend Karla Landrum used to say ‘In the end what matters is that you helped that many people train and learn’…similarly , what mattered to me is that I finally moved. Things didn’t go perfect but that was ok.

\

 

Ohhhhhh S…t!! A tribute to Robert Davis

Today marks 3 days since we’ve lost Robert Davis a.k.a SQLSoldier, one of the pillars of SQL Family community.
I was introduced to Robert many years ago at one of the PASS Summits. I had known of him as a SQL genius well before that. One of my good friends from the local SQL community had actually relocated to Seattle because he got an opportunity to work with Robert. After I got to know him, I befriended him on social media and followed what he said/did. I found him extremely kind, open minded, friendly and generous. Much has been said of all these qualities. I thought about what I would say here that has not been said yet..two things came to mind.
Robert had a native american ancestry. Like many other immigrants I thought native americans looked a certain way and to me he looked like any other caucasian I had seen. He could have gotten away with that really easily. But he took every opportunity he had to let the world know he was partly native american. And perhaps for this reason, he had a very sensitive and intuitive understanding of issues around racism and discrimination. I found him pretty extraordinary in that regard, and my respect grew in leaps and bounds for him.
The second thing I found – he believed in taking chances, in being happy at what you do, not just do it for survival. I went through a job situation some years ago, when I had to quit two jobs in quick succession for various reasons. The judgement around this is really harsh, especially in conservative south/midwest. Even when I tried to get some understanding from community on social media – responses were like ‘stick with it for a year’, ‘i will not touch your resume if i see that many short stints’, on and on. I was really disappointed and saddened – I believe in tenure myself, but was just going through a patch of bad luck when I could not make it last for reasons that had nothing to do with my ability or performance. Robert was among the few people who really got this and told me how important he thought it was to be happy and satisfied, and that noone else really needed to get reasons why I wanted to move on or where. He gave me confidence to do what was right for me, and not worry about what other people thought.

He was a movie buff, and one of the movies he enjoyed that is also my personal favorite is ‘Butch Cassidy and the Sundance Kid’. Whenever I find myself worrying too much about what other people think – I think of this classic scene from that movie, where Robert Redford and Paul Newman make an instinctive decision to jump off a cliff – yelling ‘Ohhhhh s….t’! I can see Robert smiling and nodding from above in approval 🙂

bc

 

 

Data experiments with salary survey – I

As someone who just crossed three decades of working in technology – I have a sudden renewed interest in understanding how careers in technology evolve with age or years of experience. Those of us older in this industry are among the first generation who have worked almost an entire career in technology. We do not have a lot of examples before us to understand how people worked this out as they got older.  I wanted to play with the data generated by the survey Brent Ozar did for some of these reasons. The questions I was looking at are as below:
1 Is there any correlation between experience and number of hours worked?
2 Is there any correlation between experience and job duties/kinds of tasks performed?
3 Is there any correlation between experience and managing staff – ie – do more people with experience take to management as a form of progress?

I am using this blog post to explore question 1.
I imported the data from the spreadsheet into a sql server database. I then wanted to understand first if the data fit a normal distribution. If it did, what is the correlation between number of years worked (a continues variable), and number of hours currently clocking on the job (another continues variable). I removed the data that is invalid (0 hours of work). Also did not filter by country as I do not think these questions are very country specific.

Step 1: Is the data a normal distribution?
The simplest way to determine this is if the data follows a bell curve. I used the simple R code below to determine this ,and I got a near perfect bell curve. So..good!

library(RODBC)

cn <- odbcDriverConnect(connection="Driver={SQL Server Native Client 11.0};server=DESKTOP;database=Salarysurvey;Uid=sa;Pwd=mypwd")
data <- sqlQuery(cn, 'select yearswiththistypeofjob from [dbo].[salarysurvey] where yearswiththistypeofjob > 0')
yearswiththistypeofjobmean<-mean(data$yearswiththistypeofjob)
yearswiththistypeofjobsd<-sd(data$yearswiththistypeofjob)
sigma1<-(sum(data$yearswiththistypeofjob>=yearswiththistypeofjobmean-yearswiththistypeofjobsd & data$yearswiththistypeofjob<=yearswiththistypeofjobmean+yearswiththistypeofjobsd)/length(data$yearswiththistypeofjob))*100
sigma2<-(sum(data$yearswiththistypeofjob>=yearswiththistypeofjobmean-(2*yearswiththistypeofjobsd) & data$yearswiththistypeofjob<=yearswiththistypeofjobmean+(2*yearswiththistypeofjobsd))/length(data$yearswiththistypeofjob))*100
sigma3<-(sum(data$yearswiththistypeofjob>=yearswiththistypeofjobmean-(3*yearswiththistypeofjobsd) & data$yearswiththistypeofjob<=yearswiththistypeofjobmean+(3*yearswiththistypeofjobsd))/length(data$yearswiththistypeofjob))*100
cat('Percentyearswiththistypeofjob in one SD FROM mean:',sigma1)
cat('Percentyearswiththistypeofjob in two SD FROM mean:',sigma2)
cat('Percentyearswiththistypeofjob in three SD FROM mean:',sigma3)
lower_bound <- yearswiththistypeofjobmean - yearswiththistypeofjobsd * 3
upper_bound <- yearswiththistypeofjobmean + yearswiththistypeofjobsd * 3
x <- seq(-3, 3, length = 1000) * yearswiththistypeofjobsd + yearswiththistypeofjobmean
y <- dnorm(x, yearswiththistypeofjobmean, yearswiththistypeofjobsd)
plot(x, y, type="n", xlab = "Years of Experience", ylab = "", main = "Distribution of Experience", axes = FALSE)
lines(x, y)
sd_axis_bounds = 5
axis_bounds <- seq(-sd_axis_bounds * yearswiththistypeofjobsd + yearswiththistypeofjobmean, sd_axis_bounds * yearswiththistypeofjobsd + yearswiththistypeofjobmean, by = yearswiththistypeofjobsd)
axis(side = 1, at = axis_bounds, pos = 0)

experience

2 Now onwards to understand if there is any correlation between the two continues variables – years of experience and hours worked on the job. To do this I applied Pearson’s coefficient – I have a very detailed blog post on what that is here. Basically, this value is very easy to calculate in R and it can be interpreted as below:

A value of 1 indicates that there is a strong positive correlation(the two variables in question increase together), 0 indicates no correlation between them, and -1 indicates a strong negative correlation (the two variables decrease together). But you rarely get a perfect -1, 0 or 1. Most values are fractional and interpreted as follows:

+.70 or higher Very strong positive relationship
+.40 to +.69 Strong positive relationship
+.30 to +.39 Moderate positive relationship
+.20 to +.29 weak positive relationship
+.01 to +.19 No or negligible relationship
0 No relationship [zero correlation]
-.01 to -.19 No or negligible relationship
-.20 to -.29 weak negative relationship
-.30 to -.39 Moderate negative relationship
-.40 to -.69 Strong negative relationship
-.70 or higher Very strong negative relationship

So when I run the formula to calculate it in R –

data <- sqlQuery(cn, 'SELECT hoursworkedperweek,yearswiththistypeofjob from [dbo].[salarysurvey] where yearswiththistypeofjob > 0')
cor(data)

pearson

The value we get is 0.03, which suggests ‘no or negligible relationship’. So , the data does not suggest any relationship between years of experience and hours on the job. There may be a third variable to consider. Also to look into are the other two questions regarding nature of tasks. More on that in the next blog post..thanks for reading!

My experience with TechOutbound 2018 – Caribbean

I am a passionate, regular attendee of Techoutbound (formerly SQLCruise) events. I try to do at least one every year.  This year’s cruise on east coast was to East Caribbean – with an itinerary that was different from original because of hurricane related issues in the area. We were doing Jamaica, Cayman Islands, Grand Stirrup Cay and finally the Bahamas.

Day 0: Miami: Since I am on a telecommute based job now, I was able to spare myself the rigors of last minute travel and head to Miami a good 3 days before the cruise. I booked myself into an airbnb accomodation at North Miami beach – worked out of there for 3 days enjoying the warm Florida sun and was ready in time for cruise on saturday. The only thing I didn’t do right perhaps was to misjudge the options around food in North Miami, which is seriously lower than options in downtown. Even with grubhub, ubereats and stuff like that – finding good food delivery was hard. Note to myself  – if I do this again is to find a more food-friendly part of town.

Day 1:
I headed to the Marriott hotel early in the morning – had breakfast with Kevin Kline(t) and his wife Rachel (whom I met for the first time), new cruisers David McAtee(l) and Nathan Vanden Hook(t). We then proceeded to port. Boarding was quicker than usual and we were able to get to breakfast by 11 30 AM. After a good meal I went to the rooms and took a long nap through departure. In the evening we met up for the welcome party – where I got to say hello to many former cruisers – organizers Tim Ford(b|t), Amy Ford and their son Trevor, Argenis Fernandez (t) and his family, Grant Fritchey(b|t) and his wife, John Martin(t) , Stephanie Locke(t) and her husband, former cruisers Sander Stad. my good friend Joe Sheffield (t) and his family. After some catch-up I retired early.

Day 2:
This was our day at sea. The first class started with Argenis’s class on Linux for the DBA. I learned about history of Linux in general, and how it evolved its way into Microsoft as an alternate OS hosting SQL Server. I enjoyed the class. Following that we had a class on Data Science Fundamentals with Steph Locke. Steph went over basics of data science, what is involved in presenting ideas to management, working with teams, coming up with right algorithms (you need to treat them like ‘cattle’ and have many 🙂 and deployment strategies. As an aspiring data science person, I hugely enjoyed her class. The afternoon was taken with Grant Fritchey explaining Execution Plan basics. Although it was mostly stuff I knew – Grant is a great teacher and enjoyed every bit of the class. The day wound up with formal dinner – I sat at the table with my good friend Argenis and his family – greatly enjoyed chatting and getting to know them better.

Day 3:
This was our day at port at Falmouth, Jamaica. My friend Joe Sheffield had arranged for a group of us to go to Dunn’s River Falls. Joe, by the way, is another frequent cruiser and also an unofficial tour organizer for many cruise events. We loaded ourselves into the bus and made our way to the waterfalls. My thought was just that this would be a visit to a waterfall, and I’ve seen many – but it turned out to be quite different. The waterfalls are layered, with limestone rocks. The water is about 4-5 feet deep at layers, and it makes for a wonderful climbing place. We were split into small groups, each with a guide, and started our climb, through the cool,clean but very forceful water – to the peak of the falls, about 950 feet high. It was an adventure to the say the least, and one that had me panic more than once – mostly because I was the shortest person in the team, and also because am prone to hypothermia with standing in water for too long. But things worked out fine – and with able assistance from Kevin Kline and Jason Brimhall/his family – I made my way to the very top. This is one adventure that I absolutely plan to do again, with a more relaxed state of mind since I know what to expect. We made a brief stop at a beach on the way back and went back to the ship, tired to the bone but very pleased and happy.

Day 4:
This was another day at port at Cayman Islands. I was very tired from the previous excursion and chose to hang mostly on the ship. In the evening, we had a good class with Kevin Kline on how to present ideas to win executive support. Kevin narrated a story from my own previous job (which I had near-forgotten myself!) where I had to present ideas a certain way to win support for standardising maintenance on servers. I personally always take his wise counsel when it comes to people issues – the class was good demonstration of his knowledge and expertise in this area.

Day 5:
This was a full day at sea – beginning with John Martin teaching availability groups on Linux. It was mind boggling to see how much manual work this is to set up, made me personally grateful for ease of doing it on windows. This was followed by Kevin Kline and John Martin talking of future enhancements to SentryOne monitoring product. I use it on a daily basis and really enjoyed the class. Steph Locke did the afternoon session – and taught us how to set up ETL processes with R. I personally find SSIS a big pain, and most shops I’ve worked at can’t afford BIML – so learning this was really useful to me. The last class of the day was with Argenis teaching various storage landscapes again. I unlearned a few assumptions I had around terms like IOPS, using SQL IO and similar tools and also learned several of the new storage devices/methodologies out there , many of which I can’t even pronounce right. It was a great class and a very useful day. During the office hours/networking session – I was able to get very useful tips on salary negotiation, an area am really weak at. Tim Ford and Steph Locke, along with fellow cruiser Nathan Locke helped me understand this way better than I did before. The best part of SQL Cruise is the ability to ask these questions of people who know it better than you do, and get answers that are practical and useful.

Day 6: This was a day at port at Grand Stirrup Cay, a private island owned by the cruise line. It was a clear beach with white sand and azure blue waters, a perfect sunny day like paradise in the Caribbean. I walked the beach for a while and then took an eco boat tour which showed us some of the ecology of  the island and also let us play with some sea animals a bit. I had a very good time and returned to the boat in time in for lunch. In the afternoon, we had a great class with Kevin Kline and John Martin on Proactive Database Administration.

Day 7: The last day was spent at port at Nassau, Bahamas. We spent the morning in class with Grant Fritchey, learning Azure SQL databases. Then I went out for a few hours with Joe Sheffield and his family. We went around victorian part of Nassau, took a few pictures and then headed back to the ship to pack for disembarkment the next day.

It was 7 very productive days of learning, networking and pure fun. Tim made a mention during the cruise, that fun was a very important part of it and that he did not have any issues with anyone highlighting this. I feel the same – you are a better, more productive person if you can relax and have fun, and learn, and why not both in the same week? I highly recommend the next cruise, coming up in Alaska, for anyone who looking to do this. My sincere thanks to Tim and Amy Ford,  SentryOne and RedGate for sponsoring, Mindy Curnett for the swag(handmade soap), speakers and attendees – for making it a great and memorable week.

 

 

 

 

DBA best practices..from the DBA from Heaven

I met Tom Roush for the first time around 9 years ago – at a PASS Summit. If I recall right –  Kendra Little introduced him to me as a colleague from Microsoft and a friend of hers. I met him at several summits following that – found him a kind person with extraordinary cheer and warmth. Our friendship really took off when I started to read his stories. I am an aspiring writer myself, and hope to be one full-time some day. I loved his style of narration and the emotional appeal in them. One of my favorite ones was the one with three christmas trees, which was shared by someone on facebook. I posted a comment there on how much I liked the story. He responded and sent me a friend request. I write little story-like stuff on facebook from time to time – mostly real life happenings that have touched me in some way. He would send me private messages on the story. ‘I liked how you explained that’, ‘this line shows emotional maturity’, ‘on this line you have said this, but perhaps you meant that’…and so on. He did this entirely on his own – somehow sensing that the budding writer in me was so thirsty for feedback.  I learned from some mutual friends of his illness. I never asked him about it as I thought it was personal to him. He shared it on his own one day, and sent me link to the blog where his family wrote on his health and progress. I read it regularly. My mother had passed because of cancer. I knew from reading that his illness was serious and he had limited time.
Sometime during the fall last year – I got an offer to author a book from Apress publishers. It wasn’t exactly a book to write – but more like a series of interviews with data people who were very good at what they did. The choice of people to include in the book was up to me. Tom came to mind immediately. But I did not know if his delicate health would be able to stand the rigors of the hour long interview that the book demanded. So I asked him if he’d be willing to write the answers for me instead. I needed material to fill 10 pages – so there would be considerable typing involved. Tom sent me the answers. It was short of what I needed – so we decided to do another round – after his chemo last week. He said how excited he was to get his name on a ‘technical book’ and promised that he would do it. But that was not meant to happen. Below are Tom’s answers – for your reading. I sorely regret not being able to put them into the book and have it published while he was around. But we got it started, and now, people will read it for sure.  And if you are a DBA, double check if you are doing what he said. Because doing nothing is unacceptable. Even if you are battling cancer. The rest of us have no excuse. NONE EVER. Bill Gates said of Steve Jobs, on the latter’s passing – that knowing him was an ‘insane honor’. I want to say the same – knowing Tom was an ‘insane honor’.  I am honored to publish as below, Tom’s last interview.

1 Describe your journey into the data profession.

[Tom Roush: ] photography – first photojournalism, then freelance, created database to keep track of business – eventually used those skills to transition into IT

2 Describe a few things you wish you knew when you started your career, that you know now and would recommend newcomers to this line of work know?

[Tom Roush: ] I came into it from a photography background – where there’s the right way and every other way to do stuff – understanding in IT that there were SO MANY right ways to do something was really, really hard.

My path was something like this:

Health insurance company

application support

application developer

application administrator for group of 5 people

move to Microsoft

application support/administrator/developer (but for group of about 1000 people globally – comprising 10 databases (there’s more to this) all supporting MSN

report/graphing developer

Move to Getty Images

SQL developer

SQL dba dev/test/staging/load

SQL dba dev/test/staging/load/production

Move to Avanade

            SQL DBA dev/test/staging/prod

   

3 What is a typical day in your life as a professional?

[Tom Roush: ] this has been very interesting because there’s so much change in it. I used to be the sole dba, keeping about 140 servers running.  This was too much, the work/life balance was completely off, and we ended up expanding to a follow the sun model and hired 5 other dba’s to help me, and we ended up with three in India, 1 in Manila, 1 in Buenos Aires, and me in Seattle.  The Buenos Aires one transitioned to a fellow in Toronto.  My role in this is constantly migrating from being a production Tier2 dba to being a production Tier3 lead dba – meaning I will occasionally write code, I get called on for some deep troubleshooting, but a lot of my job involves checking email and trying to keep track of who’s doing what and deconflict various tasks that are being done on the same server.  So – a lot of my day is spent dealing with email from dev teams in  India, my ops team in India, Philippines, and Toronto, and then solving the problems they’re dealing with or unblocking them.  I also spend time passing on knowledge or training them.  A tremendous amount of what I do has to do with training my team, learning about and overcoming cultural issues.  This is tremendously important because the words we use are not necessarily heard the same way by the various people on the team.  Example: for a time I was dealing with the culture of all the folks mentioned above, and they all had varying skill levels, different work ethics, different things that motivated them. (What motivates the team in Bangalore is radically different than what motivates the fellow in Manila.)

 

5 Describe a few things which any data professional should know as best practices?

[Tom Roush: ] do not try to reinvent every wheel you need. 

Every problem you face will likely be a problem someone else has faced before.

Know that there are people who will want to help you if you are brave enough to ask.

Monitor, monitor, monitor – and know what to do when you discover something wrong.

When troubleshooting – start with the simple – but be prepared to go deep.

6 Describe a few things which any data professional should avoid as worst practices?

[Tom Roush: ] doing nothing (unacceptable)

No backups (unacceptable)

The 9 letters that can get you fired RPO/RTO/CYA

being a lone ranger.  Definitely get involved with others – don’t have lunch by yourself if you can avoid it; take the time to get away

 

8 Describe your experience with cloud adoption.

[Tom Roush: ] we have moved many of our systems, in whole or in part, to the cloud, from iaas, paas, and so on.

My personal experience has been that my team does the work

9 What are some of your favorite tools and techniques?

[Tom Roush: ] tools? Frankly, ssms is what works and what I can use.  Having the budget for tools I’d like to purchase has been an issue – so I end up either writing my own tools or finding tools/scripts out there.  Those would be:

Sp_whoisactive

The SP_blitz family of scripts

Ola Hallengren’s scripts

My own scripts – I write code so it’s dynamic – meaning it knows which datacenter it’s in, which environment it’s in – code that’s written this way may, for example, not have backups running in the test environment, but does have them running in production.  In essence, got a GPS on it.  The code is identical on each server, the variables are dynamically generated values for each individual server.

Etc.

11 What are your favorite books/blogs/other means of learning?

[Tom Roush: ] SQL skills, BrentOzar sqlserverperformance, sswug – various things that pop up in the twitter feed.

12 What are your recommended ways of stress management and developing healthy work-life balance?

[Tom Roush: ] flying in a sailplane, writing stories, walking by the beach, prayer, meditation, totally disconnecting from electronics (this is a struggle for me).

13 Describe your style of interviewing a data professional – what do you look for and what are some examples of questions you ask?

[Tom Roush: ] Conversationally – I use Brent’s interview questions with my own additions.  They’re always open ended questions that are very specifically real life types of scenarios.  I’ve been in the business long enough to be able to have a few.  I look for flexibility in thinking, the ability to start with the basic questions and work toward the complex, I also insist that they explain things to me in a non-technical way – like they would explain to an elderly relative.

Numbered questions are below

  1. If I give you a new sql server and tell you to set up backups, what do you do?
  2. tell me something about sql that mystifies you
  3. explain diff between a clustered index and nonclustered index.
  4. multiple users report sql is running slow for the first time today – what do you do?
  5. explain diff between simple/full/bulk logged recovery models.
  6. when you have to work on a server you’ve never touched, what’s the first thing you do?
  7. phone rings. server’s down – what are the first three things you do?
  8. tell me about your favorite script. what does it do?
  9. non urgent sql problem – can’t find answer in web search result.  what do you do?

10 urgent sql problem – down server. what do you do?

  1. a vendor app has slow queries, what are some ways you can do to make them faster?
  2. latest thing you learned the hard way about sql server.
  3. how to you keep from running a query on the wrong server?
  4. explain RPO and RTO (six letters that get you fired)
  5. name two ways you can tell sql has restarted unexpectedly the night before.
  6. situation: blocking, you get alerts, but you don’t know which db. What would you do to track this?

14 What are your contributions to community and why do you recommend people be involved iwth community?

[Tom Roush: ] I spoke at several SQL Saturdays, spoke at the SSWUG virtual conference for three years, blog, and I do my best to stay involved in community.

 

[Tom Roush: ] treat everyone with respect.  Know that not everyone has gotten to where they are using the same method you used, everyone has different experiences – and strengths come from those.