Dynamic T-SQL Script Parameterization Using Python
Learn how dynamic SQL and sp_executeSQL can be used together from Python.
Learn how dynamic SQL and sp_executeSQL can be used together from Python.
Should we build modern software as monoliths or microservices? Or something else? Steve has a few thoughts today.
I need to construct JSON from data in our database, but I find the existing FOR JSON PATH limited when the data is not located in one single row but rather scattered over multiple rows. Is there another method on how to handle JSON data in SQL Server? Learn how to use the new SQL Server JSON Functions JSON_OBJECTAGG and JSON_ARRAYAGG in this article.
I won't even try to hide it. I got a huge kick out of the penguin characters in the animated movie, Madagascar. For those who don't know, they're trying to escape the zoo, but are trying to hide that from anyone discovering it. So, they put up a front, "Smile and wave boys. Smile and […]
Unlock new opportunities for data-driven decision-making by grasping the significance of SQL and structured data in current data and analytics ecosystems like Microsoft Fabric.
Code is vulnerable to supply chain attacks, which aren't something many of us think about.
The other day, my lovable coworker and frequent Simple Talk writer: Grant Fritchey, sent this post on X:
We all know security is important, but we sometimes make the job harder when we don't handle data appropriately.
In our conversations with job seekers, a consistent theme has been HOW do you use AI tools. This can be used to get new ideas, improve and optimize resumes, understand trends/market data, determine new connections and networking avenues, save time, alleviate headaches and roadblocks, and be more efficient and effective overall. Well, say goodbye to the days where you need to start a cover letter or resume from scratch or feel isolated, alone, and anxious during the resume writing, interview prep, salary negotiation, and other parts of the job search process, as we all now have an incredibly powerful job searching tool and career coach at our disposal to help with any writer’s block and almost every challenge you may run into!
Learn how you can integrate the SQL Server error logs into Crowdstrike for better analysis.
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...
Wa:0817781222 Jl. Otto Iskandardinata No.37, Karanganyar, Kec. Subang, Kabupaten Subang, Jawa Barat 41211
Wa:0817781222 Jl. Ir. H. Juanda No.118, Lebakgede, Kecamatan Coblong, Kota Bandung, Jawa Barat 40132
Wa:0817781222 Jl. Ahmad Yani No.9, RT.01/RW.05, Marga Jaya, Kec. Bekasi Sel., Kota Bks, Jawa...
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