Enable Trace Flags in SQL Server
Learn how to enable trace flags to change the behavior of your SQL Server instance.
2017-03-15
54,152 reads
Learn how to enable trace flags to change the behavior of your SQL Server instance.
2017-03-15
54,152 reads
SSIS was not originally designed with automated deployment in mind. However, any database that uses SSIS projects and their packages needs a way of scripting the deployment of them if the database is to be deployed rapidly, or via a build server. Nat Sundar shows a technique that can be extended to manage the scripted deployment of SSIS projects.
2017-03-15
5,823 reads
Adding Years, Months and Days to Years, Months and Days, with Bonus UK Public Holiday calculation.
2017-03-14
3,233 reads
Azure SQL Database offers several benefits, built into the underlying cloud infrastructure, that leverage resiliency and redundancy. You can take advantage of this functionality to facilitate failover and failback in response to events that affect availability of an Azure region.
2017-03-14
3,555 reads
2017-03-13
1,855 reads
Identifying a need for better collaboration between teams is only the first step to introducing DevOps workflows into your organization. You also need to define a common DevOps goal,...
2017-03-13
2,937 reads
Understanding execution plans is a good basic skill for all DBA's and SQL developers. Darren White gives us an overview of what execution plans are in SQL Server and how they are used.
2017-03-10 (first published: 2014-02-18)
30,961 reads
Satnam Singh walks through the steps he took to troubleshoot a recent issue with memory consumption on a staging server.
2017-03-10
6,023 reads
This time we will work with the sqlcmd to handle our Azure SQL Data Warehouse
2017-03-09
1,192 reads
2017-03-09
562 reads
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