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,920 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