<img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=204641&amp;fmt=gif">

Breaking in as an Accidental DBA in the world of database administration

Posted by Rey Lawrence Torrecampo on Aug 4, 2021 6:23:00 AM

It is a typical Wednesday afternoon. A call with your manager is scheduled around this time to discuss updates. As you enter the conference call, you don’t see anyone from your team, yet you see a familiar face in one of the window screens. “Isn’t that the Database Administrator who tendered his resignation letter a week ago?” you say to yourself. And it dawned upon you. This call is not your typical meeting but a reception to your new role. You, my friend, are now a DBA.

 

 

As an accidental DBA, your first instinct would be to google “How to be a Smarter DBA”. Google will provide you an extensive list of searches: from SQL guides in SQL guides in database management, database security, and database monitoring to MySQL guides on the same topic.

 

 

As you open article by article to know more about your role, you must have realized something – “what system am I administering”? Sure, these SQL guides and MySQL guides are helpful, but if your company uses Oracle, you’re off on a bad start.

It is also common to scour the internet for resources on basic SQL and advance SQL topics. Although that is a part of the skillset a DBA needs, therefore, you will still need to understand the core components of how databases work and function.

Moreover, you might find yourself browsing through tutorials. If you are using SQL Server, Documentation on SQL server management studio might be a good starting point. Exploring the IDE will provide a better understanding once you begin Database Monitoring and Database Management. For non-SQL Server DBAs, there are free IDEs available online, and they’re much more robust and reliable than the recommended IDE of a vendor. In essence, you can choose to settle with SQL server management studio or find an IDE that will be much more familiar to you.

 

What can you do?

As a DBA, your role is to maintain and optimize the database. You need to understand database management, database monitoring, and database reporting. Sure, backend development and setting up servers and clusters will also be under your responsibility. But as an accidental DBA, the management will not expect you to handle those tasks at once. So, rest assured that you will not need to dive into those topics yet.

The more critical aspect of being a DBA is to know more about performance tuning. In any database server, High-Performance MySQL databases or high-performing database servers will be your end goal. The speed of database read and write is not just the sole measurement for performance; it encompasses database server uptime and disaster recovery.

With an established system, your job is to maintain it. You want the system to work efficiently. Hence, you will focus your energy on focusing on things you can control and handle. Even if you are an accidental DBA, chances are database backups and recovery will be a task you will do.

Understanding backups, for one, is a good one to begin your DBA journey. You need to understand how each type of backup is aligned with your company’s guidelines on disaster recovery. A good tandem with database backups is learning recovery models. Restoring backups is the ideal next step in your journey.

Testing your backups is an absolute must. Untold numbers of DBAs have been left in the cold when it turns out their meticulously executed and stored backups fail to restore. So check – and check again.

Testing backups requires you to save a backup file and restore it in point in time. A secondary server for testing will be required if your database is currently being utilized in production. Use dbcc checkdb after restoring the backup to verify no corruption or issues were encountered.

Next, familiarize yourself with indexes and how they will affect your search queries. Indexes can have an enormous impact on your database’s performance when adequately implemented. During searches, this lessens the fetch time of queries reducing the overall load in the process.

Finally, learn how to optimize SQL queries. Structuring how your write queries is another way to unburden the database resources. The correct use of LEFT and INNER JOIN can impact the speed of returning data, especially when indexes are involved. Always remember not to bloat your data upon return.

There is a lot to talk about when you want to be a DBA. Entry to this role requires learning and experience before you can properly call yourself a bona fide DBA. Plus, you need to always keep in mind database performance. As much as possible, you want to avoid database performance degradation.

But, there is a much easier route rather than overwhelming yourself with these concepts.

 

Tools can make a difference

Even an accidental DBA, such as yourself, will be depending on database monitoring tools. Nowadays, Professional DBAs use tools for their daily operations. They prefer a working script rather than build it from scratch. Procedures from Brent Ozar or Ola Hallegren gives a much more holistic approach to database monitoring, making monitoring an entire instance much easier.

