SQLServerCentral Article

Indexed Views With Outer Joins

SQL Server 2000 has indexed views, which can greatly improve database performance. However there are a number of restrictions on building the view, including the restriction against outer joins. So how can this work? New author Jean Charles Bulinckx brings us a technique that can help you get around this restriction.

Technical Article

ENTERPRISE METADATA FRAMEWORK

Over the past few years, I’ve had the opportunity to discuss enterprise metadata to a wide variety of audiences and much of this conversation is captured in this “Best Practices” implementation framework. The model has evolved over the past few years as our program continues to do the same. Of course, this summary can only be a few pages long so the depth of the content here will be a tad shallow but you should be able to get the basics from the diagram and the description that follows. Figure 1 provides the new framework and the content follows to describe each section.

SQLServerCentral Article

Agile Development with Scrum

We've all been there: the project that never ends and no light at the end of the tunnel. Nothing is more disheartening to a developer, DBA or anyone else that may be on a project than a finish line that has no end in sight or worse yet, one that keeps moving. Agile and Scrum development methodologies aim to fix this problem and others by applying what will appear to be common sense after you engage in the methodology for a few projects. This article will get you acquainted with my now-favorite d

SQLServerCentral Article

You Want To Do What, with MY Database?

SQL Server 2000 is an extremely powerful and flexible development platform, but if the users mess up the data, there's nothing you can do. Protecting the integrity sometimes means severely limiting access to users. Roy Carlson brings us a technique using sp_makewebtask that you can easily use to provide users with some data without giving them query access.

External Article

An interview with Ken Henderson

I have never met Ken Henderson, but I have followed his career, read his books, and even reviewed one or two of them for Dr. Dobb’s Journal. When I first saw Ken’s The Guru’s Guide to Transact SQL I almost did not pick it up. As a general rule, I don’t pick up the guru’s guide to anything. I’m glad I overcame this, since the book is little short of amazing.

Ken surprised me again with his latest book, The Guru’s Guide to SQL Server Architecture and Internals . About 400 pages into it, I was impressed by the introduction to what is involved in creating a server-based application, but wondered about its inclusion in a SQL Server book. The next 400 pages made it clear that understanding how servers work on Windows is critical to understanding the implications of how SQL Server runs.

Technical Article

BUSINESS METADATA: HOW TO WRITE DEFINITIONS

Many errors and accidents are made/caused by misunderstandings of the meanings of terms used.

How many times have you been in a meeting when the words you heard being said did not match what you thought they were?

Many business decisions are made (and later regretted) due to a misunderstanding of the data, and what the data element used in a report is signifying. Some of these accidents and misunderstandings are large enough to be reported in the media. In prior papers I refer to the Mars Lander episode, where the unit of measure was assumed and not made explicit, miscalculations were made and the equipment was lost. Our businesses are filled with many such examples, although not as costly perhaps, are still quite impactful to the business.

Technical Article

SQL Server OLTP vs. data warehouse performance tuning

SQL Server delivers a number of functions for small to large organizations with needs ranging from internally developed applications to third-party off-the-shelf software. With all systems, data collection, entry and analysis at some level is required to meet organizational needs.

As user demands and the volume of data increase, it is imperative that all systems are properly configured and tuned based on the processing needs to meet the organizational requirements. This article will discuss two broad categories of SQL Server processing -- online transaction processing (OLTP) and data warehouses -- and will outline performance-tuning tips for each platform.

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