Additional Articles


External Article

A Re-Introduction to HIPAA and SOX

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

External Article

Calling all Oracle Database users

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

External Article

Introduction to SQL Server Security — Part 3

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

External Article

The BI Journey: The Expert’s Advice – Part 1

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

External Article

Benefits of Data Masking highlighted in Gartner’s 2018 Market Guide

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

External Article

Back to Basics; Masking Address Data

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

Blogs

Five Ways Redshift Serverless Quietly Eats Your Budget

By

It is Friday, the queries are running, and nobody is watching the bill. That...

A Career of Memories

By

Annabel retired from Redgate Software this week. Across most of my career at Redgate,...

Rethinking Index Maintenance: Why avg_fragmentation_in_percent Is Outdated and What You Should Do Instead

By

As a SQL Server DBA with years of experience tuning production environments, I’ve seen...

Read the latest Blogs

Forums

What is the Cloud?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item What is the Cloud?

Changing the Schema

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Changing the Schema

Index Fragmentation Explained: Page Splits, Logical Reads, and What to Do

By Sanket Parmar

Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...

Visit the forum

Question of the Day

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
GO
I 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
GO
This worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3;
GO
What happens with this code?
SETUSER 'USER2'
GO
SELECT * FROM MySchema.MyTable
GO

See possible answers