2023-09-18
288 reads
2023-09-18
288 reads
Learn how you can use AutomatedLab to quickly create new environments.
2023-08-04
2,867 reads
This article will show how to use the Azure Cloud Shell and PowerShell to set up a new Azure SQL Database.
2023-07-07
1,318 reads
Today we have a guest editorial from Brian Walker, the developer for SQLFacts. He discusses the value from his toolkit and why it can be useful for developers.
2023-06-16
289 reads
2023-05-19
547 reads
See how the new, open-source sqlcmd works with containers to kickstart the development experience.
2023-04-28
3,231 reads
Steve takes a look at go-sqlcmd, the newest evolution of the sqlcmd command line tool.
2023-04-21
8,255 reads
Microsoft combined the power of two powerful tools by announcing the public preview of Azure Automation Visual Studio Code Extension. This article will show you how to get started.
2023-02-22
5,901 reads
dbForge SQL Studio gives you a few advantages over SSMS. See what Kenneth discovered during his first use of the tool.
2022-04-27
4,700 reads
You can do essential performance tuning on your SQL Server databases using a FREE toolkit!
2022-01-14
5,570 reads
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
If you’ve been watching AI roll through the data community and thinking, “this seems...
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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