Export Azure SQL DB to Storage
After a data migration, we needed to decommission the old Azure SQL DBs, but we wanted to keep a copy in case we needed anything later. Enter exporting an...
2024-07-03 (first published: 2024-07-02)
439 reads
After a data migration, we needed to decommission the old Azure SQL DBs, but we wanted to keep a copy in case we needed anything later. Enter exporting an...
2024-07-03 (first published: 2024-07-02)
439 reads
I had a customer that was looking to document a restore that had occurred on one of their systems and didn’t see it. They had concerns about SQL Server...
2024-07-03
670 reads
A couple of weeks ago, a developer came to me and wanted to know how to figure out what was causing a deadlock. I honestly didn’t know where to...
2024-07-03 (first published: 2024-06-14)
60 reads
Have you heard the news about the new Power BI Project files? Okay, maybe not news anymore since it was announced over a year ago. Just in case you...
2024-07-02 (first published: 2024-07-01)
100 reads
DIVERSIFY! We devote a lot of time to mastering the technology that we are passionate about or use for our jobs. For example, I specialized in Microsoft business intelligence,...
2024-07-02
95 reads
I wrote an article that was published on SQL Server Central on how to get your scripts into Git. This post adds a few more thoughts on how you...
2024-07-01
356 reads
When you develop data pipelines in Microsoft Fabric (the Azure Data Factory equivalent in Fabric, not to be confused with deployment pipelines), you will most likely have some activities...
2024-07-01 (first published: 2024-06-13)
476 reads
Database Property LastGoodCheckDbTime to Get the Last Successful DBCC CHECKDB on a Database
As one of the preventive database maintenance tasks, performing database integrity checks on almost every database you...
2024-07-01 (first published: 2024-06-13)
574 reads
addleworth – adj. unable to settle the question of whether you’re doing okay in life; feeling torn between conflicting value systems and moveable goalposts, which makes you long for...
2024-06-28
34 reads
Introduction Welcome back to the fifth installment of our blog series on using the Pure Storage PowerShell SDK2. In this post, we’re diving into a hands-on demonstration of using...
2024-06-28 (first published: 2024-06-12)
185 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