Throttle a Query in Mid-Execution
Resource Governor provides a great mechanism for throttling resources, but it doesn't always allow granular control. Read about this trace flag that allows you to dynamically alter the resource usage of a query.
Resource Governor provides a great mechanism for throttling resources, but it doesn't always allow granular control. Read about this trace flag that allows you to dynamically alter the resource usage of a query.
If you’re involved in the database world it’s hard to have missed the rise of the “no-sql” database products, designed to – depending on your view or the product I suppose – make databases simpler, break out of the transaction database paradigm, scale out across hundreds of machines, make it easy to change the db design (or not require one). I think some of the problems no-sql tries to solve are real, others reflect a lack of awareness/training/tools on how and why relational databases could not just solve the problem, but solve it better.
Pivoting SQL Server tables is always awkward, even with the PIVOT and UNPIVOT operators. If you want to get the job done without GROUP BY or PIVOT, here is a way to do it using only REPLACE.
Join us on April 6th in Omaha for SQL Saturday #197. SQLSaturday is a training event for SQL Server professionals and those wanting to learn about SQL Server.
This Friday Steve Jones talks about xp_cmdshell and the security regarding its use. Do you have any holes that might exist if administrators are allowed to use this tool on their instances?
In this tip we will look at one way to achieve control of stored procedures to ensure that reuse is for the intended purpose and changes do not break other applications that may be using this same code.
A case study shows how the combination of Azure and Hadoop helped the Halo 4 team grow their successful franchise.
This article brings you a technique and framework to use in your stored procedures that can allow you to re-throw and log errors.
When you need to shred just part of the data within a large XML file into a SQL Server table, the most efficient way is to just select what you need via XQuery or by using XPath, before shredding it into a table. But precisely how would you do that?
When compared with HASHBYTES, CHECKSUM, has a number of drawbacks. Hence, a question that comes up is: Is Checksum really required? In this article, I attempt to answer that question.
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...
It is Friday, the queries are running, and nobody is watching the bill. That...
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