Parking Garages And Predicates
You lost your car in a big parking lot. Erik Darling explains how this is just like an index scan.
2018-05-07
3,029 reads
You lost your car in a big parking lot. Erik Darling explains how this is just like an index scan.
2018-05-07
3,029 reads
Brent Ozar shares four stories of people who thought they could avoid backups - and got burned.
2018-05-04
5,663 reads
Some time ago, Phil Factor wrote his booklet 'SQL Code Smells', collecting together a whole range of SQL Coding practices that could be considered to indicate the need for a review of the code. It was published as 119 code smells, even though there were 120 of them at the time. Phil Factor has continued to collect them and the current state of the art is reflected in this article. SQL Prompt is committed to cover as many as possible of them. Phil has also updated his book, which is free to download.
2018-05-03
5,999 reads
In this post, Tim Smith will look at some of the considerations for both data rules and logic to prevent invalid data early in the ETRL process.
2018-05-02
3,324 reads
Microsoft currently offers two built-in methods of running production SQL Server databases in Azure. The first relies on the ability of Infrastructure-as-a-Service (IaaS) Azure virtual machines to host a variety of on-premises workloads, including SQL Server instances. The second one leverages Platform-as-a-Service (PaaS)-based Azure SQL Database. With the introduction of the Azure SQL Managed Instance service, you have a third option, which combines the benefits of its two predecessors.
2018-05-01
3,285 reads
One of the most important tools for query tuning is ability to view execution plans. They are even portable; you can send an execution plan to get advice from someone who doesn't have access to the underlying data. Have you even considered that sensitive information might travel along with the plans? Hugo Kornelis explains how execution plans affect data protection.
2018-04-30
3,411 reads
SQL Server has a couple of different ways to represent hierarchies, but they do not allow storing any additional information that is important to the relationship between objects. In this article, Phil Factor explains how to use closure tables to overcome this deficiency.
2018-04-27
3,926 reads
Remember when that old DBA told you not to SELECT *? Erik Darling explains why.
2018-04-26
2,943 reads
Erik Darling shows how missing index requests have different impact numbers depending on the query's join type.
2018-04-26
7,058 reads
Modifying data in Graph Database tables is similar to working with traditional tables, but there are several things to consider. Robert Sheldon explains how to insert, update, and delete rows of Graph Database tables and explains how to use several new helper functions.
2018-04-25
2,651 reads
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
If you’ve been watching AI roll through the data community and thinking, “this seems...
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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 GOI 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 GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers