TSQL Challenge #14
A new challenge is up. See if you are up for the task of identifying the longest sequence of characters in a string before Oct 12
2009-10-01
3,616 reads
A new challenge is up. See if you are up for the task of identifying the longest sequence of characters in a string before Oct 12
2009-10-01
3,616 reads
There are a number of SQL Saturday events around the country in October: Redmond, Gainesville, Orlando, Louisville, and Cedar Rapids. Read more about these events.
2009-09-24
1,909 reads
The 2009 PASS Summit is Nov 2-5, 2009 in Seattle. Come and grow your network, while learning about SQL Server.
2009-09-17 (first published: 2009-05-12)
726 reads
Take T-SQL Challenge #13, Break a batch of invoices into multiple parts based on rules.
2009-09-15
4,471 reads
A last push for the 2009 PASS Summit before registration goes up.
2009-09-10
18 reads
The next SQLBits conference is being held Nov 19-21, 2009 in Newport, UK. If you want to attend or even speak, read more about this event.
2009-08-27
1,542 reads
It's on Livemeeting and open to everyone. Get some lunch time training in with this group.
2009-08-25
392 reads
SQLServerCentral is hosting an opening night party at the 2009 PASS Summit. Read more about this and learn how to get a ticket.
2009-08-19
91 reads
Take the new challenge from MVP Jacob Sebastian. Deadline is next Monday.
2009-08-18
4,515 reads
A new PASS chapter is now on the island of Curacao. Roy Ernest, longtime SQLServerCentral contributor, runs it. Come support this chapter in the Caribbean.
2009-07-28
369 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