Comparing Stored Procedures, Part 2
Second in a series of scripts demonstrating a quantitative comparison between the text of two stored procedures
2011-03-29 (first published: 2009-02-09)
2,528 reads
Second in a series of scripts demonstrating a quantitative comparison between the text of two stored procedures
2011-03-29 (first published: 2009-02-09)
2,528 reads
2011-03-28 (first published: 2009-02-06)
8,117 reads
This custom sp rebuilds \ reorganizes indexes for SQL 2005 databases and logs results for further analysis.
2011-03-25 (first published: 2009-02-16)
7,191 reads
Using opendatasource to retrieve data from Excel files as if querying a table.
2011-03-22 (first published: 2009-01-27)
11,869 reads
2011-03-18 (first published: 2010-09-21)
2,853 reads
This script will allow you to update 2 databases with the same names, but different schemas/software/database versions.
2011-03-14 (first published: 2011-03-03)
2,229 reads
Returns the item from a delimited list at the specified position. Both position and delimiter are parameters.
2011-03-10 (first published: 2011-02-21)
1,072 reads
2011-03-09 (first published: 2011-02-21)
805 reads
2011-03-07 (first published: 2011-02-21)
8,669 reads
2011-03-04 (first published: 2011-02-21)
6,127 reads
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...
It is Friday, the queries are running, and nobody is watching the bill. That...
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