Delayed gratification
Call me odd, but I enjoy taking certification tests. It may be that I've always tested well, or perhaps it's...
2008-07-20
667 reads
Call me odd, but I enjoy taking certification tests. It may be that I've always tested well, or perhaps it's...
2008-07-20
667 reads
Recently I was going through the buy or build process on a small segment of functionality needed for a project,...
2008-07-20
862 reads
Probably the least enjoyable thing about being a DBA is patching servers. We received the bad news in the July MS...
2008-07-19
1,919 reads
A few months back I posted about our latest whiteboard and I thought I'd report back with an update. Initially...
2008-07-17
513 reads
We had a great group of about 35 people last night at the JSSUG (Jacksonville SQL Server User Group) meeting....
2008-07-17
717 reads
Below is a list of various tools I use, some SQL related and some not. Follow the links to my...
2008-07-17
1,178 reads
Long time SSC participant Grant Fitchey has published a great book on reading/understanding execution plans. I finally had the chance...
2008-07-16
1,361 reads
The Midlands PASS Chapter hosts:
SQL Server MVP John Welch
July 17, 2008 at Training Concepts
The Midlands PASS chapter will hold a...
2008-07-16
631 reads
I signed up for the SS2K8 beta exam, the maintenance and implementation one, and had it scheduled for this morning....
2008-07-16
861 reads
USE ADVENTUREWORKS;-- You can use any kind of database that you have
GO
--Procedure that shows all views created on a table,...
2008-07-15
637 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