Nisarg Upadhyay

Nisarg Upadhyay
Job execution history

Automate SQL database backups using Windows Task Scheduler

April 15, 2021 by

In this article, we will learn how we can automate the backup of SQL database created in SQL Server Express edition. SQL Server Express edition is a lightweight database that has limited functionalities and resource allocation. The SQL Server Express edition does not support SQL Server Agent jobs, so it is tricky to automate various database administration tasks.

Read more »
drag-drop index maintenance task

Automate rebuilding SQL Database indexes using Maintenance Plans

April 9, 2021 by

Index maintenance is a vital part of a database administrator’s job. I have worked for few clients who often face performance issues in SQL Database and don’t have a dedicated DBA. I remember that one of our clients was facing performance issues. I logged in to their server and found that they did not set up any index maintenance jobs; therefore, many indexes were fragmented, causing the problem.

Read more »
CASE expression in ORDER BY exmple

Learn MySQL: Control Flow functions

March 19, 2021 by

In this article, we are going to learn about the most common control flow functions. The control flow function evaluates the condition specified in it. The output generated by them can be a true, false, static value or column expression. We can use the control flow functions in the SELECT, WHERE, ORDER BY, and GROUP BY clause. Following are the most common functions:

Read more »
Server status screen

Learn MySQL: Run multiple instances of MySQL Server on Windows 10

March 11, 2021 by

This article explains how we can run multiple instances of the MySQL Server on a single machine. In How to install MySQL database server 8.0.19 on Windows 10 article, I have explained the installation process of MySQL on windows 10. For the demonstration, I have installed MySQL 8.0.19 on my workstation. We can view the status of the MySQL Server using MySQL workbench. To view the server status, open MySQL workbench connect to the MySQL instance Click on Server Select Server Status.

Read more »
Choose MDF and NDF file

Move SQL database files in SQL Server 2019 on Linux

February 26, 2021 by

In this article, I am going to explain how we can move the SQL database files to another location in Ubuntu 18.04. For the demonstration, I have installed Ubuntu 18.04, SQL Server 2019 on Linux on my workstation. You can read SQL Server 2019 on Linux with Ubuntu to understand the step-by-step installation process of the SQL Server 2019 on Linux. We will move database files of AdventureWorks2019 and Wideworldimportors database. To move the databases, we can use any of the following methods:

Read more »
Drag and drop Backup database task

Automate SQL database backups using Maintenance Plans

February 12, 2021 by

In this article, we are going to learn how we can automate the backup of the SQL database using database maintenance plans. Data is one of the most important assets of any organization, and as a database administrator, it is our prime responsibility to protect it. There are various tools available that can be used to back up the data. These tools use state of the art technology to protect the data, and some of them are very costly. Instead of using these costly tools, some organizations prefer to use SQL native backups. These backups of SQL database can be automated by SQL Server Agent Jobs or Windows’ task scheduler.

Read more »
MySQL logs are enable

Learn MySQL: An overview of MySQL Binary Logs

February 9, 2021 by

In this article, we are going to learn about the concept of MySQL Binary Logs and their architecture. I am covering the following details in this article:

  1. An overview of MySQL binary logs and their architecture
  2. How to enable and disable binary logging
  3. View and change the location of the binary logs
Read more »
Screenshot of email

T-SQL scripts to update statistics based on the row modification

December 24, 2020 by

In this article, we are going to learn how we can develop a T-SQL script to update statistics of tables based on the row modification. It is always a challenging task to perform maintenance on a table that has billions of rows. During the early years of my professional career, I was assigned a project and one of our clients had performance issues. The initial analysis showed that due to frequent data modifications, a specific table’s statistics become outdated.

Read more »
Job schedule

T-SQL scripts to generate database health reports

October 21, 2020 by

In this article, I am going to show how we can automate a database daily health report using T-SQL scripts. For a senior database administrator, it is always important to review the health of the database server. When a DBA manages many database servers, it becomes difficult to visit every server and review the status of databases, SQL jobs, and backups. To ease the monitoring, I have developed a T-SQL script that populates the following information:

Read more »
Run Select query

An overview of the db_datareader role

October 12, 2020 by

In this article, we are going to learn about the db_datareader role. It is a fixed, database-level role. The database-level roles are a group of security principals that are used to manage the permissions within the databases more efficiently. There are two types of database-level roles. One is a predefined database-level role, and another is custom database-level roles. The custom database-level roles can be created by the database administrator or the member of the db_owner role.

Read more »
New Job Schedule that executes a SP to populate the unused tables of SQL Database

Identify unused tables of SQL databases

September 24, 2020 by

In this article, I am going to demonstrate how we can identify the unused tables of a given SQL Database. As a database administrator, we must maintain the tables and objects of the SQL Database. In my organization, when we add a new column or change the data type of a column, we export the data of the existing table in the backup table. Often, we forgot to review and maintain those backup tables. So as a solution, we decided to create a SQL Job that populates the list of unused tables and email the list to the DBA Team for review.

Read more »