usp_SQLServerCarpenter_Tools_Estimate_Cardinality
This procedure will estimate the cardinality of all the columns of the supplied table list. If the table list is not supplied (or supplied with NULL, the default value)...
2022-07-11
31 reads
This procedure will estimate the cardinality of all the columns of the supplied table list. If the table list is not supplied (or supplied with NULL, the default value)...
2022-07-11
31 reads
This procedure will list down all the indexes (Clustered as well Nonclustered Indexes) whose first key column having poor cardinality.
2022-07-11
33 reads
This procedure will list down all the nonclustered indexes, which includes key columns as that of the clustered index. It will also list the key columns of both –...
2022-07-11
28 reads
This procedure will generate SQL Code for Get and Put API's. This may be useful if you are developing your own data replication strategy to replicate data across multiple...
2022-07-11
48 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...
2022-07-08
45 reads
Last Updated on January 24, 2023 by John Morehouse In today’s modern world, virtualization is often used to help mitigate cost as well as to provide flexibility in scaling...
2022-07-08
24 reads
We added a solar system to the ranch as a way to hedge against future costs as well as require less energy from the utility. I don’t plan to,...
2022-07-08 (first published: 2022-06-24)
235 reads
This is the first in the series of tools and technologies that I use to deal with the loss of functionality in my hands and arms. Check out this...
2022-07-08 (first published: 2022-06-24)
341 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...
2022-07-07
18 reads
For two years and three months, since April 2020, I’ve posted a tweet saying “Good Morning!” on every workday. I think I missed one. I was late for a...
2022-07-07
44 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