Getting Started with CQRS – Part 2
In this second article of the series, Diogo Souza walks you through creating the MongoDB code, the query side of the pattern, to complete the CQRS configuration.
2019-01-24
2,922 reads
In this second article of the series, Diogo Souza walks you through creating the MongoDB code, the query side of the pattern, to complete the CQRS configuration.
2019-01-24
2,922 reads
In this tip we look at how you can use DAX formulas within your SQL Server Reporting Services Report Builder reports.
2019-01-23
2,297 reads
Explore the Azure Data Studio dashboards and see how to customize one of these dashboards to include a new widget.
2019-01-22
2,188 reads
In the first article in this series, Andy Brown demonstrated how to create calculated columns in Power BI using the DAX language. This second article in the series explains what measures are, and how you can use DAX to create measures within Power BI. The formulae in the article apply equally well to PowerPivot and Analysis Services Tabular Model.
2019-01-21
2,447 reads
If you have a function in the WHERE clause, you might have heard you can't use indexes. That's not entirely correct.
2019-01-18
3,536 reads
Julie Lerman introduces you to the new logging APIs in .NET Core, concentrating on SQL and change-tracking events, with a focus on providers that output to the console and the debugger.
2019-01-18
2,083 reads
You have many options when exporting data from a database. In this article, Phil Factor compares several methods including XML and array-in-array JSON for speed and file size.
2019-01-17
3,509 reads
Learn how to use T-SQL to fix contents of an XML document using FLWOR
2019-01-17
2,558 reads
In this tip we look at T-SQL code that can be used to determine the greatest common divisor for a set of integers.
2019-01-16
2,635 reads
On September 24th Microsoft released the first Community Technical Preview for SQL Server 2019, which was CTP2.0. At the same time Microsoft pushed out a new preview for SQL Server Management Studio (SSMS) known as version 18. Now is the time to download this new preview!
2019-01-15
4,118 reads
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Comments posted to this topic are about the item Extreme DAX: Take your Power...
Comments posted to this topic are about the item What is the Cloud?
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