SQL RAISERROR to Better Handle Errors
Learn how and why to use RAISERROR in your SQL Server code to be able to better handle errors that may occur during code execution.
Learn how and why to use RAISERROR in your SQL Server code to be able to better handle errors that may occur during code execution.
When you first become responsible for a new RDS instance, what do you do? Kenneth Igiri gives you a few queries to get you started.
The previous installment of this series examined aggregate subquery removal and subquery coalescing, describing the latter as similar in some ways to an inverse for “Or Expansion” and “Join Factorization”. In this instalment, it’s time to take a closer look at Or Expansion and we’ll move on to Join Factorization in the next instalment.
With the average data breach costing $4.35 million, Test Data Management (TDM) is crucial. In this session, we’ll demonstrate how TDM can reduce your risk by achieving scalable compliance without slowing down your database development process. Watch on demand now.
A look back at the PASS Data Community Summit in 8 slides from Tonie Huizer.
Learn how one company adopted, adapted, and learned from the Agile methodology.
In my previous tip, I explained how we are inclined to use archive tables and how they become increasingly problematic over time. This tip will focus on ways to mitigate the issues.
An introduction on how to implement condition formatting of cells, such as the font and background colour or font weight, within SSRS using SSRS Expressions.
This week Steve Jones looks at moving the port numbers of your instances for a bit of security.
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,...
By Tim Radney
As a SQL Server DBA with years of experience tuning production environments, I’ve seen...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...
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