Loading XML Data into SQL Server (SQL Spackle)
Learn how to load data in an XML file into a table in SQL Server.
Learn how to load data in an XML file into a table in SQL Server.
Tomorrow is the bicentennial SQL Saturday event. SQL Saturday #200 takes place in Philadelphia, and Steve Jones has some thoughts as he travels to the City of Brotherly Love.
Any queries run against SQL Server or Oracle databases are recorded, along with how many times those queries were run and how long they took. That information is shown alongside your .NET code, so you can quickly see why the code you wrote resulted in those queries being executed. This can be particularly powerful if you’re using ORMs like Entity Framework to access data, which tend to be an impenetrable black box where performance issues can arise, but where it’s difficult to understand why.
We're looking for scripts that you use in your daily job to find, fix, and solve issues in your environment.
Your production SQL Server transactional replication just failed and the business impact is critical. How do you get replication restored in minutes?
There isn't a lot of acceptance of Azure from DBAs. Steve Jones talks about some of the advantages of Azure and thinks that we should be working to ensure that our internal systems respond at the same speed as people can get from Azure.
In this tip Aaron Bertrand describes some of the ways in which you can extend the DDL trigger functionality.
The Microsoft Connect system allows many of us to submit feedback, but is Microsoft doing anything with it? Join us and place your vote on some items and try to influence Microsoft.
The fifth installment of the sp_Blitz script being run on the SQLServerCentral database server.
Databases often need more than just the database objects to run. There may be certain server objects and components, and SQL Agent objects, that are required as well. For an automated deployment, these need to be identified and their build script placed in source control. They then need to be deployed via the pre, or post deployment script. Phil spells out how and why.
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