alzdba

  • Interests: family, mantrailing / dogs, riding my motorbike, volleyball

SQLServerCentral Article

Windows Clustered MSDTC and SQL Server 2019 mishap

Introduction As you may know, in the early days of SQL Server Clustering, Microsoft advised to provide each clustered SQL Server instance with its own Microsoft Distributed Transaction Coordinator (MSDTC) resource. Since SQL Server 2012 this advice has been withdrawn. Microsoft now recommends to provide your instance with its own MSDTC resource, once you notice the […]

5 (4)

You rated this post out of 5. Change rating

2025-04-04

2,719 reads

SQLServerCentral Article

Logon monitoring in SQL Server and Azure Managed Instances - Adopting Extended Events

Intro In 2008 I wrote an article called “Scope: The drastic caveat with Logon Triggers.” Ever since, we have been using Event Notifications to capture logins for our SQL Server instances. Issues were only very rare, usually on servers that had an extreme load of many connections. In such a case, we stopped this continuous monitoring and […]

5 (5)

You rated this post out of 5. Change rating

2021-10-29

4,846 reads

SQLServerCentral Article

Getting SQLAgent to Respond Faster

One limitation of SQLAgent is that granularity to which you can schedule jobs: every minute. Sometimes there are things that you would like to happen more frequently, like alerting. Johan Bijnens brings us a technique for getting your SQL Agent to respond to alerts in as little as every 10 seconds.

You rated this post out of 5. Change rating

2007-08-16

5,794 reads

Blogs

The Book of Redgate: We Value Teams

By

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

Troubleshooting TempDB Log Full Errors When SSMS Won’t Connect

By

Have you ever received the dreaded error from SQL Server that the TempDB log...

Accelerating AI with Confidence: Why Microsoft Purview is Key to Responsible Innovation

By

Artificial intelligence is no longer a distant concept. It is here, embedded in the...

Read the latest Blogs

Forums

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...

Is there some good routines for updating SQL Server database objects with GitHub

By Rod at work

At work we've been getting better at writing what's known as GitHub Actions (workflows,...

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