Things I know now that I wish I knew when I started as a SQL Server DBA
By: Jeffrey Yao | Comments (1) | Related: More > Professional Development Career
After being a SQL Server DBA for many years, I sometimes will be asked about the lessons I have learned or things I know now that I wish I knew when I started. I feel this is a very good question and is worth a more detailed discussion.
When I started as a dedicated SQL Server DBA about 20 years ago, the Database Administrator or DBA tile was not common. I guess mainly due to the small volume of data and thus fewer RDBMS environments at the time. SQL Server was then in version 7 and Microsoft was pretty new in the RDBMS field. Sybase and Informix were very popular in addition to Oracle and DB2.
Now looking back, I do have some thoughts and regrets and I’d like to share with the community. I will categorize my answers in two parts and mainly target the new graduates from college or university, who already have decided to pursue an IT career.
Lesson 1 - Career Planning
Career planning is about exploring our interests, adaptability and capability in our desired work. The planning process is actually a trial and test process.
In the first 3 years, decide the role (or title) you want to pursue
Job position types in the IT world are plenty, from different developers, like front-end, back-end, full stack, Android / IOS, BI developers, etc., to different administrators, like network, system, database, cloud administrators etc., and some other types, like QAs, architects, business analysts, project managers or even CIO/CTO.
What role you think best fits your interests is an important decision. You may change your role down the road, but as a new graduate, the answer to this question is critical to your future efforts, and can help you exceed your peers once you set your mind early and start early.
In the first 10 years, work at 3 or 4 companies in different industries
You won’t know how an apple tastes until you taste it. Each person has his/her own strengths and preferences for work. Working in different industries and companies may expand your understanding and view of different environments and cultures, and also see whether you like the specific requirements in that environment.
For example, working in financial industries, security and regulation compliance is of high priority, while at an online education company, system performance and stability is of high priority.
With different priorities, there comes different requirements in daily work, for example, more bureaucratic routines are mandatory and necessary in financial companies while more on-call support and overtime work are needed in online business companies.
Of course, working in different companies we may also have better understanding about other factors important to our life and family, such as job stability, growth opportunity, total compensation, travel requirements, etc.
After about 10 years, we should settle down and focus on our chosen path without looking back.
The IT industry is actually as diverse as the business world itself, in order to have first-hand experience in the real world, it is really helpful to work at different companies and different industries.
Lesson 2 - Personal Branding
Personal brand is about what we individually want to be seen or labeled as an IT professional. Your name is the physical carrier of your brand, and what kind of words we want others to think of when our names are mentioned? Reliable, diligent, productive, best in data warehouse design, or something else? We probably need to consider our personal brand the first day we enter the workforce and continue to build it along the way for all our career life.
These days, young generation IT professionals usually change jobs more frequently or prefer to work as freelancers. So, building a preferred personal brand is important as it will decide whether you get the business versus your competition.
Building a brand can be as easy as getting involved in some IT forum, like stackoverflow.com, by asking or answering questions. Other ways include opening a blog about your professional ideas and speaking at local user groups.
My personal preference is writing for some popular and well-known websites, like www.mssqltips.com, your contributions help not only others, but also yourself in improving your writing and research capabilities. I first published a tip in 2000 in a magazine called “SQL Server Magazine", and I can still find it here. Any publicly available content can be easily evaluated by a potential employer, who will more likely grant you an offer if your ideas/solutions in the publication impresses the hiring manger.
Lesson 3 - Technical Skill Planning
Technical skills planning is actually about deciding how we plan to invest our time, energy and money on the skills we want to acquire and improve for career advancement.
Working as a DBA is my chosen career, so my following points are based on my experience as a DBA.
Learn T-SQL from Experts
The power of T-SQL and its importance to a DBA can never be over-estimated. In our work, we frequently use some open-sourced scripts such as sp_whoisactive, Ola’s database maintenance scripts, Glenn Berry’s DMV scripts, these are all pure T-SQL scripts, and so you can see how powerful T-SQL is.
To learn T-SQL, I have to say the best way is to read books/articles/blogs from Itzik Ben-Gan, most of the time, it is hard to understand his idea or script immediately, but do not worry, keep on reading and revisiting multiple times, you will finally get it. When the day comes that you can understand his scripts by just reading once or twice, it means you have already arrived at a different level.
To learn to write good script is to read and memorize the good scripts written by experts. Good scripts are like poems, you need to memorize them and then some day, you can use it as if it is part of your own work.
For example, to generate a result set of 1 million rows with one column growing from 1 to 1000000 what script will come to you mind? To me, it is always the code like the following:
declare @high int= 1000000, @low int=1; ;WITH L0 AS (SELECT c FROM (SELECT 1 UNION ALL SELECT 1) AS D(c)), L1 AS (SELECT 1 AS c FROM L0 AS A CROSS JOIN L0 AS B), L2 AS (SELECT 1 AS c FROM L1 AS A CROSS JOIN L1 AS B), L3 AS (SELECT 1 AS c FROM L2 AS A CROSS JOIN L2 AS B), L4 AS (SELECT 1 AS c FROM L3 AS A CROSS JOIN L3 AS B), L5 AS (SELECT 1 AS c FROM L4 AS A CROSS JOIN L4 AS B), Nums AS (SELECT ROW_NUMBER() OVER(ORDER BY(SELECT NULL))AS rownum FROM L5) SELECT TOP(@high- @low+ 1) @low+ rownum- 1 AS n FROM Nums ORDER BY rownum;
This is the code from here.
I love the brevity and elegance of this code very much, to me it is the equivalent of a beautiful poem in T-SQL.
Learn a scripting language (better a cross-platform one)
As a DBA, we frequently need to handle work outside of SQL Server, such as scanning OS folders, csv files, network shares, Active Directory, etc. All these tasks are difficult or impossible to do with pure T-SQL. But with a generic scripting language, like PowerShell, Python, Perl, Bash, etc., we can usually get the work done much easier. For a SQL Server DBA, PowerShell is a must to learn, so learn it early and do amazing things with it. We do not know when the next challenge will arrive, but we know we can handle it if we are prepared.
Focus more on algorithm
An algorithm is a set of logical steps to solve a problem. Arguably, we can say each task needs an algorithm, and just like everything else, an algorithm can be evaluated in various ways, such as resource cost, performance, complexity or time used etc. The good thing is there are already many well-designed algorithms developed by smart people before us. Reading and understanding these algorithms will greatly enhance our capabilities to tackle tough problems, for example, sorting number, shortest path, etc.
Spending time in training your brain to come up with a quality algorithm to tackle any task is always time well spent.
I remember as a new DBA, I was once attracted to various articles/books about "internals" or undocumented features (like some dbcc command or trace flags) about SQL Server. But after 20 years and looking back, the time I spent on SQL Server internals or undocumented features was much wasted as those "internals" have no long-lasting impact, and can change from version to version and rarely solve any production issues.
Learn Regular Expressions (RegEx) as early as possible
As a DBA, one frequent task is to handle string-related tasks, from searching some special patterned text in some columns, like phone numbers in various format, or some text in multiple files across multiple servers to trouble-shooting an abnormal string in a huge CSV file, RegEx is so powerful that it is an invaluable skill to master.
I personally have solved numerous tricky issues with the help of RegEx using PowerShell or C# that otherwise are very tough or impossible to handle. For example, find a special string (dynamic length with some special pattern, i.e. combination of letters and numbers) in a stored procedure but ignore the stored procedures if the string only appears in comments.
Learn Excel in depth for better communication
We always need to communicate with each other in our work and life, and in this process, one’s communication method and content can hugely impact the communication quality and efficiency.
I have always been impressed by some presentations I have seen, especially the presentation content, which combines both data and graphs together with some interactive dashboard all together inside an Excel file.
We can Google lots of samples, the following snapshot is borrowed from here. This type of dashboard is not about a fancy style, but more about a convincing insight for end users.
Communication capabilities in some way is equal to visibility and credibility, which are the key factors for one’s career advancement.
I personally love Excel as a presentation platform and especially when it links to the backend database, it gives us huge analysis power.
In this tip, I list a few things that I’d wish I would have known early in my career and especially stated using early on in my work. Though time cannot be reversed, I started to follow some of these tips myself when I realized the importance of these tips. For example, for about 12 years, I worked mainly as a contractor, switching from one project in one company to another project in another company in different industries, and this unique experience has broadened my view to different good practices as a production DBA.
Life is a series of events and consequences by our choices and actions, making informed choices and taking proven actions is critical to get the expected consequences, which then leads to our desired life.
There are many good career planning and development tips at mssqltips.com, please review them as they are a snippet of wisdom from experienced professionals.
Those who are always conscious about the next steps will be awarded with the desired destinations.
- SQL Server Career Planning
- The 6 Rules to be a Happy SQL Server DBA
- Starting your SQL Server Career Path
- Enhance Your SQL Server Career
- Five Things I Wish I Knew When I Started My SQL Server Career
About the author
View all my tips