SQL Server and AKS
Following on from my last post after creating AKS, I now want to work with SQL server. First step, load up Azure cloud shell. Run the following commands Here...
2021-07-29
52 reads
Following on from my last post after creating AKS, I now want to work with SQL server. First step, load up Azure cloud shell. Run the following commands Here...
2021-07-29
52 reads
I’m thrilled to have recently released a video with Microsoft’s Data Exposed on Channel 9 where I discuss setting up Linux storage appropriate for on-demand disk expansion for your...
2021-07-29
94 reads
Each resource type in Azure has a naming scope within which the resource name must be unique. For PaaS resources such as Azure SQL Server (server for Azure SQL...
2021-07-29
55 reads
This post is part of the series I kicked off here. You can read my post about captions here. Let’s talk about slides! Many of us are familiar with...
2021-07-28
20 reads
In this video Devin covers the the beginning design of a Power Automate Desktop Flow that will be used over the course of the next
2021-07-28 (first published: 2021-07-15)
563 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2021-07-28
37 reads
While testing a script that involved calculating index record size recently I was getting some confusing results depending on server version, and after some digging it appears there was...
2021-07-28
10 reads
While testing a script that involved calculating index record size recently I was getting some confusing results depending on server version, and after some digging it appears there was...
2021-07-28
69 reads
I want to start by saying thank you to all who submitted, and an amazing collection of people submitted some fantastic content. Also, thanks to Steve for asking me...
2021-07-28 (first published: 2021-07-17)
414 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I’ve been writing about window functions, which I...
2021-07-28
43 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