SQL Homework – August 2021 – Security Standards
A few years back (wow time flies) I had you Work with Security. It’s been a while so if you ... Continue reading
2021-08-18 (first published: 2021-08-03)
319 reads
A few years back (wow time flies) I had you Work with Security. It’s been a while so if you ... Continue reading
2021-08-18 (first published: 2021-08-03)
319 reads
When running multiple SQL Server containers on a Docker host we should always be setting CPU and Memory limits for each container (see the flags for memory and cpus...
2021-08-18 (first published: 2021-08-06)
333 reads
Last week, on Wednesday August 11, 2021 at approximately 3:45PM Eastern, my Father left this world. Much too early. Covid took my Father from me, my family, and his...
2021-08-17
17 reads
SQL Server Pure Storage SQL Server Platform Guides Pure Storage SQL Server Best Practices Pure Storage SQL Server Scripts on GitHub Pure Storage ActiveCluster with SQL Server Azure...
2021-08-17
45 reads
I’m a beginner in data science. I know a lot of general things about the field, but I’m really a beginner in most ways. This Friday, 20 Aug 2021,...
2021-08-16
34 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-08-16
25 reads
(2021-July-30) A picture is worth a thousand words, the same way a visual database schema is better than a database model communicated by a multitude of data scripting text objects.
Someone...
2021-08-16 (first published: 2021-07-31)
967 reads
You might be asking why on earth would you want to get a database into an undesirable state, more specifically into a Recovery Pending state. Well, in my case,...
2021-08-16 (first published: 2021-07-30)
1,419 reads
We are proud to feature Jessica Petrie of Yoga Next Door, HBCU Gameday, and other inspiring customers at the second Official WordPress.com Growth Summit, on Tuesday, August 17.
2021-08-16
36 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-08-13
21 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 What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...
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