Check Azure SQL DB Space Used
A couple of days ago I was doing some cleaning on some Azure SQL DBs and shrinking some files to lower the bill.
To check my progress I needed to...
2024-05-02
214 reads
A couple of days ago I was doing some cleaning on some Azure SQL DBs and shrinking some files to lower the bill.
To check my progress I needed to...
2024-05-02
214 reads
We all know that choosing the right basic SQL training is absolutely crucial if you want your SQL journey to be a success story, especially when you're starting from...
2024-05-01 (first published: 2024-04-30)
246 reads
Let's get one thing straight: database administration isn't the most glamorous tech job out there. You won't be building flashy user interfaces or trendy AI models. But if you...
2024-05-01 (first published: 2024-04-17)
701 reads
This blog post is about Test Data Management – or my take on it. I just saw that a video I did for my good mates at Redgate is...
2024-05-01 (first published: 2024-04-30)
86 reads
Full documentation on the Undercover Catalogue can be found HERE It’s been a while since the Undercover Catalogue last received an update but having had a few of those...
2024-05-01 (first published: 2024-04-16)
293 reads
Are you looking to boost your skills and knowledge in Database DevOps, learn how to transition to the cloud, and work across multiple databases? Join me and fellow speakers/experts...
2024-05-01
18 reads
Have you ever wanted to filter a visual by selecting a range of values for a measure? You may have found that you cannot populate a slicer with a...
2024-05-01
32 reads
Hey there happy coders! Last weekend I had the pleasure of speaking at the SQL Saturday Atlanta event in Georgia! It was an awesome time of seeing data friends...
2024-04-30
35 reads
It was great being at dataMinds Saturday 2024 this past weekend. A great crowd of data enthusiasts was present to learn from a bunch of local speakers (both old...
2024-04-29
27 reads
I know if you are a SQL Server DBA using Azure SQL DB, you’ve been sorely missing the agent. Enter Elastic Jobs to help you schedule jobs more easily...
2024-04-29 (first published: 2024-04-16)
337 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