Getting More Hardware Information from SQL Server Denali DMV Queries
As I recently discussed, I often hear from database professionals who are not allowed to access their database servers directly....
2011-04-08
1,487 reads
As I recently discussed, I often hear from database professionals who are not allowed to access their database servers directly....
2011-04-08
1,487 reads
How do you check if you are a sysadmin? It’s fairly easy to do in Management Studio. You can go...
2011-04-08
2,355 reads
Getting at data within a .NET application can be straightforward using built in controls or much more complex through connections,...
2011-04-07
2,075 reads
Everyone knows that in SQL 2000, yes 2000, Microsoft jumped aboard the bandwagon of other platforms, and gave the developers...
2011-04-07
12,319 reads
Do you use NULLIF? For me, this command has been seldom used. Because of that, I have been dabbling with...
2011-04-06
3,375 reads
Sometimes when we’re trying to track down a problem and looking through SQL’s Logs we have to dig...
2011-04-05
1,493 reads
Your customers expectations are their primary measure of your success. How well are you managing them?
You’re reading The DBAs Guide...
2011-04-04
2,065 reads
I had an interview earlier this week. An interview for a SQL developer position. It went fine. But. Question number X...
2011-03-30
4,648 reads
Things Go South
Recently I was troubleshooting a piece of software that archives data out of a very active import table....
2011-03-29
2,259 reads
SQL’s auto-updating statistics go a fair way to making SQL Server a self-tuning database engine and in many cases they...
2011-03-28
1,643 reads
With Fabric Mirroring, Microsoft is promoting a nice and appealing story for operational reporting...
If you’ve been watching AI roll through the data community and thinking, “this seems...
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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