Arun Sirpal

I am a Senior DBA with interest in MS technology especially SQL Server and Azure. During 2015 I was mentored by Paul Randal – Data Platform (SQL Server) MVP and during 2016 I completed my SQLskills Immersion training on Internals and Performance Tuning. When I am not working I am in the gym burning calories.

Blog Post

Snowflake Editions

You have decided that snowflake is the technology you want to use to build your next gen data platform, you have decided your cloud provider (Azure, AWS, GCP) then...

2022-07-13

124 reads

Blog Post

Snowflake Data Cloud

Time to shift gears away from the world of relational databases whether that is in the cloud, on-prem, Linux-based, containers or even sitting within Kubernetes. Everyone has heard of...

2022-07-06

174 reads

Blog Post

Azure VM Scale Sets

I really like scale sets. It lets you create and manage up to 1000 load balanced VMs per availability zone using windows or Linux images. (We can have flexible...

2022-06-09

46 reads

Blog Post

Azure VM Types

There are many different family groups for Azure VMs each with its own purpose. Below is a summary of what can be selected. This is important because for example...

2022-06-06

16 reads

Blog Post

Azure High Availability

Lets write about Microsoft Azure, specially the area of high availability when it comes to virtual machines. No doubt you will know about Azure Virtual Machines. IaaS approach is...

2022-05-31

16 reads

Blogs

From Couch-Potato to Triathlete – and What This Means for Your SQL Server

By

Do you know if your SQL Server is really running at its best? To...

Retro Data 2025 – Slidedeck

By

You can find the slides of my session on the €100 DWH in Azure...

The Book of Redgate: We Value Teams

By

This value is something that I still hear today: our best work is done...

Read the latest Blogs

Forums

Is there a way for SP to know who called it?

By water490

Hi everyone I am writing an SP where there is logic inside the SP...

Planning for tomorrow, today - database migrations

By John Martin

Comments posted to this topic are about the item Planning for tomorrow, today -...

Bottlenecks on SQL Server performance

By runarlan

We have a BI-application that connects to input tables on a SQL Server 2022...

Visit the forum

Question of the Day

The Tightly Linked View

I try to run this code on SQL Server 2022. All the objects exist in the database.

CREATE OR ALTER VIEW OrderShipping
AS
SELECT cl.CityNameID,
       cl.CityName,
       o.OrderID,
       o.Customer,
       o.OrderDate,
       o.CustomerID,
       o.cityId
 FROM dbo.CityList AS cl
 INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID
GO
CREATE OR ALTER FUNCTION GetShipCityForOrder
(
    @OrderID INT
)
RETURNS VARCHAR(50)
WITH SCHEMABINDING
AS
BEGIN
    DECLARE @city VARCHAR(50);
    SELECT @city = os.CityName
    FROM dbo.OrderShipping AS os
    WHERE os.OrderID = @OrderID;
    RETURN @city;
END;
go
What is the result?

See possible answers