Beginning Powershell Companion PDF
Howdy all…as is so often the case, I’m studying something – Powershell – and I’m in need of a reference to help...
2011-01-06
3,404 reads
Howdy all…as is so often the case, I’m studying something – Powershell – and I’m in need of a reference to help...
2011-01-06
3,404 reads
Managing disk space is an important resposibility of the DBA, and there are many ways to perform this task. In...
2011-01-05
2,088 reads
As I mentioned in the introductory post, I’m writing 31 Days of SSIS. Let’s start off this series with a...
2011-01-05
3,133 reads
She can dig it!
D Sharon PruittA few posts ago in the plan cache series I discussed the children for the...
2011-01-04
1,211 reads
There are two primary relational workload types that SQL Server commonly has to deal with, the first being Online Transaction...
2011-01-03
2,280 reads
Did you know you can easily get a Dedicated Admin Connection (DAC) in SSMS? I didn’t assuming that I’d need...
2010-12-31
1,433 reads
The best new management feature added to SQL Server 2008 is Policy Based Management or PBM. PBM allows DBAs to...
2010-12-30
1,727 reads
In this article, I thought of explaining different types and levels of index pages. but while start preparing for that, I realise...
2010-12-29
5,713 reads
Once upon a time a group of twelve bloggers agreed to each pick a post (or posts) they found interesting...
2010-12-28
1,371 reads
Before moving on to see anatomy of different types of pages, lets spend some time to understand
The relationship among sys.objects,...
2010-12-27
4,468 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