Monitoring Stored Procedure Performance with sys.dm_exec_cached_plans
This article will show you how to use the sys.dm_exec_cached_plans DMV to monitor the performance of stored procedures
2008-03-13
3,804 reads
This article will show you how to use the sys.dm_exec_cached_plans DMV to monitor the performance of stored procedures
2008-03-13
3,804 reads
The Data Generator Source is now available for SQL Server 2005 and SQL Server 2008. This component needs little explanation. It generates random integer (DT_I4) and string (DT_WSTR) data and places them in the pipeline.
2008-03-12
1,502 reads
When designing a database, we sometimes come across situations where there are multiple types of entities that we are modeling, but we'd like them to all have certain attributes or relations in common. Using "sub-type" tables is a simple way to implement table inheritance in SQL Server.
2008-03-12
3,864 reads
In this article Dinesh Priyankara describes how schema comparison can be performed using Visual Studio Team Edition for Database Professionals.
2008-03-11
1,783 reads
When is it okay to let SQL Server to make a statistic for columns in your queries, and when should you take those statistics and make an index out of them? What I do is to test all of my procs, and if they generate system statistics (_WA_SYS%), then I add an index to the table for the column in the statistic. But is this a good practice?
2008-03-11
3,488 reads
Although a few different options (Management Studio, system stored procedures, system views, custom scripts, etc.) exist to determine your permissions in SQL Server, in this tip we want to outline the functionality from the fn_my_permissions table valued function.
2008-03-10
4,446 reads
The Trash Destination is now available for SQL Server 2005 and SQL Server 2008. The Trash Destination and this article came from early experiences of using SSIS and community feedback at the time. When developing a package it is very useful to have a destination adapter that does nothing but consume rows with no setup requirement.
2008-03-10
1,272 reads
This article from MSDN discusses the benefits of TDD and bringing unit testing to your database development.
2008-03-07
3,320 reads
This article describes how to take advantage of SQL CLR table-valued functions to combine different types of data sources to create rich and exciting SQL Server Reporting Services reports.
2008-03-07
2,625 reads
Business Intelligence Architect Bill Pearson continues his subseries surrounding components of the Analysis Services dimensional model. In the second half of this article, we extend our focus on dimensions to include property settings for Cube Dimensions.
2008-03-06
2,556 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