SQL Server Referential Integrity Across Databases Using Triggers
In this tip we cover how you can implement SQL Server cross database referential integrity using triggers.
2019-03-13
2,377 reads
In this tip we cover how you can implement SQL Server cross database referential integrity using triggers.
2019-03-13
2,377 reads
SQL Provision can help organizations ensure compliance with regulations such as HIPAA and SOX. But what exactly are these legislations asking of DBAs and how does this impact the work you do? Robert Sheldon provides an overview of the two US regulations in this four-part series.
2019-03-12
2,407 reads
Azure provides a number of different methods that can be used in order to implement and configure its resources. Each of the methods differs to some extent in regard to functionality and intended use cases.
2019-03-12
1,943 reads
We’re excited to announce that Redgate is doubling its efforts on Oracle and committed to aligning its DevOps solution across both SQL Server and Oracle. Please take a few minutes to complete this short survey to stay up-to-date on our Oracle developments.
2019-03-11
2,174 reads
SQL Server supports partially contained databases. This gives you the option of adding database users with a password inside the database. This makes the database easier to move to another instance or participate in an Always On Availability Group. In this article, Robert Sheldon explains how to work with users in contained databases.
2019-03-11
Creating a quick dashboard with a few reports may be the beginning of a BI solution, but unless time is spent on the underlying model, it won't be adaptable enough to grow. In this article by Gogula Aryalingam, you'll see how the advice of a mentor helped a newbie understand how to create a flexible model that will lead to a valuable BI solution.
2019-03-11
2,975 reads
Gartner released their 2018 Market Guide for Data Masking, providing an in-depth analysis of the market with recommendations and representative vendors – including Redgate. Gartner says that "Test data (or copy data) virtualization is a technology that is increasingly popular, when used in combination with SDM (Static Data Masking), to speed up the provisioning of and updates to target environments, in addition to significantly reducing the amount of storage required by these environments.”
2019-03-08
3,821 reads
Azure SQL DB’s Automatic Tuning will create and drop indexes based on your workloads. Brent's latest blog post shows how to enable it and explains what it actually does.
2019-03-08
2,545 reads
Protecting Personable Identifiable Information is central to the compliance of numerous regulations which your organization may be subject to. In this article Grant Fritchey starts with the basics of obfuscating address data with the data masking technology in SQL Provision.
2019-03-07
3,101 reads
T-SQL window functions have been a fantastic addition to the T-SQL language. In this article, Kathi Kellenberger reviews how optimizations available in SQL Server 2019 can improve the performance of these functions.
2019-03-07
2,782 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