How-To Convert Excel Date & Time to SQL
Hey data friends! This one comes from my personal vault (aka backlog of drafts I’ve been needing to write up) and is a really simple code that I always...
2025-02-14 (first published: 2025-01-28)
1,297 reads
Hey data friends! This one comes from my personal vault (aka backlog of drafts I’ve been needing to write up) and is a really simple code that I always...
2025-02-14 (first published: 2025-01-28)
1,297 reads
Introduction Growing enterprises or businesses that want to remain competitive must make quick decisions daily. While experience and expertise are essential in that process, making those critical calls is...
2025-02-14
11 reads
Introduction Building a practical data governance framework can feel like building a house: you need a strong foundation, reliable materials, and the right team to make it all work. Data governance is crucial for organizations to manage, protect, and utilize their data effectively. A well-defined framework...
2025-02-13
17 reads
You can’t just exec DROP ROLE your_role_name; if it’s granted perms or other roles are granted to it. I had to go fishing to find all the grants to...
2025-02-12 (first published: 2025-01-27)
238 reads
Straight from Microsoft’s documentation “Microsoft Entra authentication is a mechanism of connecting to Azure Database for PostgreSQL flexible server by using identities defined in Microsoft Entra ID. With Microsoft...
2025-02-12 (first published: 2025-02-03)
279 reads
I have a few clients that incrementally load tables from a SQL Server source into their data warehouse or lakehouse by using change tracking. Lately, they encountered some issues...
2025-02-10 (first published: 2025-01-31)
277 reads
Over the years I’ve been called in to work with numerous clients that were hit with ransomware. Even the times that the customer paid the ransom to unlock their...
2025-02-10
27 reads
This is more complicated than using the Azure Migration method, but because it’s maxed out on resources for the last week in the east regions (and possibly central), and...
2025-02-10 (first published: 2025-02-09)
72 reads
In this post, the fourth in our series, I want to share an example demonstrating SQL Server 2022’s T-SQL Snapshot Backup feature in a scenario where a database spans...
2025-02-10 (first published: 2025-02-01)
350 reads
I’ve covered how to create Elastic Jobs in the portal (this one is important to read if you aren’t familiar with elastic jobs already), with Terraform, and with Bicep....
2025-02-09 (first published: 2025-02-07)
59 reads
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
By Tim Radney
As a SQL Server DBA with years of experience tuning production environments, I’ve seen...
Comments posted to this topic are about the item Extreme DAX: Take your Power...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers