How to save results of a procedure with more than one result set
Sometimes a procedure returns more than 1 result set. The article describes how to save all result sets into new database tables
Sometimes a procedure returns more than 1 result set. The article describes how to save all result sets into new database tables
Privacy is a big deal in the digital world, but it's also something companies don't handle well. Steve Jones notes that however things change in the future, the data professional will need to pay more attention to issues in this area.
How can I find out which statistics are outdated in my SQL Server database?
Come to Cambridge in the UK for a free day of training on SQL Server. Steve won't be there, but plenty of other Red Gate'ers will be.
As computers get more complex and automated, the chance for rogue algorithms grows. Steve Jones reminds us that we should be careful in how we code and that a little forethought from managers can help.
Not all applications are limited to only retrieving data from a database. Your application might need to insert, update or delete data as well. In this article, I will be discussing various ways to insert data into a table using an INSERT statement.
Having finally got around to upgrading my custom components to SQL Server 2012, I thought I’d share some notes on the process. One of the goals was minimal duplication, so the same code files are used to build the 2008 and 2012 components, I just have a separate project file.
This article discusses failover cluster instances and AlwaysOn groups
Bad behavior at conferences hasn't been a problem at SQL Server events, but it has been elsewhere. Steve Jones thinks this is unacceptable.
Free SQL Server training comes to Germany. Join fellow SQL Server pros in Munich on Sept 15, 2012.
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