SQL Server Stretch DB to Azure

Since SQL Server 2016 we could leverage Microsoft Azure to dynamically move “cold” portions of data away from on-premises storage for longer retention time periods. Whilst in theory being a great idea the cost was a blocker for some and with a cumbersome setup process. SQL Server 2019 addresses this by making the costs of storing the data in the cloud more competitive and making the setup more streamlined with the use of the Data Migration Assistant (DMA) tool and SSMS (SQL Server Management Studio).

Note: DMA tool replaces the older Upgrade Advisor tool. To install DMA please see the following link https://docs.microsoft.com/en-us/sql/dma/dma-overview?view=sql-server-ver15.

Continue reading

Azure Storage Accounts – Open to the Internet?

Let’s get straight to the point. From official documentation it states that “To secure your storage account, you should first configure a rule to deny access to traffic from all networks (including internet traffic) by default. Then, you should configure rules that grant access to traffic from specific vnets. This configuration enables you to build a secure network boundary for your applications”.

Navigate to your storage account, what is the default setting? It is shown below.

Continue reading

A Handy function

If you like learning about internals use the undocumented function to get the FileID:PageID of your table rows and use that in DBCC PAGE.


SELECT sys.fn_PhysLocFormatter (%%physloc%%)
AS RID, *
FROM Person.EmailAddress;

Output:

RID
(1:3392:0)
(1:3392:1)
(1:3392:2)

Now set your trace flag on and read the contents of DBCC PAGE to satisfy your curiosity.

Enjoy.

SQL Server Internals

If you like learning about internals use the undocumented function to get the FileID:PageID of your table rows and use that in DBCC PAGE.


SELECT sys.fn_PhysLocFormatter (%%physloc%%)
AS RID, *
FROM Person.EmailAddress;

Output:

RID
(1:3392:0)
(1:3392:1)
(1:3392:2)

Now set your trace flag on and read the contents of DBCC PAGE to satisfy your curiosity.

Enjoy.