Blogs

Technical Article

Database Mirroring FAQ: If the principal fails while running in high performance mode, what options do I have for bringing the mirror online?

  • Article

Question: If the principal fails while running in high performance mode, what options do I have for bringing the mirror online? This question was sent to me via email. My reply follows. Quick question on DB mirroring client redirection after Principal fails

You rated this post out of 5. Change rating

2009-02-24

3,649 reads

Technical Article

Database Mirroring FAQ: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup?

  • Article

Question: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? This question was sent to me via email. My reply follows. Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? Databases to be mirrored are currently running on 2005 SQL instances but will be upgraded to 2008 SQL in the near future.

You rated this post out of 5. Change rating

2009-02-23

1,567 reads

Technical Article

Another Reason to Avoid Cross-Database Ownership Chaining

  • Article

This past weekend we were moving database files around because we added new LUNs to an existing production cluster. We went at the old tried and true way, we detached the databases, moved the files, and re-attached the databases. That seemed to work well...

You rated this post out of 5. Change rating

2009-02-20

2,133 reads

Technical Article

Networking - Part 5

  • Article

You can read the previous posts here. To finish up my thoughts on networking I want to brain storm some about how we might make it easier and more effective for the average Joe (which is most of us) to network. If you've been to the PASS Summit, or...

You rated this post out of 5. Change rating

2009-02-19

1,120 reads

Technical Article

The Importance of the Segregation of Duties with Respect to Internal Controls

  • Article

I diverge a little from the typical coding-based/oriented best practice to one that is focused on governance within public or government organisations with respect to the security of the data in databases used for annual reports. Internal controls fall...

You rated this post out of 5. Change rating

2009-02-19

1,166 reads

Technical Article

Networking - Part 4

  • Article

You may want to read Part 1 , Part 2 , and Part 3 before continuing. This time around I'd like to talk about social networking. We'll start with social networking. Facebook, MySpace, and Twitter are all good examples of using technology to let...

You rated this post out of 5. Change rating

2009-02-17

1,530 reads

Technical Article

Things You Know Now…

  • Article

Someone tagged me, and I’ve lost the email in all the pile up from vacation where I was very, very unwired from work, despite being wired to the world. Actually I’ll make that one my first thing: Know When to Walk Away Not quit, not stop progressing on...

You rated this post out of 5. Change rating

2009-02-16

1,439 reads

Technical Article

Things I Wish I Had Known

  • Article

I was tagged by Grant Fritchey (aka Scary DBA) in the latest get-to-know-you question. This one asks, “What do you wish you had known when you started?” I could go on for hours about the things I wish I hadn’t had to learn the hard way, but..

You rated this post out of 5. Change rating

2009-02-16

2,038 reads

Technical Article

Speaking at Community Events - More Thoughts

  • Article

Last week I posted Speaking at Community Events - Time to Raise the Bar?, a first cut at talking about to what degree we should require experience for speakers at events like SQLSaturday as well as when it might be appropriate to add additional focus/limitations on the presentations that are accepted. I've got a few more thoughts on the topic this week, and I look forward to your comments.

You rated this post out of 5. Change rating

2009-02-13

360 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