Fix v. Create
This Friday Steve Jones wants to know how you spend your time. Do you get to do a lot of new development or do you end up fixing, tuning, and improving old code. Let us know.
This Friday Steve Jones wants to know how you spend your time. Do you get to do a lot of new development or do you end up fixing, tuning, and improving old code. Let us know.
This tip will look at how you can use triggers to replace the functionality you get from the ON DELETE CASCADE option of a foreign key constraint.
Adam Machanic is speaking at SQL in the City - Boston on Oct 8, 2012.
It's time to vote for the Exceptional DBA awards, and Steve Jones is asking for your opinion. Take a moment and recognize one of your peers as the best DBA in 2012.
SQL Agent stores duration in HHMMSS format - not always useful. Discover how to use Powershell, some basic math, and T-SQL to tame these unruly values.
So how should you install and configure SQL Server 2012 properly? Glenn Berry completes his two-part series by explaining the steps needed to complete the preparation and do the actual installation.
The hack on a Gizmodo writer using Amazon and Apple customer service security holes was shocking. Steve Jones notes that while security is important, backups are even more important.
In this article I will be expanding on my discussion of the GROUP BY clause by exploring the ROLLUP, CUBE and GROUPING SETS operators. These additional GROUP BY operators make it is easy to have SQL Server create subtotals, grand totals, a superset of subtotals, as well as multiple aggregate groupings in a single SELECT statement.
The Row Number Transformation calculates a row number for each row, and adds this as a new output column to the data flow. The column number is a sequential number, based on a seed value. Each row receives the next number in the sequence, based on the defined increment value.
Big Data is in the news and there is a lot of job growth. Steve Jones lists a few industries and areas where you might find one.
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