SQLServerCentral Article

Nightmare Contest

Murphy's law has struck us all, as evidenced by the disaster entries we've received in the past. Imceda software, makers of Litespeed are sponsoring a new contest, looking for your nightmares.

SQLServerCentral Article

Review: NGSSquirrel

NGS Software is in the security business and have been very successful in finding vulnerabilities in many products, notable SQL Server. They have used their expertise to build products to help you better secure your systems. Dale Corey looks at one of those products, NGSSquirrel, which does vulnerability assessment.

SQLServerCentral Article

Database Change Management: An Automated Approach

SQL Server change management is tough. The tools don't integrate with version control systems, there isn't good administrative controls to enforce control, and often you need to buy a third party tool to make this work. New Author Darren Fuller takes a look at the various ways in which you can implement version control in SQL Server. This is part one of a four part series on version control in SQL Server.

SQLServerCentral Article

Lookup Table Design

Designing a SQL Server database is a challenging task. Making decisions about how to build tables, their relations, etc. can be a full time job for any DBA helping to build an application. Lookup tables are a part of just about every application that you work with or build a back end for. Leo Peysakhovich brings us an article on database design that deals specifically with lookup tables.

SQLServerCentral Article

Review: SQLCentric

Monitoring your SQL Servers is something every DBA must do. Checking job status, disk space, etc. is a frequent question seen in our forums. Pearl Knowledge Solutions has developed a product to help you easily setup monitoring on your servers from a web interface. SQLCentric gets 4 stars from author Bruce Szabo; read his detailed review on this fine product.

SQLServerCentral Article

The Bowling Challenge

Know anything about bowling? Or writing hard core TSQL? Or test driven development? Even if you don't, this might be a good way to build those skills. Write a stored procedure that can score a bowling game and you might win one of our books and a shirt!

SQLServerCentral Article

Comparison of Oracle Drivers

Oracle is usually a dirty word in the SQL Server community, but like it or not, lots of data resides in Oracle databases. And SQL Server is often used to gather this data together in a warehouse of some sort for spinning cubes, generating reports, etc. Haidong Ji looks at the various methods that you can connect to an Oracle driver and compares the speed of each. If you need to get data from Oracle, or may need to, this is the place you want to start.

Blogs

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...

Five Ways Redshift Serverless Quietly Eats Your Budget

By

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

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