Blogs

Technical Article

Finding a Work-Life Balance

  • Article

Like most everyone who works hard in our industry, I’ve run into more than a few conflicts trying to balance work and life. Personally, the further I progress in my career, the blurrier the lines become between work time, family/me time, and just plain lazy downtime. It’s quite easy to say that you’re going to spend X hours at work, and the rest of the time is mine, but the reality is ...

You rated this post out of 5. Change rating

2009-03-06

1,308 reads

Technical Article

Detecting When a Login Has Implicit Access to a Database

  • Article

Yesterday I blogged about how to figure out what database principals corresponded to what server principals . The key is to match up the SIDs between sys.server_principals and sys.database_principals. But I also stated there were 3 cases where the logins...

You rated this post out of 5. Change rating

2009-03-05

2,928 reads

Technical Article

PASS Update #6

  • Article

It's been pretty busy since my last post. Just in one week I had at least 12 hours devoted to PASS activities, and I'll share details of some of that here. To start with, I was able to mark another of my Q1 goals complete as Sanj from PASS HQ...

You rated this post out of 5. Change rating

2009-03-04

1,324 reads

Technical Article

You Must Trust Your DBAs

  • Article

This is a follow-on post to You Must Trust Someone. My point in that post was to establish that being able to and and actually trusting your account and server administrators is a necessity. I didn't go into the business aspect of that, but basically it boils down to having a good selection process for candidates, checking out their references, ...

You rated this post out of 5. Change rating

2009-03-03

2,022 reads

Technical Article

Red Gate Software Supports SQLSaturday!

  • Article

If you've read my blog over the past year and a half you know that I've been heavily involved in trying to build a 'franchise' around SQLSaturday, with the guiding principle being that the event has to be locally owned. We've had some decent success, but we've also seen that in many cases groups are reluctant to try hosting one, usually due to one of the following:

You rated this post out of 5. Change rating

2009-03-02

1,244 reads

Technical Article

SQL Saturday

  • Article

sql_saturday_logo I’ve been pretty lucky in my career to have the opportunity to attend quite a few conferences. I’ve attended one, and often more than one, a year, and I’ve had great opportunities to not only learn more about SQL Server and technology, but also to network and meet professionals from all over the world, many of whom have become good friends.

You rated this post out of 5. Change rating

2009-03-02

1,852 reads

Technical Article

How do I ... Determine Database Growth If I Am Not Tracking It? -- Error Logs Part III

  • Article

How do I ... Determine Database Growth If I Am Not Tracking It? If your database has grown considerably and you're not sure when or why it happened, you'll be hard pressed to figure out the answer unless you're tracking changes in database size.

You rated this post out of 5. Change rating

2009-02-27

4,388 reads

Technical Article

You Must Trust Someone

  • Article

After some recent talks with security folks and auditors, one of the things I have had a hard time getting across is that you must trust those folks responsible for account and server management when it comes to securing your data. Yes, you can put in...

5 (1)

You rated this post out of 5. Change rating

2009-02-26

2,549 reads

Blogs

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

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

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