Searching for Database Objects and Table Data in SQL Server

Total: 4 Average: 4

If you are a SQL Server database administrator or developer, you need to frequently search for specific database objects the names of which you can only partly remember. The manual approach to performing these search operations is time-consuming, especially when the database has a large number of objects.

Another scenario is one in which you want to search for specific data in all database tables. In this case, you need to run a SELECT statement multiple times based on the number of database tables or views you want to search in, or write a complex cursor to loop and search in all database tables, which requires advanced SQL Server development skills.

In this article, we will look at different ways of searching for a specific database object or data in SQL Server, going gradually from built-in methods and diving into a 3rd-party tool that makes it a piece of cake to get the requested database object or data. Read More

Accelerated Database Recovery in SQL Server 2019

Total: 1 Average: 5

An Overview of Traditional Recovery

As with all relational database systems, SQL Server guarantees the durability of data by implementing crash recovery. Durability in the acronym ACID which refers to the characteristics of transactions in relational databases means that we can be assured that if the database fails suddenly, our data is safe.

SQL Server implements this capability using the transaction log. Changes made by all Data Manipulation Operations in SQL Server are captured in the transaction log before being applied to data files (through the checkpoint process) in case it’s needed to roll back or roll forward.

Read More

How to Capture and Analyze SQL Server Events

Total: 4 Average: 4.5

When working as a SQL Server database administrator, you should have the skills to dive deeply into the ocean of the SQL Server Engine and find what is happening internally, in order to be able to detect, troubleshoot and fix any problem that you may face.
You can take benefits from the logs that are written by the SQL Server engine locally in the form of SQL Server logs or externally in the form of event logs, but you cannot consider them as the only source for your troubleshooting and tuning operations.

Read More

Using Transaction ROLLBACK in SQL Server

Total: 3 Average: 5

Introduction

Very recently, a colleague of mine came to me in desperation owning up that he had issued an update statement without a WHERE clause on a key application table. The implications on the front end would be dire, so he came to me directly because he urgently needed help with reversing the situation by any means before the emails and escalation started pouring in.

When we looked into the situation, we found that the changes have not been applied in the secondary database. In most cases, the lag between our primary and secondary databases is twenty minutes (we have a little staggering to avoid performance problems). Because my colleague asked for help immediately after realizing the error, we were able to recover the data from the secondary database. I described the value of such a delay in this article. Read More

Automate Database Test Restore in SQL Server

Total: 5 Average: 4.2

This article talks about automating the database restoration process which is often done manually by the DBA or the infrastructure team responsible for the management of database server(s) and database(s).

This article also highlights the importance of automating database administration tasks such as database backup and restoration to ensure that consistency and reliability of production database(s) are intact.

Additionally, there will be some tips about how to plan and implement database restoration task automation in a real-life scenario. Read More

Basics of SQL Server Task Automation

Total: 6 Average: 4.3

This is an introductory article about automation in SQL server primarily focused on the basic concepts. We will discuss some standard practices and a few examples to help beginners get started with SQL server automation.

This article also highlights the importance of automating SQL server tasks to save time and effort required to do these tasks manually.

Additionally, we will look at cases in which it is not a good idea to automate SQL server tasks despite the fact that automation saves time and effort. Read More

Database Normalization: A Primer

Total: 5 Average: 4

The Relational Model of data management was first developed by Dr. Edgar F. Codd in 1969. Modern relational database management systems (RDBMSes) are aligned with the paradigm. The key structure identified with RDBMS is the logical structure called a “table”. Tables are primarily composed of rows and columns (also called records and attributes or tuples and fields). In a strict mathematical sense, the term table is actually referred to as a relation and accounts for the term “Relational Model”. In mathematics, a relation is a representation of a set.

The expression attribute gives a good description of the purpose of a column – it characterizes the set of rows associated with it. Each column must be of a particular data type and each row must have some unique identifying characteristics called “keys”. Data change is typically more efficient when done using the relational model while data retrieval may be faster with the older Hierarchical Model which has been redefined in model NoSQL systems. Read More

Update SQL Server statistics using a database maintenance plan

Total: 2 Average: 5

Database backups, integrity checks, and performance optimizations are core regular tasks of DBAs. The client data is very important for a DBA to manage the database backup and make sure the integrity of the backups. So if something goes wrong with a production database, it can be recovered with minimum downtime. The database integrity checks are also important because, in the case of database corruption, it can be corrected with minimum downtime and data loss. Managing database performance is also important. Managing database performance is a combination of multiple tasks. Read More

SQL Vulnerability Assessment

Total: 8 Average: 3.5

SQL Vulnerability Assessment is a feature available in the latest versions of SQL Server Management Studio (SSMS). This feature is very easy to use and it will show you all the security vulnerabilities and deviations in your SQL database. This is something you can run on your most critical databases to ensure you’re properly following strict security practices and that your client’s databases are in safe hands. In this article, we will describe the process of running these scans against your databases. With the amount of data growing with each year, database security is an important aspect every DBA needs to take care of. The consequences of data breaches are severe, so they may affect your future as a DBA and severely damage your firm’s reputation. Read More

SQL Data Discovery and Classification

Total: 3 Average: 5

With the recent data protection laws and the implementation of GDPR last year, it is imperative for us to know the type of data our databases are storing. This will help us classify data based on the regulations and help us meet the data privacy standards. It is quite difficult for DBAs to know the type of data within a database. However, there is a new built-in tool within SQL Server Management Studio (SSMS) that can help us to easily discover the data within the database. With this tool, we will be able to classify the data and work on reporting any sensitive data.

Read More