2007-12-18 (first published: 2007-10-18)
2,684 reads
2007-12-18 (first published: 2007-10-18)
2,684 reads
2007-12-12 (first published: 2007-10-12)
3,557 reads
This script returns the defined rowlength and the actual datalength for the longest row in a table.
2007-12-10 (first published: 2007-10-01)
935 reads
2007-12-05 (first published: 2007-10-17)
685 reads
This script will delete all rows from the database, except system tables.
2007-11-26 (first published: 2007-09-30)
1,705 reads
As per Threshold value DBA will get notified about the Disk Drive usage.
2007-11-23 (first published: 2007-10-08)
1,823 reads
This tabled valued function can be used to parse a comma seperated list of IDs so you can pass a parameter to use in a in clause without having to use dynamic SQL.
2007-11-22 (first published: 2007-10-04)
894 reads
Script will Provide us about the person who is running query and from where and why it is slowing down your CPU.
2007-11-20 (first published: 2007-08-28)
2,895 reads
i was trying to use the script 'create log tables and trigger' by well0549 it was very helpfull but at some tables it just didnt work ..later i find out that these tables have an identity columns but they were tinyint or small int .. i didnt do much but i did add less than […]
2007-11-14 (first published: 2007-09-03)
731 reads
This SP will be create C# classes using all table in the specified Database
2007-11-13 (first published: 2007-09-04)
2,514 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