Retrieve instance-wide index level fill factor information
This script retrieves all fill factor information for all indexes (clustered and non) when it is not set to 0 or 100
2014-10-24 (first published: 2014-10-14)
629 reads
This script retrieves all fill factor information for all indexes (clustered and non) when it is not set to 0 or 100
2014-10-24 (first published: 2014-10-14)
629 reads
2014-10-16 (first published: 2014-09-11)
1,224 reads
This script is to help monitor the AAG DB synchronization status. It sends an HTML formatted email if Synchronization status is not "Synchronized" or "Synchronizing"
2014-10-14 (first published: 2014-09-09)
960 reads
For maximum performance, tempdb should be placed on a seperate disk. This script does all the work for you, except the restart!
2014-10-13 (first published: 2014-09-09)
1,504 reads
What is completed datatypes in sqlserver and how it works in Real time.
2014-10-10 (first published: 2014-09-06)
1,482 reads
Extract only integers or characters from alphanumeric :
2014-10-07 (first published: 2014-09-05)
1,529 reads
Rename indexes according to pattern:
IX_<TableName>_<Col1>_<Col2>..
or
AK_<TableName>_<Col1>_<Col2>..
2014-10-06 (first published: 2014-09-04)
1,084 reads
This script summarizes the execution statistics of the stored procedures which was run on the current database in the last 7 days.
2014-10-01 (first published: 2012-04-18)
7,373 reads
This script was designed to provide you with all the information needed to rebuild your server in case of a disaster. Current version work with 2005, 2008, 2008R2 and 2012.
2014-09-30 (first published: 2012-09-21)
8,275 reads
2014-09-29 (first published: 2010-02-04)
9,476 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