New feature in SQL Server 2012 - Sequence
A new feature in SQL Server 2012 is Sequence. A Sequence object provides functionality similar to Identity.
2012-10-22 (first published: 2012-09-11)
2,051 reads
A new feature in SQL Server 2012 is Sequence. A Sequence object provides functionality similar to Identity.
2012-10-22 (first published: 2012-09-11)
2,051 reads
Show all job history between two dates. This is much easier than trying to navigate the job history log file viewer.
2012-10-19 (first published: 2012-09-17)
1,129 reads
Index Defragmentation is one of the most important DBA tasks. This will significantly improve query performance.
2012-10-18 (first published: 2009-11-18)
12,448 reads
Here's a set of scripts that allow you to save pertinent information from SQL Server Profiler trace files.
2012-10-18 (first published: 2012-09-20)
612 reads
Generates a script to check connectivity between a list of SQL Server instances on a specified port.
2012-10-17 (first published: 2012-08-09)
2,096 reads
2012-10-16 (first published: 2012-09-21)
2,552 reads
It creates the script for restoring your database with all the backups (full, differential and transaction log) needed.
2012-10-16 (first published: 2007-12-27)
5,016 reads
2012-10-12 (first published: 2012-09-10)
1,798 reads
This script lists the name, running and success status, last executed/currently executing step name, Average and Last duration, next run time and other related information about Jobs.
2012-10-10 (first published: 2011-11-02)
2,113 reads
Two views that give you a variety of stats, sortable as a percent of DB size, for tables, indiceses, XML indices, and Service Broker Queues.
2012-10-09 (first published: 2008-06-16)
3,076 reads
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