External Article

ADO.NET Data Sets

This article looks at how partial classes can be used to implement business logic into datasets so that they are more business aware and intelligent.

The dataset is an integral part of Microsoft’s new data access model ADO.NET. It introduces a simple offline method for retrieving and updating data. Before using the dataset, you should have an understanding of the Microsoft .NET platform and a basic understanding of the dataset model.

Technical Article

Michael Rys on XML in SQL Server 2005

Michael Rys is one of two program managers responsible for the XML features in SQL Server. He also represents Microsoft on the W3C XQuery Working Group, and on the ANSI working group for SQL. I asked him what is distinctive about the XML support in SQL Server 2005, as opposed to that found in rival database management systems. As Rys acknowledges, "all the three major vendors, Oracle, IBM and Microsoft, are moving towards second or third generation suppor

External Article

SQL Server Integration Services - Part 5

We will continue our review of Foreach enumerators starting with Foreach ADO, since this one probably qualifies as the most popular choice in its category. This is due to the fact that ADO recordsets offer a convenient way of dealing with data sources, regardless of their type (for example, within SSIS, you can easily populate a recordset by executing a SQL query or by reading the content of a flat file)

External Article

Attack of the predatory sales force

Most skilled professionals—be they butchers, bakers or software makers—take pride in selecting their own tools of the trade. Why is it then that developers and DBAs in large corporations often are not afforded the same professional courtesy or opportunity? The tools they use are just as vital to their livelihood, yet when it comes to high-cost software, developers and DBAs often have no input into what is purchased for their use.

Blogs

Fabric for Operational Reporting & SQL Endpoint Trap

By

With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...

Crawl, Walk, Run with Agentic Development of Power BI Assets

By

If you’ve been watching AI roll through the data community and thinking, “this seems...

How AgentDBA Diagnoses SQL Server Issues Fast

By

Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...

Read the latest Blogs

Forums

SQL Art, Part 4: Happy 4th of July — A British DBA's Guide to Celebrating a War We Don't Talk About

By Terry Jago

Comments posted to this topic are about the item SQL Art, Part 4: Happy...

Finding 'bad' characters

By Barcelona10

Hi All I am trying to find 'bad' characters that users might type in....

Extreme DAX: Take your Power BI and Fabric analytics skills to the next level

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Extreme DAX: Take your Power...

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