Executing Dynamic SQL Using sp_executesql
Learn how to create and execute dynamic SQL in your SQL Server projects!
2019-08-13
Learn how to create and execute dynamic SQL in your SQL Server projects!
2019-08-13
You’ve read the State of SQL Server Monitoring Report and you’ve decided you need a SQL Server monitoring tool to cover your estate fully. Now you just need to convince your boss to get on board. Read our blog to find out how to do it.
2019-08-13
In this weeks Simple Talk editorial Kathi Kellenberger discusses how to measure the performance of a development team and why you should always make sure you are measuring the right thing, not just the easy thing.
2019-08-12
Redgate’s SQL Monitor was named the most popular third-party monitoring tool in this year's State of SQL Server Monitoring Report. Find out exactly what SQL Monitor can save you and your company with the ROI calculator.
2019-08-09
In this tip we look various map visualizations like Bubble, Shape and Filled Map visualizations you can use with Power BI.
2019-08-09
PolyBase has been around since 2016, but Microsoft is enhancing it in 2019 with the ability to connect to more data sources. You can now use PolyBase to connect to other SQL Server instances, and it’s easy to set up with a wizard. In this article Benjamin Weissman explains what’s new in PolyBase and walks you through setting it up and connecting to an external table.
2019-08-08
Phil Factor illustrates the 'quirks' of the SQL_VARIANT datatype and why it's best to investigate when SQL Prompt alerts you to its use. It is only safe to store data as a SQL_VARIANT, if you explicitly convert it to its true type before you use it.
2019-08-08
Over the last year we’ve seen a shift in customer concerns around personal data, as well as new legislation. Now is the time to implement a robust process to safeguard your data and your business, without hindering your DevOps journey. Read this blog post to find out the next steps for data privacy
2019-08-07
In this tip we will address questions that will help relational database developers understand the various considerations for using a graph database.
2019-08-07
With all the talk about new data privacy legislation, we don’t stop to think about existing laws. Legislation like the GDPR kick-started the way the world views data privacy, and this blog post explores how existing laws are being used in new ways around the globe to enforce similar protection.
2019-08-06
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