New SQL Server 2014 Permissions: CONNECT ANY DATABASE
CONNECT ANY DATABASE is one of three new permissions in SQL Server 2014 that can be granted to server logins. What is this new permission good for and why would we ever want this?
CONNECT ANY DATABASE is one of three new permissions in SQL Server 2014 that can be granted to server logins. What is this new permission good for and why would we ever want this?
Here are seven practical tips for any 'accidental DBA' or developer, faced with having to deploy an upgrade to a database live to production, in a development environment that is in the early stages of getting the database code “house in order".
It can be frustrating to deal with poorly implemented systems, but Steve Jones notes that you can't take things into your own hands.
It can be very easy for technology experts to get frustrated when they see bad design and practices, but you must be careful with how you go about trying to influence change.
This article describes an easy way to handle calculation based on fiscal year and quarter
There is little doubt that static code analysis can contribute to code quality and deliverability. As an aid to a developer, it seems increasingly essential, but can it ever deliver reliable metrics of code-quality? One shudders at the potential misuse of quality metrics in the wrong hands. My hope is that it remains just an aid to human judgement; and creativity.
In this article, we’ll be focusing on the different ways you can build with a Cloud Service, and what exactly happens in terms of virtual machines when you deploy your application.
Recursive CTEs can be confusing and scary, so examining some non-standard examples may cast light upon these shadowy demons.
This Friday Steve Jones has a poll about your summertime activities. What have you done away from work that was memorable?
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