My backup and SLEEP_BPOOL_FLUSH
I noticed that my backup was taking longer than usual. I went to Perfmon to look at some counters, more...
2017-02-01
824 reads
I noticed that my backup was taking longer than usual. I went to Perfmon to look at some counters, more...
2017-02-01
824 reads
This is a new feature where you can issue TSQL commands via a TSQL editor straight from the Azure portal,...
2017-01-25
614 reads
You are probably wondering what this is, quite honestly I was wondering too. Well it is an extended events session...
2017-01-23
1,920 reads
I was having a conversation with Oracle professionals the other day and they started to discuss the Oracle ACE program...
2017-01-20
661 reads
I sometimes forget that Microsoft watches out for us by proactively looking at the behaviour of our SQL databases in...
2017-01-18
505 reads
Wait statistics is a great place to start looking into performance issues. Normally people would issue commands/queries based on sys.dm_os_wait_stats...
2017-01-16
628 reads
I was building some basic queries around time zone manipulation and I am happy to say that I enjoyed myself...
2017-01-13
1,326 reads
This is an entry level post and a response to SQLEspresso’s blog challenge(http://sqlespresso.com/2017/01/10/ooops-was-that-was-me-blog-challenge) where we share mistakes from our “younger”...
2017-01-11
821 reads
T-SQL Tuesday #86: SQL Server Bugs & Enhancement Requests hosted by Brent Ozar. https://www.brentozar.com/archive/2017/01/announcing-t-sql-tuesday-87-sql-server-bugs-enhancement-requests/ I did not want to miss out...
2017-01-10
635 reads
Sometimes when in a testing mode I do like to clear cache within my SQL database (Azure). Nowadays a lot...
2017-01-05
698 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