Press Release


SQLServerCentral Article

BDS SQL Digger 2 Released

Have you ever needed to find something in a stored procedure or function and found yourself trying to wade through syscomments? Ever want to know which views reference a table, but you don't trust sysdepends? BDS has released SQL Digger 2.0, a utility designed to help you search through your schema and code to find what you need.

You rated this post out of 5. Change rating

2005-04-18

4,144 reads

SQLServerCentral Article

BDS SQL Digger 2.0 Released

Have you ever needed to find something in a stored procedure or function and found yourself trying to wade through syscomments? Ever want to know which views reference a table, but you don't trust sysdepends? BDS has released SQL Digger 2.0, a utility designed to help you search through your schema and code to find what you need.

(1)

You rated this post out of 5. Change rating

2005-04-05

3,822 reads

SQLServerCentral Article

Beta Call - Randolph for Database Schema Control

Maintaining control of your schema with SQL Server 2000 can be cumbersome. However there are starting to be more and more tools to assist you with version control and tracking your schema over time. Nob Hill software has a tool that helps, which is currently in Beta and code named "Randolph". If you have a need, check out their new product.

You rated this post out of 5. Change rating

2005-03-30

2,660 reads

SQLServerCentral Article

A DBXtra Discount!

SQLServerCentral.com tries to provide you a great deal of value for your subscription fees. We think we do a good job considering the $0 cost 🙂 One of the benefits we sometimes negotiate is a discount on products. DBXtra has generously offered a discount for the next few months, so read on and make your purchase today!

You rated this post out of 5. Change rating

2005-03-11

2,904 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