Tuning Parallelism on SQL Server
Parallelism and MAXDOP
There’s no doubt that parallelism in SQL is a great thing. It enables large queries to share the...
2017-05-26
5,306 reads
Parallelism and MAXDOP
There’s no doubt that parallelism in SQL is a great thing. It enables large queries to share the...
2017-05-26
5,306 reads
A quick post that is hopefully useful, I wanted a quick way to find the time, size of the database...
2017-05-25
326 reads
So in my last post I told you about how I started my journey on learning PowerShell, let’s keep going down that path together. In this post I’m going...
2017-05-25
15 reads
So in my last post I told you about how I started my journey on learning PowerShell, let’s keep going...
2017-05-25
537 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as...
2017-05-25
722 reads
For the first time in many years, I won’t be at IT/DevConnections this fall. I’m disappointed to miss the event,...
2017-05-25
549 reads
I am so excited and honored to have been selected to speak at SQL Saturday Atlanta (#652) this year. This...
2017-05-25
326 reads
With the ability to create content delivery schedules, or to subscribe to report content delivery, it becomes very important to also know when the various reports are scheduled to...
2017-05-25
308 reads
Reporting Services
Over the past couple of articles I have illustrated some of the fun that can be had when dealing...
2017-05-25
1,103 reads
T-SQL Tuesday is a monthly blog gathering for the SQL Server/Data Professional community It is the brainchild of Adam Machanic (B|T)...
2017-05-25 (first published: 2017-05-09)
2,081 reads
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
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,...
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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
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