What PASS is to me #sqlpass
I found out about the Professional Association for SQL Server (PASS) in 2008 when I attended my first PASS Community Summit “SQL...
2014-09-29
1,632 reads
I found out about the Professional Association for SQL Server (PASS) in 2008 when I attended my first PASS Community Summit “SQL...
2014-09-29
1,632 reads
I was recently called out by Tim Costello on a blog series started by Mike Walsh. http://www.interworks.com/blogs/tcostello/2014/08/27/4-things-i-wish-i-knew-sooner-bi-consultant
The series calls for...
2014-09-02
1,328 reads
Recently an incident came across my desk where an end user was receiving an error trying to retrieve some records...
2014-07-31
2,492 reads
Today I received an email notifying me that I have been awarded the Microsoft “MVP” award. An excerpt from Microsoft’s...
2014-07-01
1,372 reads
I am super excited to announce that I have been selected to speak at the 2014 PASS Summit. This is...
2014-06-25
1,227 reads
Working with Microsoft SQL Server for many years I have spent a lot of time discussing the importance of the...
2014-06-11 (first published: 2014-06-10)
3,394 reads
A couple of years ago I put together a training session to demonstrate various types of backups and restores. The driving...
2014-05-19
1,289 reads
When I started with the SQL Community I was first encourage to start blogging which I started in Sept of...
2014-05-12
1,212 reads
My largest client recently purchased BMC Control-M to use as our enterprise scheduler. Since this product went live in our...
2014-04-14 (first published: 2014-04-04)
4,004 reads
File Group backups are great when working with very large databases (VLDB’s) that have been partitioned. Typically when I come...
2014-03-31
2,735 reads
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...
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Because we are NABL Accredited Laboratories, our personal care and cosmetics research center provides...
WhatsApp:0817-866-887 Jl. Ahmad Yani No.31, Pattunuang, Kec. Wajo, Kota Makassar, Sulawesi Selatan 90174 (@bcakcumakassar)
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