Keeping Perspective: What Are You Building?
Think about your responsibilities at work for a minute. How many do you have? Can you even name them all?
As technical professionals,...
2011-01-24
699 reads
Think about your responsibilities at work for a minute. How many do you have? Can you even name them all?
As technical professionals,...
2011-01-24
699 reads
Microsoft SQL Server Licensing For Dummies..
Don’t let the above title fool you! Have you been confused on the Microsoft...
2011-01-24
89,555 reads
Two Fridays ago, Sean and I sat down for our weekly DBAs@Midnight webshow* as usual. Unusually, we were expecting an out-of-town...
2011-01-24
580 reads
[Commence whine-a-thon, thinly veiled as an introductory paragraph to a blog.]
As I knew it would, it is getting VERY difficult...
2011-01-24
487 reads
We're gearing up the advertising for SQL Saturday #70 since we're about 8 weeks out. In keeping with that, our...
2011-01-24
2,014 reads
AdvertisementsSQLskills Master Immersion Events 2011 competition
I have completed engineering and my native is M.Uthamasolagan (village near chidambaram ). I have...
2011-01-24
629 reads
I'm speaking in context of Getting Things Done, not a legal or contractual agreement. What brought this up is me...
2011-01-24
802 reads
So… this is late. And I missed my q3 goals review all together. Oh well, not much I can do...
2011-01-23
731 reads
Last year I posted professional goals along with quite a few other bloggers and it helped to keep me somewhat...
2011-01-23
769 reads
At last, my blog is starting to pay real dividends. Not only do I get the opportunity to publish my...
2011-01-23
4,025 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