Now Serving: SQL Server 2008 SP2 CTP
For those of us who love to get our hands on the latest and greatest shiny new things, the wait...
2010-07-08
370 reads
For those of us who love to get our hands on the latest and greatest shiny new things, the wait...
2010-07-08
370 reads
I had the opportunity to serve on the Program Committee for the 2010 PASS Summit. My job was rating and...
2010-07-08
335 reads
Recently quite a few MVPs (here, here and here ) are handling out MSDN Ultimate subscriptions in the community. What interests...
2010-07-08
1,170 reads
I have been procrastinating this evening, I have several blog posts that I want to write but the football is...
2010-07-08
601 reads
I'm going to try and do a better job of announcing free training and learning opportunities. With that said, there's...
2010-07-08
706 reads
Microsoft has made the Community Technology Preview (CTP) of SQL Server 2008 SP2 available for download. This is Build 3798,...
2010-07-08
1,206 reads
One of the things I have to do every month is process payments for the authors. It’s my job to...
2010-07-08
328 reads
During a recent call I was talking with someone about achieving a career goal (coaching in itself, though unplanned) and...
2010-07-08
765 reads
Join Brad Schacht this week on the SQL Lunch to learn about Looping in SSIS. Go to SQL Lunch and...
2010-07-07
607 reads
Getting Started with SQL Azure - Very nice & short document about SQL Azure beginning process. This is the official document that...
2010-07-07
1,289 reads
By Steve Jones
It’s Prime Day. A few of my recommendations, since I want to do some...
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
If you’ve been watching AI roll through the data community and thinking, “this seems...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
WhatsApp:0818-751-777 Jl. Kalierang No.Ruko 3-5, Dukuhturi, Kec. Bumiayu, Kabupaten Brebes, Jawa Tengah 52273 (@bcakcpbumiayu)
WhatsApp:0818-751-777 Menara Satu Sentra Klp. Gading, Jl. Boulevard Bar. Raya No.1 Lt. Dasar, 1,...
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