Posts

Showing posts from September, 2021

Load External Tables Using PolyBase

Image
Hello,  In this blog, we will discuss one more interesting, easy-to-use, and most useful feature of SQL Server. i.e., PolyBase. Many of us would be aware of this feature. But if it is new for you, then this POC would be helpful to understand the same. Here, we will discuss PolyBase and will see how we can configure the same to query external data. What is PolyBase? PolyBase is a data virtualization feature for SQL Server. PolyBase enables your SQL Server instance to query data with T-SQL directly from External sources like SQL Server, Oracle, Teradata, MongoDB, Hadoop clusters, Cosmos DB without separately installing client connection software. We may have questions like we can configure Linked server as well to query external data. Right! But there are few differences between Polybase and linked server which is well explained here . The Differences are, PolyBase Linked Servers Database scoped object Instance scoped object U...

What is BACPAC and how to use it?

Image
In the previous blog, we discussed what is DACPAC and how to use it? In this blog, we will discuss what is BACPAC and its uses. What is BACPAC? BACPAC contains database's schema and data. It is the same as DACPAC but the only difference is BACPAC encapsulates data and schema whereas DACPAC only contains schema. The primary use case for a BACPAC is to move a database from one server to another - or to migrate a database from a local server to the cloud - and archiving an existing database in an open format. However, we cannot consider BACPAC as an option to database full backup. There is a difference between BACPAC and .BAK file.  BACPAC file is small in size as compare to database backup file. This is because the BAK file contains logs records. Also, the BACPAC file cannot be applied on existing database.  The data in a BACPAC is stored in JSON format. Let’s see how we can migrate the database using BACPAC package.  In this POC we have used database Transaction_DB . We ...

What is DACPAC and how to use it?

Image
Few days before someone asked me a question about DACPAC and BACPAC. To be honest I was really not aware of it and I replied that I have heard these terms for the first time. That person replied DACPAC is used for deploying and upgrading database objects. Even after the clear statement, my reply was like developers would answer this better. Even though DBAs are responsible for migration and deployments. After few days, I got a requirement to migrate database schema (Only Schema) to another instance. In such a case most of us would have used the traditional way to script out the database objects and run the script on another instance. But what if there are many objects? I was exploring the easiest way to migrate the objects and got to know about DAC. After reading about DAC, I felt very sorry myself that I was not aware of such a simplest way of migrating and deploying database objects. I went to my friends who are senior developers and asked this question. None of them was aware ...

IMP Views and Functions that Every DBA should know

This blog is the continuation of blog IMP DMVs, SPs & Functions that Every DBA should know. In this blog, we will talk about some of the IMP and mostly used Views and Functions that every DBA should be aware of. 1) sys.tables Type: View Description: This View Returns a row for each user table in SQL Server. Ex: select * from sys . tables 2) sys.views Type: View Description: This View Returns a row for each view object. Ex: select * from sys . views   3) sys.procedures Type: View Description: This View Returns a row for each object that is a procedure of some kind, with  sys.objects.type  = P, X, RF, and PC. Ex: select * from sys . procedures   4) sys.triggers Type: View Description: This View Returns a row for each object that is a trigger, with a type of TR or TA. Ex: select * from sys . triggers   5) sys.sql_modules Type: View Description: This View Returns a row for each object that is an SQL...