Santveer Singh

B.Sc, MCSE, 10+ years IT experience, been working with SQL Server since 6.5 (1996). Worked at different levels in IT, Manufacturing and Financial industries. Currently working as SQL Server DBA with Algomod.

SQLServerCentral Article

Finding Objects Owned by non-DBO Users

SQL Server has this concept of an owner of an object. Similar to the concept of schema, but not quite the same. Best practice dictates that all objects in SQL Server be owned by dbo, but that does not always happen. Tracking those objects down might be a pain, but Santveer Singh brings us an easy way of doing this.

You rated this post out of 5. Change rating

2004-12-15

6,059 reads

SQLServerCentral Article

List of Database Users with Database Roles

SQL Server shows lots of information in Enterprise Manager, but getting a report for someone or manipulating this data is hard from the GUI. Using T-SQL, it's easier, but sometimes not obvious how to get the data. Author Santveer Singh brings us a way to get at some of that information, the users and their database roles.

4.89 (19)

You rated this post out of 5. Change rating

2004-11-02

23,760 reads

SQLServerCentral Article

Which Databases are Being Backed Up - Another Look

Knowing which databases are being backed up is a critical thing for all DBAs to know. After reading an article on this subject, new author Santveer Singh decided to share his own techniques for checking SQL Server databases and their backup status. He shows us how to look for failed backups as well as find those databases which have not been backed up.

2 (1)

You rated this post out of 5. Change rating

2004-06-09

9,508 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