Generate scripts for SQL Server Management Studio diagrams
The procedure generates an import script of diagrams.
2019-04-15 (first published: 2017-03-22)
6,721 reads
The procedure generates an import script of diagrams.
2019-04-15 (first published: 2017-03-22)
6,721 reads
Provides a robust breakdown of all indexes contained within a database allowing for quick analysis and identification of inefficient, redundant, unused, bloated, stale, and / or poorly architected indexes.
2019-04-15 (first published: 2013-11-08)
7,187 reads
2019-04-15 (first published: 2009-08-31)
1,305 reads
Procedure to search any database (or a combination of databases, including all) for a specific string found in column names, object names, and / or object definitions.
2019-04-15 (first published: 2009-04-29)
5,035 reads
It's you versus the computer in the classic game of Battleship, completely playable from the SQL Server Management Studio interface!
2019-04-15 (first published: 2014-04-25)
8,443 reads
Overview report for tracking key database performance metrics, general system stats, overall activity, and general server info, including: properties and settings, uptime, drive space, DB size allocation, growth stats, backups, jobs, index fragmentation, missing and unused indexes, and much more.
2019-04-15 (first published: 2010-05-11)
16,040 reads
Search for a string value within columns of data types CHAR, NCHAR, NTEXT, NVARCHAR, TEXT, VARCHAR, XML.
2019-04-15 (first published: 2012-03-19)
6,753 reads
2019-04-15 (first published: 2012-11-26)
3,395 reads
2019-04-15 (first published: 2009-10-27)
15,583 reads
A nasty fast way to remove non-numeric and non-alphanumeric characters from a string
2019-03-15 (first published: 2016-05-17)
3,321 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