SQLSaturday Pensacola and Houston
I have the honor of being selected to speak in Pensacola and Houston this month. Pensacola has been a great...
2017-06-01
579 reads
I have the honor of being selected to speak in Pensacola and Houston this month. Pensacola has been a great...
2017-06-01
579 reads
Among the new features of SSIS 2016, one of my favorite is incremental package deployment. This new functionality allows the...
2017-05-31
3,133 reads
This post is a long overdue second part to the post on Chi Square Test that I did a few months...
2017-05-31 (first published: 2017-05-22)
1,479 reads
My First INSERT Statement Last week we covered how to get information out of a table, using a SELECT query....
2017-05-31
393 reads
By Steve Bolton
…………To avoid overloading readers with too many concepts at once, I split my discussion of Dempster-Shafer Evidence...
2017-05-31
759 reads
If you’ve ever searched for SQL Server parameter sniffing you’ve probably read all sorts of bad things about it. In...
2017-05-31
121 reads
1. What is angular module?
NgModule helps to organize an application into organized blocks of functionality. @NgModule decorator takes metadata that...
2017-05-30
640 reads
Continuation from the previous 105 parts, the whole series can be found at http://www.nikoport.com/columnstore/.
One of the most important and recurring...
2017-05-30
919 reads
Hi Guys,
Hope everyone is doing well. Last week, I was working on the most exciting task on which any database...
2017-05-30
835 reads
Kevin Hill mentioned this idea/series on a SQL community slack channel back in April and I thought it would be a good way to get back to blogging. The timing...
2017-05-30
25 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