Split Function to break the Job History Message into a Table
Split Function for T-SQL Server to break the Job History Message into Table.
2012-03-22 (first published: 2012-03-05)
1,090 reads
Split Function for T-SQL Server to break the Job History Message into Table.
2012-03-22 (first published: 2012-03-05)
1,090 reads
A small retake on the popular percent complete script which tell how much more time an executing command will take.
2012-03-21 (first published: 2012-03-07)
1,624 reads
The job will send an HTML email with the latest error at specific job.
2012-03-15 (first published: 2012-03-05)
895 reads
Stored procedure to update SSRS Subscription owners to avoid email errors.
2012-03-13 (first published: 2012-02-28)
1,463 reads
Loads temporary stored procs that assist in running and monitoring server-side tracing.
2012-03-12 (first published: 2012-02-21)
1,105 reads
Script which uses SQL Server DMOs to gather top CPU taxing queries which can benifit most from tuning.
2012-03-10
2,886 reads
Generate a "INSERT INTO...SELECT FROM" script for a table with an identity column.
2012-03-09 (first published: 2008-01-07)
4,247 reads
You can use this script to check if any procs will break under compatibility level 90.
2012-03-08 (first published: 2008-01-29)
4,370 reads
Two simple scripts to check table and database sizes. The scripts use temporary tables and the sp_msforeachdb/sp_msforeachtable stored procedures to present the output neatly.
2012-03-07 (first published: 2012-02-19)
2,695 reads
Procedure changes all databases' recovery mode to simple and shrinks them all (or at least it tries to).
2012-03-07 (first published: 2008-01-14)
3,921 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