Understanding DBCC FLUSHAUTHCACHE
This command only applies to Azure SQL Database, at a high level it empties the database authentication cache for logins...
2018-03-14
747 reads
This command only applies to Azure SQL Database, at a high level it empties the database authentication cache for logins...
2018-03-14
747 reads
When you create a “logical” Azure SQL Server (I say logical because we are not really physically creating anything) there...
2018-03-09 (first published: 2018-03-01)
2,488 reads
Nobody wants to waste money and being in the cloud is no exception! Luckily for us Azure is very efficient...
2018-02-27 (first published: 2018-02-15)
1,789 reads
I am a big fan of this feature, I have written and spoken about it before ( https://blobeater.blog/2018/01/04/azure-sql-analytics/) but I did...
2018-02-26
1,056 reads
I was using a query on one of my local SQL Servers where I wanted to know what logins were...
2018-02-07
1,094 reads
This is quite a new feature (currently in preview) but an important one where we now have the ability to...
2018-02-07 (first published: 2018-01-29)
1,032 reads
Times are changing, 10 years ago I would never have thought that self-tuning databases would be available as a packaged...
2018-01-31 (first published: 2018-01-22)
2,415 reads
I had a strange issue recently when trying to login to the Azure Portal. Quite simply I would enter my...
2018-01-16
269 reads
Today I found out that it is now possible to enable the setting optimize for ad-hoc workloads at the database...
2018-01-16 (first published: 2018-01-08)
1,603 reads
Thank you to everyone that took the time to write and contribute, I enjoyed reading about how you conquered your...
2018-01-11
585 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