Achieve Flexible Data Modeling with the Entity Framework
Here the author answers questions regarding the Entity Framework and provides an understanding of how and why it was developed.
2008-08-01
3,074 reads
Here the author answers questions regarding the Entity Framework and provides an understanding of how and why it was developed.
2008-08-01
3,074 reads
This paper explores several ideas to improve the query and data modification performance of the XML data type in Microsoft SQL Server 2005. To get the most value from this paper, you need to be familiar with the XML features in SQL Server 2005. For background material, see XML Support in Microsoft SQL Server 2005 and XML Best Practices for Microsoft SQL Server 2005 on the Microsoft Development Network (MSDN)
2008-08-01
2,382 reads
This article describes how to enable Instant File Initialization in SQL Server 2005
2008-07-31
3,738 reads
Some reasons for the slow-running of database applications aren't obvious. Occasionally, even the profiler won't tell you enough to remedy a problem, especially when a SQL Statement is being forced to wait. Now, in SQL Server 2008, come XEvents, which allow you to look at those waits that are slowing your SQL Statements. Mario Broodbakker continues his series about SQL Server Wait Events
2008-07-30
2,343 reads
This article provides an overview of the use of Column Sets with Spare Columns in SQL Server 2008
2008-07-30
2,422 reads
This tip presents two very useful stored procedures that live in the master database but are not mentioned in SQL Server Books Online. These system procedures come in very handy for jobs such as determining the space used, the number of rows, the indexes on the user tables, and so on.
2008-07-29
4,102 reads
Registration for SQLBits III, to be held at Hatfield in the UK on September 13th, is now open! SQLBits is the UK's finest SQL Server technical conference, and it's 100% free to attend!
2008-07-29 (first published: 2008-07-23)
1,837 reads
This article provides a step by step guide on how to create and configure an SSIS package which can be used to import XML data
2008-07-28
2,854 reads
Too often, denormalization is suggested as the first thing to consider when tackling query performance problems. It is said to be a necessary compromise to be made when a rigorous logical design hits an inadequate database system. As the saying goes, “Normalize ‘til it hurts, then denormalize ‘til it works”. In reality, Denormalization always leads eventually to tears.
2008-07-28
7,924 reads
SQL Server 2008 introduces the Database Backup Compression feature. This article describes how to take advantage of this new feature
2008-07-25
2,029 reads
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
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,...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
WhatsApp: 0817839777 Kw. Industri Pulogadung, Jl. Raya Bekasi Km. 21, Ruko No.A2/18-19, RW.3, Wil,...
WhatsApp: 0817839777 Jl. I Gusti Ngurah Rai No.8 A-B, RT.8/RW.6, Wil, Kec. Duren Sawit,...
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