2015-04-24 (first published: 2008-07-24)
2,708 reads
2015-04-24 (first published: 2008-07-24)
2,708 reads
This script helps to identify which database/log takes most of the disk space and how much is free.
2015-04-15 (first published: 2013-06-18)
2,999 reads
Sometimes running DBCC CHECKDB WITH DATA_PURITY returns thousands of affected columns. This script automates the identification of those columns.
2015-04-13 (first published: 2013-07-04)
2,421 reads
Find any code objects that interact with a given table/view, or call another given code object.
2015-04-10 (first published: 2013-07-05)
4,632 reads
A stored procedure that will parse (shred) the contents of any well-formed XML document into a SQL table.
2015-04-08 (first published: 2013-07-09)
5,219 reads
One of the fastest ways to find out objects dependencies in SQL Server.
2015-04-07 (first published: 2013-07-29)
3,300 reads
This script will check if the SQL Server you are connected to is actually running.
2015-04-01 (first published: 2015-03-27)
1,803 reads
This procedure let you list [optional] by table:
-Foreign keys
-Primary key
-Indexes
2015-03-27 (first published: 2014-02-06)
4,047 reads
Create a stored procedure that will send the result of a query as an html table from the database mail.
2015-03-26 (first published: 2014-02-14)
5,141 reads
2015-03-25 (first published: 2014-02-25)
8,388 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