These solutions are excellent. But won’t you prefer to use a tool that has a pre-built feature of analytics, automated monitoring, and user interface? Yes, there exists such a product; that’s dbWatch Control Center. dbWatch Control Center is a monitoring and management solution that can monitor different databases anytime, anywhere.

 

 

dbWatch Control Center has three significant features: Database Monitoring, Database Management, and Database Reporting.

Under the monitoring module, you can monitor hundreds of databases heterogeneously or cross-platform. Whether your organization uses MySQL Server, MS SQL Server, Oracle, or Postgres, Control Center will be able to connect to it, be it in the cloud or on-premises.

In the same module, you will see different dbWatch jobs installed to an instance. Each job is specifically tailored to the monitoring needs of a DBA per each platform. For example, in MS SQL Server, a job called SQL Server Agent status checks if the SQL Server Agent is running or not. You can check more about the different job status by going to our online documentation for Control Center.

Another positive for jobs are they are agentless, meaning dbWatch schedules and triggers those dbWatch jobs. Last, jobs can be categorized as with alert status and without alert status.

Jobs with alert statuses provide alarms and warnings. Once those dbWatch jobs are finished running. They will provide a status color-coded as (see the image above for more details):

 

By default, they are set by the dbWatch team’s DBAs. If you feel confident in modifying the jobs or your organization has stricter rooms for error, you can set the parameters for each monitoring job. If not, you can leave it as it is.

As a DBA, you want to configure or manage your database instance directly. The management module acts as an IDE to your database server.

 

 

The management module also sports a variety of features like history and logs. For example, deadlocks. You can kill sessions using dbWatch Control Center. On top of that, you can see the blocking history of the sessions. These are one of the helpful ways dbWatch’s history and logs are.

You have different options like access control for database security, disk memory management, and backup management. As a matter of fact, managing indexes becomes easier with dbWatch Control Center.

 

 

When opening Maintenance Overview, you can see all instances that need your attention, marked with an orange checkmark. With just a click of a button, you can reorganize or rebuild indexes, perform dbcc checks, and remove database fragmentation. Imagine doing that without writing a single line of SQL code.

With this view, you can perform preventative or proactive maintenance. Various jobs in dbWatch will check fragmentation and statistics. This will provide you with the needed indicator that your indexes needs your immediate action.

For example, the image above shows you two different color coding. In the severity column, it shows I need to perform a dbcc check on always1. While SQLKND_16 needs its indexes to be reorganize. Luckily, with dbWatch, you can perform those tasks automatically outside office hours. Furthermore, what’s great about those jobs is that it prevents anyone from executing them carelessly during office hours unless its parameters allow it to be executed during those hours.

Finally, you can generate a database report for your managers and colleagues. With the option to provide a comprehensive one on all registered instances, dbWatch will email it directly to your team or access it in a server environment.

 

 

 

Summary

It might be overwhelming to submerge yourself in the tasks and responsibilities of a DBA. But don’t fret; you are now well equipped with the knowledge to go forth and be the best DBA out there. Always remember a tool does not make you any less of a DBA. A tool like dbWatch Control Center will leverage you into fitting in that role as soon as possible.

 

 

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

 

 

Get you free licenses for five instances valid for six months now! dbWatch Control Center free license

If you have any questions about dbWatch Control Center, feel free to contact me: rey@dbwatch.com 

For more information, visit www.dbWatch.com or the dbWatch wiki pages  

#DevOps #DBA #DatabaseManagement #databasemonitoring #sqlserver #oracle #mysql #mariadb #postgresql #sqlmonitor #sqlmanagement #dbmonitor #database monitor #databasefarms #clouddb #Azure 

 

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

 

About the Author: 

Rey Lawrence Torrecampo is a Pre-sales Engineer for dbWatch and  

a full-time Database Administrator. He has extensive knowledge in Postgres and MSSQL database management systems, with SQL as his most proficient language.