This artcle attempts to differentiate between the uses of WITH RECOMPILE and OPTION (RECOMPILE) features.
Table Value Constructors (TVCs) are a useful feature of 2008, allowing you to specify tables of values and expressions. Users who are stuck with previous versions of SQL Server can play along, since Rob Sheldon demonstrates that there have always been ways of doing this in SQL Server, though less elegantly.
Today we have a guest editorial from Andy Warren. We often find that many DBAs fall into the job as accidental DBAs, and need more training. Is a boot camp the way to get them up to speed quickly?
Recently I came across with an article on DB2 about using Union instead of OR. So I thought of carrying out a research on SQL Server on what scenarios UNION is optimal in and which scenarios OR would be best. I will analyze this with a few scenarios using samples taken from the AdventureWorks database
This editorial was originally published on Nov 21, 2005. It is being re-run today as Steve is on holiday. How much money is it worth to compromise your ethics? Steve Jones asks today as many companies around the world seem to be doing that.
: "It is a narrow mind that cannot see things from more than one point of view." —George Eliot
Indexes speed retrieval of rows from database tables or views. Here are the top index-related T-SQL statements that SQL Server DBAs should know.
I'd like to hear the thoughts of DBAs out there on Windows and SQL Azure, and the prospects of moving applications and databases into the clouds. How many DBAs work for companies that have done it or are seriously considering it? What are the deepest concerns?
A holiday in the US has most people away from work. Steve Jones leaves you a few thoughts and humor from his vacation.
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
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,...
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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
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