Calculate gregorian easter sunday using a table valued function
Calculate gregorian easter sunday using a table valued function.
2014-09-03 (first published: 2014-08-22)
686 reads
Calculate gregorian easter sunday using a table valued function.
2014-09-03 (first published: 2014-08-22)
686 reads
PowerShell script to check last full backup, transaction log backup date for SQL Server databases.
2014-09-02 (first published: 2014-08-22)
1,805 reads
Generate Script All Table and Specific Table By Using SMO C#
2014-09-01 (first published: 2014-08-07)
5,729 reads
a script to import all database sizes from a list of servers into a table using powershell for trending purposes
YOU MUST DOWNLOAD CODEPLEX SQL SERVER MODULE FOR THIS TO WORK.
2014-08-29 (first published: 2012-05-23)
3,291 reads
This Powershell script calls a stored procedure and exports the results to a CSV file
2014-08-28 (first published: 2013-01-03)
5,076 reads
PowerShell script to SlipStream SQL Server 2008 installer with SPx patch.
2014-08-27 (first published: 2013-04-18)
1,191 reads
Find all storage including mount points and show' free and used available. Needs powershell.
2014-08-25 (first published: 2011-12-15)
1,396 reads
Script to restore the entire databases from the backup directory just by passing the backup directory.
2014-08-22 (first published: 2014-02-25)
3,317 reads
I was having a hard time to reading the Windows 2012 R2 Failover cluster log from my live server. That is why I just wrote a simple PowerShell script to get the job done for me.
2014-08-21 (first published: 2014-07-29)
1,752 reads
Last week one of my team members was supposed to create a SQL Authenticated ID on a SQL Server 2005 instance. This was as per the request of the Application team who would be using it for an Application.
2014-08-20 (first published: 2014-08-13)
1,913 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 Extreme DAX: Take your Power...
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
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