How to find Updated Column in SQL Server Trigger
In this tip we look at how to which columns have been updated when using a SQL Server trigger by using the update and columns_updated functions
2019-07-22
In this tip we look at how to which columns have been updated when using a SQL Server trigger by using the update and columns_updated functions
2019-07-22
Phil Factor starts a series of articles that will demonstrate the use of temporary SQL Server instances, running in Linux containers, into which we can deploy the latest database build, stocked with data, for development and testing work. This initial article shows how to set up a SQL Server instance inside a Linux Docker container, create some sample databases, and persist data locally.
2019-07-19
One very important design aspect when creating a new table is the decision to create or not create a clustered index. We will take a look at a few points to help with the decision.
2019-07-19
Phil Factor reviews the various types of database test that need to run during development work, what sort of test data they require, and the challenges with managing this data, and in keeping the test cell stocked with the correct database, and data, in a way that allows rapid cycles of database testing.
2019-07-18
Attributes in Unity allow you to add features like strings and menu items to objects. In this article, Lance Talbert shows you how to add attributes that can then be tested while in editing mode.
2019-07-18
SCOM is good at monitoring the status of your servers. SQL Monitor give you a detailed view of your SQL Server instances, and databases, right across your network, however they are hosted. By using tools appropriately, for the tasks they do well, you benefit from a simpler and more comprehensive overall strategy.
2019-07-17
Microsoft MVP Grant Fritchey provides an insight into the key findings from the report; what is the biggest challenge facing database professionals this year? How are estates changing? And what technologies are being used across the industry? Read Grant’s blog to find out.
2019-07-16
In this tip we look at how to build a hierarchy chart using the SQL Server hierarchyid data type and Excel to format the chart.
2019-07-16
Learn how data protection legislation is changing around the world and the 10 steps database teams can take to ensure compliance and defend against data breaches.
2019-07-15 (first published: 2019-06-21)
Data sources and datasets are critical components of an SSRS report, but many people new to SSRS struggle to understand them. In this article, Kathi Kellenberger shows you how to create these components and explains when they should be shared vs. embedded.
2019-07-15
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