Midlands SQL User Group Meeting
Come see John Welch speak on Getting Started With Analysis Services 2008, July 7, 2009 in Columbia, SC
2009-06-25
1,554 reads
Come see John Welch speak on Getting Started With Analysis Services 2008, July 7, 2009 in Columbia, SC
2009-06-25
1,554 reads
It's time for the Exceptional DBA Awards again, and SQLServerCentral.com and Red Gate want to give recognition to a DBA for outstanding work and achievements. Enter Today!
2009-06-15
1,386 reads
If you are near Ahmedabad, come to this event with MVPs Pinal Dave and Jacob Sebastian.
2009-06-12
416 reads
SQLSaturday #17 will be held Aug 1, 2009 in Baton Rouge, LA. Read more about it.
2009-06-10
224 reads
Birmingham (May 20), Pensacola (June 6), and Portland (June 6) are upcoming SQLSaturday events. If you are in the area, please attend.
2009-06-04 (first published: 2009-05-05)
1,524 reads
Come learn about advanced data modeling with Paul Neilsen and DMVs with Glenn Barry, Thur, May 21 in Denver. Steve Jones will attend as well.
2009-05-20
1,223 reads
2009-05-19
751 reads
The June meeting of the Triangle SQL Server User group features MVP Andy Leonard. If you are in the Raleigh area, check this out.
2009-05-18
329 reads
We have a sample chapter available from The Data Access Handbook, written by experts at DataDirect Technologies.
2009-05-15
1,946 reads
Come and join us for this great evening focusing on SQL Server Integration Services and Reporting Services in Cambridge, UK on Wed, May 20, 2009.
2009-05-13
1,313 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