Unused Procedure lists - Easiest way
This function is used to get the unused stored procedure list for which doesn't used for given noofdays.
2016-09-01 (first published: 2014-12-03)
3,346 reads
This function is used to get the unused stored procedure list for which doesn't used for given noofdays.
2016-09-01 (first published: 2014-12-03)
3,346 reads
Use this script to generate RESTORE DATABASE scripts for all .BAK backup files from backup location during Instance or Database migration.
2016-08-31 (first published: 2014-12-10)
4,024 reads
Short little script to get the columns in a table in order into a CSV format.
Can be useful for select or insert statements.
2016-08-30 (first published: 2015-03-23)
4,615 reads
This In-line Table Valued Function returns a table with individual records parsed from a string.
2016-08-26 (first published: 2015-04-01)
5,211 reads
A brief introduction to the sparse option and script to help decide when to use it
2016-08-25 (first published: 2015-04-10)
1,736 reads
2016-08-23 (first published: 2015-05-01)
1,488 reads
I comment CATCH section for removing dependence to log procedures.
Github link: https://github.com/ktaranov/sqlserver-kit/blob/master/Stored_Procedure/usp_bcpTableUnload.sql
2016-08-22 (first published: 2015-05-07)
2,223 reads
2016-08-19 (first published: 2015-05-13)
2,078 reads
Database Migration - Lower version of Microsoft SQL Server to Higher version of SQL Server, with complete DBA Guide with Automated Scripts and Steps.
2016-08-16 (first published: 2015-01-29)
7,041 reads
Calculates and returns age in text to closest minute between 2 datetimes, eg: 2 Years, 4 Months, 12 Days, 4 Hours, 17 Minutes
2016-08-12 (first published: 2012-05-17)
1,746 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