Overview of DMV Tool using DBFS FUSE with Docker Containers on Linux Machine – PART2

Overview of DMV Tool using DBFS FUSE with Docker Containers on Linux Machine – PART2
Rate this post

After reading this article, you will be able to the following:

  1. Create a Linux Docker container using the Docker commands.
  2. Perform required configuration change to setup Docker.
  3. Install DBFS FUSE and related dependent packages.
  4. Mount the file-system and data extraction procedures using the configuration file.
  5. Run DBFS program to run custom SQL queries.
  6. Push Docker container image to GitHub repository.
  7. And more…

Read More

Implementing Paging Using OFFSET FETCH NEXT in SQL Server

Implementing Paging Using OFFSET FETCH NEXT in SQL Server
5 (100%) 2 votes

A database can have hundreds of thousands of records. It is easy to insert and select these records via database management systems like SQL Server or MySQL etc. However, it is not easy to display thousands of records on a single webpage or in a desktop application. Space and memory constraints make it difficult to display a huge number of records all at once.

A common solution to such a problem is to implement paging. (Note, this is not memory paging implemented by operating systems) Paging in programming refers to displaying data via a series of pages. A random Google search may result in thousands of results. Google uses paging to display these results. If you scroll down the Google page with search results you would see the following:

Here you can see the number of pages that the search result is divided into. You can click the Next link to see more pages.

In this article, we will see how OFFSET FETCH NEXT operators can be used to implement paging on front-end applications. We will begin with a simple example using the OFFSET FETCH NEXT operator and will then see how it can be practically used with the help of a stored procedure.

Read More

Basics of sys.dm_exec_requests

Basics of sys.dm_exec_requests
5 (100%) 4 votes

Performance monitoring and troubleshooting in SQL Server is a vast topic. In SQL Server 2005, dynamic management views, also known as DMV’s, have been introduced and became an essential helping tool for diagnosing SQL Server performance problems. At the same time, we can use dynamic management views for Azure SQL Database. Some of them can differ from SQL Server on-premise database but the logic of work is still the same. Microsoft has very good documentation about dynamic management views. The only thing,  you need to be careful about the version and product validation of dynamic management views. Read More

Overview of DMV Tool using DBFS FUSE with Docker Containers on Linux Machine- PART1

Overview of DMV Tool using DBFS FUSE with Docker Containers on Linux Machine- PART1
3.3 (66.67%) 3 votes

This article is intended for database administrators and system administrators who plan to configure the DBFS FUSE file-system on a Linux machine using the Docker containers. I would recommend reading the previous articles “Introduction to Docker and Docker toolbox” and “Docker and SQL Server on Linux”. This article assumes that the reader has a rough knowledge of the Docker Containers and SQL Server. Read More

Similarities and Differences among RANK, DENSE_RANK and ROW_NUMBER Functions

Similarities and Differences among RANK, DENSE_RANK and ROW_NUMBER Functions
4.5 (90%) 2 votes

The RANK, DENSE_RANK and ROW_NUMBER functions are used to retrieve an increasing integer value. They start with a value based on the condition imposed by the ORDER BY clause. All of these functions require the ORDER BY clause to function properly. In case of partitioned data, the integer counter is reset to 1 for each partition.

In this article, we will study the RANK, DENSE_RANK and ROW_NUMBER functions in detail, but before that, let’s create dummy data that these functions can be used on unless your database is fully backed up. Read More

Conditional Split Transformation: Export Data from SQL Server into Oracle and MySQL Databases

Conditional Split Transformation: Export Data from SQL Server into Oracle and MySQL Databases
3.8 (75%) 4 votes

In this article, I have explained how we can divide and export data of SQL Server database table into Oracle and MySQL databases. That process is based on the condition defined in SSIS as “conditional split transformation”. Conditional split transformation is like case statement of any programming language. Using conditional, we can redirect the output of a component in multiple destinations that is based on a condition defined in the conditional split component. Read More

Jump to Start Test-Driven Database Development (TDDD) – Part 3

Jump to Start Test-Driven Database Development (TDDD) – Part 3
4.3 (86.67%) 3 votes

This article is a walk-through of creating a report base on a database object developed and tested by using test-driven development (TDDD). Furthermore, some tips for improving database unit testing via TDDD will be discussed in this article too.

Test-driven database development (TDDD) Recap

In simple words, TDDD is all about writing unit-test before the database object is even created. So, if we want to create a database object to satisfy some business requirement, it should be processed by creating a unit-test that ensures the object exists. Moreover, it has to be followed by another unit-test that will ensure the proper functioning of the database object (at the minimum) though that functioning check should only be limited to meet only the desired requirement. Read More

Fixing Data Loss Using Log Shipping with Delayed Recovery

Fixing Data Loss Using Log Shipping with Delayed Recovery
3.7 (73.33%) 3 votes

Introduction

Transaction Log Shipping is a very well-known technology used in SQL Server to maintain a copy of the live database in the Disaster Recovery Site. The technology depends on three key jobs: the Backup Job, the Copy Job, and the Restore Job. While the Backup job runs on the Primary Server, the Copy and Restore jobs run on the Secondary Server. Essentially the process involves periodic transaction log backups to a share from which the Copy Job moves same to the Secondary Server; subsequently, the Restore Job applies the log backups to the secondary server. Before all this starts, the Secondary Database must be initialized with a full backup from the Primary server restored with NORECOVERY option.

Read More

Export data from SQL Server to Excel and Text file via using SSIS package

Export data from SQL Server to Excel and Text file via using SSIS package
4 (80%) 1 vote

While using the SSIS data flow, we can perform ETL task that can be used for data migration, data offloading, design and implementation of the data warehouse.

In this article, I explain how to export data from an SQL table to excel and text file by using the SSIS data flow task.

In this demo, I will perform through the following steps:

1. Create an SSIS package and create ADO.NET connection manager.

2. Create data flow task that has ADO.NET source to populate data from SQL Server. Data will be written to excel file and text file hence configure flat file destination and excel destination.

3. Execute SSIS package and verify that data was written to excel and text files.

Read More