2012-12-14 (first published: 2012-11-27)
1,917 reads
2012-12-14 (first published: 2012-11-27)
1,917 reads
Get information about how often, how fast your reports run and how big they are.
2012-12-12 (first published: 2012-11-27)
1,636 reads
This script will return all the Adhoc Single use Plans currently in your Plan Cache.
It also excludes Plan Shells created from auto/forced parameterization. Works for 2005/2008
2012-12-11 (first published: 2012-11-26)
828 reads
2012-12-07 (first published: 2012-11-19)
1,390 reads
Script to loop thru multiple linked server and get agent scheduled jobs for the next XX hours.
2012-12-06 (first published: 2012-11-16)
919 reads
2012-12-03 (first published: 2012-11-07)
2,026 reads
2012-11-30 (first published: 2012-11-03)
1,100 reads
Stored proc for scripting out full CREATE INDEX statements from your table indexes with all filegroup, filter and WITH parameters.
2012-11-27 (first published: 2012-10-18)
2,472 reads
This script will provide a dynamic mechanism to decide between REBUILDING an index or simply REORGANIZING an index. Tested and approved for SQL Server 2005 & 2008 Standard or Enterprise or R2.
2012-11-26 (first published: 2012-10-18)
3,917 reads
This script will produce the top 10 wait state issues along with their descriptions.
2012-11-22 (first published: 2012-10-22)
1,770 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