Azure SQL – Saving Costs
When moving to a cloud model for your database stack no doubt you will be involved in a costing exercise. The good news is if you have Software Assurance...
2021-04-01
33 reads
When moving to a cloud model for your database stack no doubt you will be involved in a costing exercise. The good news is if you have Software Assurance...
2021-04-01
33 reads
I always follow a contained user model when setting up users within my Azure SQL Database. I do this so the user in question has access to only specific...
2021-03-12 (first published: 2021-03-09)
341 reads
It has been a while since I wrote a blog post for TSQL Tuesday and there is no better time then now following on from Brent Ozar’s Invite about...
2021-03-09
158 reads
Taking a screen shot from my Azure Portal, you will see the available hardware configurations available for Azure SQL Database. I wrote about Generation 4 and 5 in the...
2021-02-18
55 reads
For the past year Microsoft have said that Generation 4 hardware is soon coming to its end of life. I know many installations that have used Generation 4 over...
2021-02-16
954 reads
When you have the need to find out real time what is causing high CPU issues within your Azure SQL Database, there is nothing better than using TSQL and...
2021-02-10
226 reads
There is a new (ish) interface to looking and configuring backups for your Azure SQL Database. This can be found within the settings section of the SQL Server. As...
2021-02-02
98 reads
Following on from a previous blog post (https://blobeater.blog/2021/01/15/sql-server-linux/) on installing SQL Linux, a common requirement will be the need to connect to it to issue queries, typically via SQLCMD)....
2021-01-25
74 reads
If you are building database solutions in Azure , using Azure SQL Database then you will know that you have a purchasing option decision to make. That being should...
2021-01-19
303 reads
If you have come from a windows background you may be curious about the world of SQL Server Linux. Yes, the operating system and the implementation of it differs...
2021-01-15
438 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